Oracle RAC, CentOS and GFS

One thing I'm currently working on is a 2 node CentOS cluster using GFS as the shared file system, with the storage on a fibre attached HP MSA SAN. This is a proof of concept before investing in RHEL AS licences (which will be the better part of £2000). CentOS is free and is intended to clone RHEL as closly as possible, removing the Red Hat branding and of course professional support. The cluster suite and GFS are available in CentOS as they are both open source.

The hardware I am using is 2 HP DL580 G4 servers with 12GB of RAM, Qlogic HBA's, and an MSA1000 SAN. I'm using this guide on Red Hat's website and have been making my own notes along the way. I've got as far as installing cluster suite on one node but I'm unable to choose the grand unified lock manager as it doesn't appear as an option. I expect this may take a bit of reading to get working ... I'll post a mini howto here when I make some decent progress.

A while ago I undertook a similar exercise and had problems getting the HP ACU to see the SAN under Red Hat, I had to get HP involved as there were specific versions of the kernel and drivers required for it to work properly. I've noticed I have the same problem time time, but now I am on CentOS and it's the x64bit version, so it looks like I will have to experiment with driver versions and see what I can get to work without any support this time.

Red Hat Summit 2008 - closing post

In short - it's been good, a valuable use of my time. The presentation throughout the summit was of a very high standard, and this included the catering too.

If I had to summarise the summit I would do so using the following 5 buzzwords:

1. Virtualisation. Guess what ...? Red Hat has their own virtualisation product. It looks very promising but if I am brutally honest (and Red Hat would kill me for saying this), they are pretty much in the same boat as Microsoft. By that I mean they are leagues behind what VMWare are offering right now. But it wasn't just Red Hat banging on about virtualisation. All the vendors in the exhibition hall were touting their products with the big V in mind.

2. Green/Energy saving. Everyone is working towards making their products consume less energy, while giving the user much more back. Red Hat and intel are working towards more closely unifying hardware and software, so that their OS can have much greater control of how much power a device on the system should consume.

3. Cloud computing. Everyone was talking about this. Offload your computing power to other computers in the cloud when you have extreme amounts of processing to do. It's a bit like clustering except you only dip into the cloud when you need to, and the computers in the cloud don't have to be on your network.

4. Red Hat Satellite. A lot of the speakers talked about how they use Satellite to administer their Red Hat servers. And of course there was the big announcement about Spacewalk.

5. Open Source. Red Hat love talking about it and they are very proud about being open source. They even talked about the importance of CentOS and Ubuntu, which surprised me! Moreover, I was astonished that CentOS will be a supported product by Spacewalk. When questioned about Ubuntu, the reply was Ubuntu is not a rival of Red Hat ... as it's going to take more than one player to topple Microsoft!

