Tuesday, December 16, 2008

Live Upgrade from nv_103 to nv_104

So last week I managed to Live Upgrade my ufs root to a zfs root and it all worked fine.
This week with the release of nv_104 it's time to do a zfs Live Upgrade.
Needless to say it worked a treat.
Here's the pertinent output.

I downloaded the iso image and mounted it loopback - no need to burn DVDs;
[root] deckard:/ # lofiadm -a /data/solaris/sol10/sol-nv-b104-x86-dvd.iso
[root] deckard:/ # mount -F hsfs /dev/lofi/2 /mnt

Don't forget to add the new Live Upgrade packages before starting work;
[root] deckard:/ # pkgadd -d /mnt/Solaris_11/Product SUNWlucfg SUNWluu SUNWlur
[root] deckard:/ # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
ufs_nv_101 yes no no yes -
zfs_nv_103 yes yes yes no -
[root] deckard: # lucreate -n zfs_nv_104
Checking GRUB menu...
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment .
Source boot environment is .
Creating boot environment .
Cloning file systems from boot environment to create boot environment .
Creating snapshot for on .
Creating clone for on .
Setting canmount=noauto for in zone on .
Saving existing file in top level dataset for BE as //boot/grub/menu.lst.prev.
File propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE in GRUB menu
Population of boot environment successful.
Creation of boot environment successful.
[root] deckard:/ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 35.8G 106G 32.5K /rpool
rpool/ROOT 13.8G 106G 18K /rpool/ROOT
rpool/ROOT/zfs_nv_103 13.8G 106G 13.8G /.alt.zfs_nv_103
rpool/ROOT/zfs_nv_104 176K 106G 13.8G /tmp/.alt.luupdall.7317
rpool/dump 6.00G 106G 6.00G -
rpool/swap 16G 122G 4.89M -
[root] deckard:/mnt/Solaris_11 # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
ufs_nv_101 yes no no yes -
zfs_nv_103 yes yes yes no -
zfs_nv_104 yes no no yes -
[root] deckard:/root # luupgrade -u -n zfs_nv_104 -s /mnt

System has findroot enabled GRUB
No entry for BE in GRUB menu
Uncompressing miniroot
Copying failsafe kernel from media.
52023 blocks
miniroot filesystem is
Mounting miniroot at
Validating the contents of the media .
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains version <11>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE .
Checking for GRUB menu on ABE .
Saving GRUB menu on ABE .
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE .
Performing the operating system upgrade of the BE .
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Restoring GRUB menu on ABE .
Adding operating system patches to the BE .
The operating system patch installation is complete.
ABE boot partition backing deleted.
PBE GRUB has no capability information.
PBE GRUB has no versioning information.
ABE GRUB is newer than PBE GRUB. Updating GRUB.
GRUB update was successful.
Configuring failsafe for system.
Failsafe configuration is complete.
INFORMATION: The file on boot
environment contains a log of the upgrade operation.
INFORMATION: The file on boot
environment contains a log of cleanup operations required.
WARNING: <1> packages failed to install properly on boot environment .
INFORMATION: The file on
boot environment contains a list of packages that failed to
upgrade or install properly.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment . Before you activate boot
environment , determine if any additional system maintenance
is required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment is partially complete.
Installing failsafe
Failsafe install is complete.
[root] deckard:/root # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
ufs_nv_101 yes no no yes -
zfs_nv_103 yes yes yes no -
zfs_nv_104 yes no no yes -
[root] deckard:/root # luactivate zfs_nv_104
System has findroot enabled GRUB
Generating boot-sign, partition and slice information for PBE
WARNING: <1> packages failed to install properly on boot environment .
INFORMATION: on boot
environment contains a list of packages that failed to
upgrade or install properly. Review the file before you reboot the system
to determine if any additional system maintenance is required.

Generating boot-sign for ABE
Saving existing file in top level dataset for BE as //etc/bootsign.prev.
Generating partition and slice information for ABE
Copied boot menu from top level dataset.
Generating direct boot menu entries for PBE.
Generating xVM menu entries for PBE.
Generating direct boot menu entries for ABE.
Generating xVM menu entries for ABE.
Disabling splashimage
Re-enabling splashimage
No more bootadm entries. Deletion of bootadm entries is complete.
GRUB menu default setting is unaffected
Done eliding bootadm entries.

**********************************************************************

The target boot environment has been activated. It will be used when you
reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You
MUST USE either the init or the shutdown command when you reboot. If you
do not use either init or shutdown, the system will not boot using the
target BE.

**********************************************************************

In case of a failure while booting to the target BE, the following process
needs to be followed to fallback to the currently working boot environment:

1. Boot from Solaris failsafe or boot in single user mode from the Solaris
Install CD or Network.

2. Mount the Parent boot environment root slice to some directory (like
/mnt). You can use the following command to mount:

mount -Fzfs /dev/dsk/c0d0s0 /mnt

3. Run utility with out any arguments from the Parent boot
environment root slice, as shown below:

/mnt/sbin/luactivate

4. luactivate, activates the previous working boot environment and
indicates the result.

5. Exit Single User mode and reboot the machine.

**********************************************************************

Modifying boot archive service
Propagating findroot GRUB for menu conversion.
File propagation successful
File propagation successful
File propagation successful
Deleting stale GRUB loader from all BEs.
File deletion successful
File deletion successful
File deletion successful
Activation of boot environment successful.
[root] deckard:/root # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
ufs_nv_101 yes no no yes -
zfs_nv_103 yes yes no no -
zfs_nv_104 yes no yes no -
[root] deckard:/root # shutdown -y -g0 -i6

Shutdown started. Tuesday, 16 December 2008 18:46:49 GMT

Changing to init state 6 - please wait
Broadcast Message from root (pts/3) on deckard Tue Dec 16 18:46:49...
THE SYSTEM deckard IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged

updating /platform/i86pc/amd64/boot_archive
updating /platform/i86pc/boot_archive
propagating updated GRUB menu


When rebooted it all looked fine. Happy days!!

[root] deckard:/root # lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
ufs_nv_101 yes no no yes -
zfs_nv_103 yes no no yes -
zfs_nv_104 yes yes yes no -

No comments:

Post a Comment