Solaris Live Upgrade on x4500
I’ve managed to upgrade the OS on our x4500 server from Solaris 10 06/06 to Solaris Express Developer Edition build 64 using Live Upgrade. Here’s the
entire process from beginning to end.
Before I initially set up the x4500, I had done a minimal amount of research on using Live Upgrade that suggested that it would be a really good idea to leave some empty space on my system’s boot disk. I made sure to do this during the initial configuration.
It’s also important to note that if you are running zones (Solaris virtual machines) and you are starting with Solaris 10 06/06 or earlier, you have to stop your zones, uninstall them and delete their configurations before you do a live upgrade. At some point after Solaris 10 06/06 this became unnecessary, but I don’t know which build number became capable of live upgrading a system with active non-root zones.
First, to see where we were at, I looked at the contents of
/etc/release, which were like this:
Solaris 10 6/06 s10x_u2wos_09a X86 Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 09 June 2006
That indicates the June 2006 release of Solaris 10.
Next, I needed to figure out which disk was the boot disk. The x4500 has an amazing 8 sata controllers, and 48 disks in it, most of which are part of a big giant zfs pool, but two of which are not, and one of those two on my system is the boot disk. To figure out the boot disk, I just ran the mount command and looked for the name of the disk holding the root partition, “/”. It turned out for some inexplicable reason to be c6t0d0s0.
Next, I needed to prepare another partition on the boot disk in the empty space I had prepared earlier (like a tv chef). I ran the format command to do
this. The session looked like this:
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl: 14652
Enter partition size[0b, 0c, 14652e, 0mb, 0gb]: 30gb
The parameter “new starting cyl” is the next cylinder after the highest occupied cylinder on your disk, ignoring the partition called backup, which doesn’t actually use the cylinders it seems to be using.
Now, there is a 30 GB partition called c6t0d0s3 ready and waiting for the Live Upgrade process.
Next, I had to patch the snot out of my server to get it right up to date with all the current patches. I used smpatch to do that, but you can also use the gui patch management console. There’s probably a more streamlined way to do it than I did, buy my way had the advantage that I could figure it out, and it worked. Here’s what I did:
smpatch analyze > list.sh
That puts a list of all patches that the patch management system thinks this machine should install into a file called
list.sh. I then edited
list.sh to remove all the descriptions of the patches so that it just contained patch numbers like 121119-12. I made each line into a command line for installing each patch number, so after editing the file looked like this:
smpatch upgrade -i 111111-11
smpatch upgrade -i 222222-22
smpatch upgrade -i 333333-33
Then I made the file executable by going
chmod +x list.sh and then ran it. It spent a long time installing patches and then completed nicely. I then rebooted the server by typing
Next, after the server rebooted, went to Sunsolve and looked up document #72099, which describes necessary patches for using Live Upgrade safely. I
downloaded them all for the x86/64 architecture, unzipped them, and applied them in order according to the document, using a shell script. Each line of
the shell script looked like this:
Once that completed, I rebooted again with
Next, after the server rebooted, I mounted the build 64 dvd iso and used it to install the Live Upgrade utilities from the version of Solaris that I was going to upgrade to. This is necessary for whatever version of Solaris you will be upgrading to. To mount an iso image, you do this:
lofiadm -a /data/solaris-dvd.iso
mount -F hsfs /dev/logi/1 /mnt
This will mount your dvd image at
/mnt. Next I used the
pkgrm command to remove the old versions of the Live Upgrade utilities and the
pkgadd command to add the new ones.
pkgadd -d /mnt/Solaris_11/Product SUNWlur
pkgadd -d /mnt/Solaris_11/Product SUNWluu
pkgadd -d /mnt/Solaris_11/Product SUNWluzone
Next I created a duplicate of my boot environment using
lucreate. I called the existing boot environment 0606 and the new one b64.
lucreate -c 0606 -n b64 -m /:/defv/dsk/c6t0d0s3:ufs
This takes a long time and essentially copies your boot environment onto the disk you specified. When it’s done you have a copy of your working environment that you can then upgrade, patch or whatever, while the system is running, without affecting your working conifguration.
Next, I used the
luupgrade command to upgrade my b64 boot environment to Solaris Express DE build 64 using my dvd image, which again was mounted at the
/mnt mount point.
luupgrade -u -n b64 -s /mnt/
This takes quite a while. After the first little while, a percent progress indicator shows up to tell you how it’s doing. When it’s done, you just have to activate the new boot environment and reboot, and you will be running your new version.
Once the server reboots, there is a new grub menu selection to boot the new environment. The new environment is the default so if you do nothing the server boots into the new version of Solaris. Once mine was done, I checked the
/etc/release file, and it said the following:
Solaris Nevada snv_64a X86 Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 18 May 2007
That indicates Solaris Express Developer Edition build 64, which is what I was hoping for. I also checked my customized services that I had configured in Solaris 10, and everything was still working, so the upgrade was successful.