I'm off home now, but first I'm due a visit to the duty free shop for an extremely large bottle of whisky. Thank you very much HP (but sorry, I'm not keeping the t-shirt) :)

Spacewalk - Red Hat Satellite for free!

Red Hat have made another important announcement at this years Summit - RH Satellite has been made open source! At first I was excited, because:

  • Red Hat customers can save hundreds of dollars as it's now free - you don't have to buy an RHAS licence for a RH Satellite (that is, unless you want support for it).
  • You can run it on Fedora!
  • Community users can add to the code and make it better. By this I mean they can (and will) fix bugs and add enhancements.
  • This is beneficial for Red Hat as these improvements can (and will in due course) be loaded back into the paid RHAS Satellite packages.

BUT .... what you can't do with Spacewalk is update RHEL systems with it - you can only use it to manage Fedora and CentOS systems for now (according to the FAQ). So it's no use to me at the moment as we're a Red Hat shop only .... I guess I'll be waiting for my RHAS system after all.

Red Hat Summit - Day 2

Red Hat logoThere were 2 seminars that stood out for me today after Joel Cowen's (Executive producer of The Simpsons) amusing Keynote speech - did you know The Simpsons is rendered on Red Hat?

The first of the noteworthy seminars was Michael Stahnkage on how to manage RHEL updates. He's one of the few speakers who kept it human and maintained an interesting session throughout with a mix of his own experiences, some real world scenarios, and a bit of dry humour to keep the audience awake. I made plenty of notes which I will be taking with me to begin planning an update strategy for my company's Red Hat servers. For my own reference - the slides are here (in Open Office format).

The other session of interest was a business pitch from IBM (IMO, to a room full of the wrong people) on Red Hat as a desktop alternative for the enterprise. The cost savings are incredible particularly when you replace Microsoft Office with Open Office (or Symphony, as IBM call it). It started to drag towards the end but got more interesting when someone asked about the new Office 2007 formats and compatibility with Symphony, just because we got to see some very senior people from IBM squirming and getting very defensive. They also didn't have an answer for any decent Visio alternative on Linux. I thought their strategy was very interesting and an honourable thing to do, but I think the average consumer will be difficult to migrate from Windows to something alien, especially while sharing documents with Windows users is not straightforward, and application compatibility with browsers other than IE is still an important issue.

Bounty!
I have accumulated a lot of free stuff over the last 2 days:

  • A Tux foam penguin
  • 1GB HP Branded USB key
  • Flashing bouncy ball and stress ball
  • Red Hat baseball cap
  • HP Lip ice sunscreen!
  • HP T-shirt (XL - looks like a tent on me)
  • r1soft.com T-Shirt (XXL - blimey, how big??)
  • zenoss T-Shirt (Medium - which is actually alright!)
  • Red Hat bag and USB key which all attendees received

The HP T-Shirt also had a secondary purpose. If you wear one around the Summit there is a chance to win iPods and iPhones (and other Apple goodies), if you get stopped by HP and correctly answer some questions about ICE-Linux - an HP SIM plugin for managing Linux servers. I opted into this and wore my huge T-Shirt, and when I was stopped and answered my question correctly .... I won $50 in Amex vouchers! Nice - free duty free alcohol for me on the way home!

ZenOss was an interesting product as well, it's a monitoring solution based on Cacti and RRD but with some extra features and paid support thrown in (like viewing your servers on a Google Maps mashup). Really I'm not sure if it's worth it - if you already use Cacti and have time to invest in beefing up your existing environment with all the best plugins available (like threshold monitoring, alerting, syslogs), then you will get pretty close to a ZenOss install out of the box. But that said, if you don't have time or want professional and friendly assistance to set up a comprehensive monitoring solution, then ZenOss could be for you.

In general the exhibition part of the Summit was a bit small, but I've found all of the vendors very friendly and they wanted to discuss how I used Open Source (and Red Hat) in my own workplace, avoiding the hard sell of their own products.

Red Hat Summit - Day 1

Red Hat logoDay 1 has been pretty interesting. The surprise highlight for me was the keynote speech from Dr John Halamka (CIO, Harvard Medical School) about the challenges he faces with computerising patient records for the state of Massachusetts, and how he is using Red Hat and open source technologies to do this. He also described the process of genetically sequencing people, and how some of these records are being stored in an open source Google-powered vault (aptly named Google Health) for access by medical professionals (this process now only costs a mere $10,000 per individual!). The IT Infrastructure he is responsible for is huge. The main data centre in Boston has 250 Red Hat VM's and 500Tb of information that can fail over to a DR site with only 1 second of lost information.

The workshop seminars started off slowly. Kernel optimisation is a fairly dry subject already, so being lectured by Red Hat experts (geeks) in the subject made for a sleepy beginning to the morning. But there were 3 other seminars that stood out for me.

A few months ago I started reading about RH Satellite server and put in a request for the Red Hat AS licence so we could get one running on our network at work. Today I sat in on a case study on Satellite server by PMC-Sierra which made me want one even more. The highlight was discovering you can add your Red Hat boxes to "configuration channels" on the Satellite so that they can automatically receive settings (such as DNS, NTP, etc) and also files and directory structures automatically. Given that the Red Hat infrastructure at my place will probably consist of 10 front end application servers with the same configuration in the future (with a clustered Oracle back end), this means a Satellite will save me a lot of work. For example, each time I wanted to add a new front end, I could just add it to the relevant configuration channel and it would get all of the files it needs automatically. In addition, any hotfixes and updates to the system would just need to be made once to the config on the satellite server, and then the changes could be pushed out to all 10 servers in one hit (or a new config could be created with the hotfix included, which would allow easy rollback to the old configuration in a few mouse clicks). RH Satellite also comes with 24/7 support and the option of professional services to get it set up, which all sounds very appealing.

The other 2 seminars of interest were an introduction to SELinux, including all the things I should have read about already but never got round to, and how to harden a Red Hat server against attacks, which was very handy for those that managed to make it through the dreary presentation. I will cover the highlights of that lecture in this blog (or maybe my Linux blog) in more detail at a later date.

Some pictures of the event are below. If you can't see them, please follow this link.

This SimpleViewer gallery requires Macromedia Flash. Please open it in your browser or get Macromedia Flash here.
This is a WPSimpleViewerGallery

Red Hat Summit 2008

RedHat LogoI've been given a fantastic opportunity to attend this years Red Hat Summit, being held in Boston next week. It's a 3 day event with opportunities to attend seminars, workshops and exhibitions, with a bit of socialising and networking thrown in as well. Hopefully I will come away from the event with some ideas on how my company's Red Hat infrastructure can be better managed and made more robust.

I feel lucky to have the chance to attend this at a time when work is so busy and home life is demanding - I will be leaving my wife at home with a 2 week old baby!

Whilst I'm there I will also be taking pictures and updating this blog with anything of interest.

Wordpress 2.5 wrecked K2 wrecked Wordpress

Just a quick post to try out the new WP 2.5 interface ... and also to say it completely wrecked the back-end of the blog since I use the K2 theme to manage some of my presentation settings. I was getting the following error, along with a bunch of other people on t'internet since upgrading Wordpress:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web778/web/wp-includes/widgets.php:1307) in /var/www/web778/web/wp-includes/pluggable.php on line 689

I surfed onto the K2 website and found a blog post 4 days old explaining this was fixed in the latest SVN release. Quick fix was to grab the SVN using:

svn checkout http://kaytwo.googlecode.com/svn/trunk/ kaytwo-read-only

Then trash the K2 directory on my Wordpress site and replace the files with the latest and greatest. It worked a treat for me. Actually my sidebar has stopped working now and all of my posts are 'uncatagorised' ... looks like I'll be going back to a default theme for now. I wonder if I can get my catagories back from a backup ...

How to migrate a VM using SCP

ESX Starter and Foundation editions do not provide a built in function to migrate a virtual machine to another ESX host. In the absence of these options, you can do this by logging on to the console operating system using Putty, and then using the SCP utility to copy the VM files. Then on the destination server, add the server to the inventory and mount the VM.

The software you need to do this is already installed on the source and destination server, but has to be enabled in the virtual infrastructure client first on both servers:

  • Log into VIC as root
  • Click on ESX Server in the tree (top level)
  • On the Security tab, click on Security (may be called Security Profile)
  • Click on the "Properties ..." link
  • Tick the boxes for SSH Client and SSH Server
  • Click OK

Log on to the destination server using Putty. We need to find out the real name of the data store directory.

ls /vmfs/volumes

It should look something like this:

View of /vmfs/volumes
View of /vmfs/volumes

The dark blue text is the real name of the directory. The light blue is a symbolic link to that directory. Make a note of the full path of the data store you want to migrate to, e.g:

/vmfs/volumes/47cd0bf3-b4b7eef9-5985-0017a4f6b9f1

Now log on to the source server using Putty.

  • Before you do anything, remember to shut down the guest VM you are copying
  • Navigate into your data store where the source VM is held, e.g:
cd /vmfs/volumes/ SERVERNAME\ Storage
  • Pull up the directory listing using ll (this is an alias of ls -l)
  • Again, make sure this VM is powered off
  • Use SCP to copy the whole directory to the destination server. The syntax is as follows below.
  • Note that your source_directory will typically be the name of your VM
  • Your destination is the name of your target ESX server
scp -r -C -o CompressionLevel=6 source_directory root@destination: /vmfs/volumes/data_store_name

Using compression is optional, but it will speed things up a bit. You can leave this bit out if you want: -C -o CompressionLevel=6

If you receive this message, say yes:

The authenticity of host 'server (10.11.2.120)' can't be established.
RSA key fingerprint is 49:04:65:6e:20:40:e0:fc:a6:75:14:10:bf:6e:a7:70.
Are you sure you want to continue connecting (yes/no)?

  • Once finished, log on to the destination ESX using VIC
  • On the summary tab browse the datastore where the VM was copied to
  • Right-Click on the vmx file and select 'Add to inventory'
  • Fill in the form with relevant values
  • Power up the VM and create a new identifier for the VM if prompted
  • Check if everything is working correctly
  • Backup the VM on the source server before deleting the files

Technorati Tags:

Vista: Run a script at shutdown

I wanted to configure my Vista Home Premium machine to run a script at shutdown, to synchronise "My Documents" to my file server. On my old XP workstation this was done by editing the local group policy and specifying a shutdown script, and then configuring PathSync (a nice free app) to sync the files to a remote location. The challenge this time is there is no local group policy editor on Vista Home premium.

Options
1. Install some software that modifies the shutdown routine
I didn't really want to do this. I've only had this machine a few weeks and want to keep it free of software that could mess things up. I also don't want to pay for a solution, if possible.

2. Windows registry editing
Every local group policy has a corresponding registry entry, so I wondered if in the absence of the group policy editor, I would just be able to create the relevant registry keys and values to run a script at shutdown. Microsoft kindly provide a list of group policies and where they are configured in the registry, so I downloaded it to have a look. Sadly I couldn't find what I needed in here.

I also wondered if I would just be able to export the existing key from my XP machine into Vista, I tried this but that didn't work either - looks like this was because it references the name of a local group policy, which of course didn't exist on my new machine.

3. Windows task scheduler
The Vista task scheduler is actually very good. You can schedule tasks to run when specific events are written to the event log, such as Event 4634 in the security log (Log Off). I tested and found this would actually work if I used the log off feature, but when shutting down, the OS does not wait for scheduled tasks to finish so it only gets to run for a few seconds.

4. Use a VBScript to sync and shutdown
This is how I've implemented this solution - for now. I've created a VB Script which brings up an "Are you sure you want to shutdown" dialog, if you click yes, it syncs to my remote machine and then shuts down. Then I created a shortcut to the script and added it to the quick launch buttons, next to the start menu button. As a final touch I changed the icon to the same power icon that Vista uses for shutdown.

Shutdown icon
Shutdown button

The snag is of course you have to remember to click on this button to shutdown if you want your documents to sync, if you forget and use the usual shutdown option on the start menu, you get no backup for that session. This also means that it doesn't sync when you reboot, and you also don't get the option to install Windows updates before the computer shuts down.

Anyway here is the script:

Set objShell = CreateObject("Wscript.Shell")
Set wshShell = WScript.CreateObject ("WSCript.shell")
strShutdown = "shutdown -s -t 0 -f"

Continue = MsgBox ("Are you sure you want to shutdown?",vbYesNo + VBCritical, "Shutdown computer")

If Continue = vbNo then

' Do nothing

Else

' This box will disappear after 5 seconds.
intReturn = objShell.Popup("The computer will now sync and shutdown.", 5, "Shutdown computer", VBInformation)

' Run synctoy - just change "MyDocs" to the name of your folder pair.
wshshell.run """c:Program FilesSyncToy 2.0 BetaSyncToyCmd.exe"" -RMyDocs", 6, True

' Shutdown the computer
objShell.Run strShutdown

End If

One slight annoyance is the SyncToy command prompt window opens minimised, but I can live with that for the moment. I tried a number of sync tools before settling with MS SyncToy. I did try using rsync which I thought may be a bit faster due to it's compatibility with Linux, but the scanning of the folders took forever.

Technorati Tags: , ,

Cheating with ESX Server Starter Edition

ESX Starter Edition is a standalone ESX server (i.e. no Virtual Centre), available at a lower cost than the ESX Infrastructure editions but missing some useful functions. Some of those functions are the ability to convert virtual machines to templates simply by right-clicking on them, and deploying VM templates with a single mouse click. With the Starter Edition this is how you can get around it:

Create template
Install and configure your virtual machine exactly how you want it. Give it a generic name like "TEMPLATE" and leave it in a workgroup. If your template is a Windows 2003 server "sysprep it" by following this article. Power your VM down and your template is now ready.

Deploy the template
This is how it works:

  • Create a new Windows 2003 VM, configure the disk to be as small as possible
  • After creation, edit the VM settings and delete the disk
  • Open an SSH session to the ESX server using Putty
    • cd /vmfs/volumes/ESXservername\ storage/TEMPLATE
  • Copy the VM disk to the new machine:
    • cp *.vmdk ../new_server_name
  • In VIC, edit the settings of the VM, add a new disk, point it to /storage/new_server_name/disk_file.vmdk
  • Boot the VM up run through sysprep
  • Let it run for about five minutes while sysprep takes place, set computer name and NIC details etc when prompted
  • The server will then restart.
  • The server is now ready and just needs to be joined to the domain.

The whole process should take no longer than half an hour.

Technorati Tags: ,