Beyond Upgrades
The ability to create multiple BEs and populate them with live OE data provides greater flexibility for reacting to changing system or user needs with minimal downtime.
Performing Sidegrades
LU enables you to perform "sidegrades" (the large scale reorganization of the OE) with minimal impact to the user. This section details methods for using LU to perform sidegrades.
Over the course of time, the on-disk data of systems and OEs tend towards a state of greater disorder, as workarounds and special cases are implemented, and then never rearchitected to the site standard. Workarounds and special cases are usually left in place because the downtime to resolve them is not available. Using LU, you can reinforce a site standard for BEs on systems that have suffered at the hands of entropy and workarounds.
For example, consider a system installed with an undersized root (/) file system. If / is sized such that it is large enough for the initial installation of the OE, however, over the course of time, several patches are installed, the disk space requirements of the patches (and the space needed to save previous versions of the files) may cause / to become 100 percent full. To alleviate space constraints on /, it is common practice to move the contents of /var/sadm to a different file system (for example, /opt2/var/sadm), and then either create a symbolic link from /var/sadm to /opt2/var/sadm or mount /opt2/var/sadm on /var/sadm.
LU can be used to consolidate these seperate file systems back onto a single file system. Using the lucreate command, clone the current BE with a / that is large enough for future patch needs. Then, using the luactivate command, select the new BE and reboot when it is convenient.
The following example demonstrates the use of a sidegrade to consolidate a 2GB / (c0t0d0s0) and a 512MB /var (c0t0d0s3) onto a single 6GB / (c0t1d0s0).
barossa# df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 2056211 821519 1173006 42% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab /dev/dsk/c0t0d0s3 494235 7667 437145 2% /var swap 2489328 16 2489312 1% /var/run swap 2489328 16 2489312 1% /tmp barossa# lucreate -c "Solaris8-1001" \ > -m /:/dev/dsk/c0t1d0s0:ufs \ > -n "Solaris8-1001_Prime" Please wait while your system configuration is determined. No name for Current BE. Current BE is named <Solaris8-1001>. Creating initial configuration for primary BE <Solaris8-1001>. PBE configuration successful: PBE name <Solaris8-1001> PBE Boot Device </dev/dsk/c0t0d0s0>. Determining what file systems should be in the new BE. Searching /dev for possible BE filesystem devices Please wait while the configuration files are updated. Please wait. Configuration validation in progress... **************************************************************** Beginning process of creating Boot Environment <Solaris8-1001_Prime>. No more user interaction is required until this process is complete. **************************************************************** Setting BE <Solaris8-1001_Prime> state to Not Complete. Creating file systems on BE <Solaris8-1001_Prime>. Creating <ufs> file system on </dev/dsk/c0t1d0s0>. /dev/rdsk/c0t1d0s0: 12585752 sectors in 2671 cylinders of 19 tracks, 248 sectors 6145.4MB in 122 cyl groups (22 c/g, 50.62MB/g, 6208 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 103952, 207872, 311792, 415712, 519632, 623552, 727472, 831392, 935312, 1039232, 1143152, 1247072, 1350992, 1454912, 1558832, 1662752, 1766672, 1870592, 1974512, 2078432, 2182352, 2286272, 2390192, 2494112, 2598032, 2701952, 2805872, 2909792, 3013712, 3117632, 3221552, 3317280, 3421200, 3525120, 3629040, 3732960, 3836880, 3940800, 4044720, 4148640, 4252560, 4356480, 4460400, 4564320, 4668240, 4772160, 4876080, 4980000, 5083920, 5187840, 5291760, 5395680, 5499600, 5603520, 5707440, 5811360, 5915280, 6019200, 6123120, 6227040, 6330960, 6434880, 6538800, 6634528, 6738448, 6842368, 6946288, 7050208, 7154128, 7258048, 7361968, 7465888, 7569808, 7673728, 7777648, 7881568, 7985488, 8089408, 8193328, 8297248, 8401168, 8505088, 8609008, 8712928, 8816848, 8920768, 9024688, 9128608, 9232528, 9336448, 9440368, 9544288, 9648208, 9752128, 9856048, 9951776, 10055696, 10159616, 10263536, 10367456, 10471376, 10575296, 10679216, 10783136, 10887056, 10990976, 11094896, 11198816, 11302736, 11406656, 11510576, 11614496, 11718416, 11822336, 11926256, 12030176, 12134096, 12238016, 12341936, 12445856, 12549776, Mounting file systems for BE <Solaris8-1001_Prime>. Calculating required sizes of file systems for BE <Solaris8-1001_Prime>. Populating file systems on BE <Solaris8-1001_Prime>. Copying file system contents to BE <Solaris8-1001_Prime>. INFORMATION: Setting asynchronous flag on ABE <Solaris8-1001_Prime> mount point </.alt.4241/> file system type <ufs>. Copying of file system / directory </var> is in progress... Copying of file system / directory </var> completed successfully. Copying of file system / directory </> is in progress... Copying of file system / directory </> completed successfully. Creating compare database for file system </var>. Creating compare database for file system </>. Updating compare database on other BEs. Updating compare database on BE <Solaris8-1001_Prime>. Compare databases updated on all BEs. Making Boot Environment <Solaris8-1001_Prime> bootable. Making the ABE bootable. Updating ABE's /etc/vfstab file. The update of the vfstab file on the ABE succeeded. Updating ABE's /etc/mnttab file. The update of the mnttab file on the ABE succeeded. Updating ABE's /etc/dumpadm.conf file. The update of the dumpadm.conf file on the ABE succeeded. Making the ABE <Solaris8-1001_Prime> bootable succeeded. Setting BE <Solaris8-1001_Prime> state to Complete. Creation of Boot Environment <Solaris8-1001_Prime> successful. Creation of Boot Environment <Solaris8-1001_Prime> successful. barossa# luactivate Solaris8-1001_Prime **************************************************************** The target boot environment has been activated. It will be used when you reboot. NOTE: You must use either init or shutdown when you reboot. If you do not use one of these commands, 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. Enter the PROM monitor (ok prompt). 2. Boot the machine to Single User mode using a different boot device (like the Solaris Install CD or Network). Examples: At the PROM monitor (ok prompt): For boot to Solaris CD: boot cdrom -s For boot to network: boot net -s 3. Mount the Current boot environment root slice to some directory (like /mnt). You can use the following command to mount: mount -Fufs /dev/dsk/c0t0d0s0 /mnt 4. Run <luactivate> utility with out any arguments from the current boot environment root slice, as shown below: /mnt/sbin/luactivate 5. luactivate, activates the previous working boot environment and indicates the result. 6. Exit Single User mode and reboot the machine. **************************************************************** Activation of boot environment <Solaris8-1001_Prime> successful. barossa# lustatus BE_name Complete Active ActiveOnReboot CopyStatus ---------------------------------------------------------------- Solaris8-1001 yes yes no - Solaris8-1001_Prime yes no yes - barossa# init 6 INIT: New run level: 6 The system is coming down. Please wait. System services are now being stopped. Print services stopped. Dec 20 16:14:40 barossa syslogd: going down on signal 15 Live Upgrade: Deactivating current boot environment <Solaris8-1001>. Live Upgrade: Executing Stop procedures for boot environment <Solaris8-1001>. Live Upgrade: Current boot environment is <Solaris8-1001>. Live Upgrade: New boot environment will be <Solaris8-1001_Prime>. Live Upgrade: Activating boot environment <Solaris8-1001_Prime>. Live Upgrade: Updating partition ID tag on boot environment <Solaris8-1001_Prime> device </dev/rdsk/c0t1d0s2> to be root slice. fmthard: New volume table of contents now in place. Live Upgrade: Updating boot loader for <SUNW,UltraSPARC-IIi-cEngine> on boot environment <Solaris8-1001_Prime> device </dev/rdsk/c0t1d0s0> to match OS release. Live Upgrade: The boot device for boot environment <Solaris8-1001_Prime> will be </dev/dsk/c0t1d0s0>. Live Upgrade: Changing primary boot device to boot environment <Solaris8-1001_Prime>. Live Upgrade: The current boot environment <Solaris8-1001> boots from device <disk net>. Live Upgrade: The new boot environment <Solaris8-1001_Prime> boots from device <disk1:a disk:a>. Live Upgrade: Activation of boot environment <Solaris8-1001_Prime> completed. The system is down. INIT: failed write of utmpx entry:"s6" INIT: failed write of utmpx entry:"rb" syncing file systems... done rebooting... Resetting ... Netra t1 (UltraSPARC-IIi 360MHz), No Keyboard OpenBoot 3.10.24 ME, 512 MB memory installed, Serial #11659611. Ethernet address 8:0:20:8:16:73, Host ID: 80b21673. Initializing Memory Executing last command: boot Boot device: disk1:a File and args: SunOS Release 5.8 Version Generic_108528-11 64-bit Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved. configuring IPv4 interfaces: hme0. Hostname: barossa Configuring /dev and /devices Configuring the /dev directory (compatibility devices) The system is coming up. Please wait. Live Upgrade: Synchronizing new boot environment. Live Upgrade: Previous boot environment was <Solaris8-1001>. Live Upgrade: Current boot environment is now <Solaris8-1001_Prime>. starting rpc services: rpcbind done. Setting netmask of hme0 to 255.255.255.0 Setting default IPv4 interface for multicast: add net 224.0/4: gateway barossa syslog service starting. Print services started. volume management starting. The system is ready. barossa console login: root Password: Last login: Thu Dec 20 15:49:17 on console Dec 20 16:22:10 barossa login: ROOT LOGIN /dev/console Sun Microsystems Inc. SunOS 5.8 Generic February 2000 Enterprise Engineering Lab JumpStart OS installation date: Thursday December 20 15:45:14 PST 2001 barossa# df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t1d0s0 6196234 832525 5301747 14% / /proc 0 0 0 0% /proc fd 0 0 0 0% /dev/fd mnttab 0 0 0 0% /etc/mnttab swap 2493096 16 2493080 1% /var/run swap 2493096 16 2493080 1% /tmp |
After switching over to the Solaris8-1001_Prime BE and validating its functionality, the Solaris8-1001 BE may be deleted (using the ludelete command), as follows.
barossa# lustatus BE_name Complete Active ActiveOnReboot CopyStatus ---------------------------------------------------------------- Solaris8-1001 yes no no - Solaris8-1001_Prime yes yes yes - barossa# ludelete Solaris8-1001 Determining the devices to be marked free. Updating BE configuration database. Updating compare database. Updating compare database on other BEs. Updating BE configuration database on all BEs. Boot environment <Solaris8-1001> deleted. barossa# lustatus BE_name Complete Active ActiveOnReboot CopyStatus ---------------------------------------------------------------- Solaris8-1001_Prime yes yes yes - |
The disk space used by the Solaris8-1001 BE may now be reclaimed.