Tuesday, September 22, 2009

Solaris Live Upgrade

Never tried Live Upgrade, and my first attempt was a disaster -- now that's not to say it doesn't work, but my configuration didn't lend itself to the perfect Live Upgrade process. I had non-global zones mounted from SAN volumes on /zones and when I ran Live Upgrade I didn't realize that I needed to size my system for that and add in additional SAN volumes to copy the non-global zones as well.

The other major problem was that I didn't have all of the correct patches for Live Upgrade and ran into a major ludelete bug that when run deleted files in /zones and destroyed my non-global zones.

So, now that I realize the issues, here are the command that I used. The logic is sound and I've since rebuilt the server and put the non-global zones on the root filesystem so that when I try Live Upgrade again I won't be bitten by these issues.

I added a second san volume that's the same size as server's current boot volume.

1) copy over the Solaris 10 iso and mount it via loopback:

# mkdir /iso; mount -F hsfs -o ro `lofiadm -a /var/tmp/sol-10-u6-ga1-sparc-dvd.iso` /iso

2) format the new volume:

c2t6000D31000089A000000000000000043d0s0 existing root volume
c2t6000D31000089A0000000000000000E9d0s0 new root volume

3) patch the live upgrade distribution

SunSolve document: 206844:


3) install the live upgrade packages from the distribution:

# cd /iso/Solaris_10/Tools/Installers
# ./liveupgrade20 -noconsole -nodisplay

4) run the lucreate command to create a copy ofthe active boot environment

# lucreate -c sol10807 -n sol101008 -m /:c2t6000D31000089A0000000000000000E9d0s0:ufs

[where sol10807 is the name of the original boot disk and sol101008 is the name for the new boot disk]


5) after the new boot disk is created, the upgrade is run against the new boot disk:

# luugrade -u -n sol101008 -s /iso

6) after the upgrade is done, activate the new boot environment:

# luactivate sol101008

7) init 6

8) test the new boot environment and patch it

9) after testing remove the initial boot environment with the ludelete command, but save the original SAN volume for future upgrades.

In the future I could run patches using Live Upgrade.


Check out this SUN article.