This chapter provides examples of creating a boot environment, then upgrading and activating the new boot environment which then becomes the currently running system. This chapter contains the following sections:
Example of Upgrading With Solaris Live Upgrade (Command-Line Interface)
Example of Detaching and Upgrading One Side of a RAID 1 Volume (Mirror) (Command-Line Interface)
Example of Upgrading Using Solaris Live Upgrade (Character Interface)
In this example, a new boot environment is created by using the lucreate command on a system that is running the Solaris 7 release. The new boot environment is upgraded to the Solaris 9 release by using the luupgrade command. The upgraded boot environment is activated by using the luactivate command. An example of falling back to the original boot environment is also given.
Insert the Solaris DVD or Solaris Software 2 of 2 CD.
Follow the step for the media you are using.
If you are using the Solaris DVD, change directories to the installer and run the installer.
# cd /cdrom/cdrom0/Solaris_9/Tools/Installers # ./liveupgrade20 |
The Solaris Web Start installer is displayed.
If you are using the Solaris Software 2 of 2 CD, run the installer.
% ./installer |
The Solaris Web Start installer is displayed.
From the Select Type of Install panel, click Custom.
On the Locale Selection panel, click the language to be installed.
Choose the software to install.
For DVD, on the Component Selection panel, click Next to install the packages.
For CD, On the Product Selection panel, click Default Install for Solaris Live Upgrade and click on the other product choices to deselect this software.
Follow the directions on the Solaris Web Start installer panels to install the software.
The source boot environment is named c0t4d0s0 by using the -c option. Naming the source boot environment is only required when the first boot environment is created. For more information on naming using the -c option, see the description in Step 2.
The new boot environment is named c0t15d0s0. The -A option creates a description that is associated with the boot environment name.
The root (/) file system is copied to the new boot environment. Also, a new swap slice is created rather than sharing the source boot environment's swap slice.
# lucreate -A 'BE_description' -c c0t4d0s0 -m /:/dev/dsk/c0t15d0s0:ufs \ -m -:/dev/dsk/c0t15d0s1:swap -n c0t15d0s0 |
The inactive boot environment is named c0t15d0s0. The operating system image to be used for the upgrade is taken from the network.
# luupgrade -n c0t15d0s0 -u -s /net/ins-svr/export/Solaris_9 \ combined.solaris_wos |
The lustatus command reports if the boot environment creation is complete. lustatus also shows if the boot environment is bootable.
# lustatus boot environment Is Active Active Can Copy Name Complete Now OnReboot Delete Status ------------------------------------------------------------------------ c0t4d0s0 yes yes yes no - c0t15d0s0 yes no no yes - |
The c0t15d0s0 boot environment is made bootable with the luactivate command. The system is then rebooted and c0t15d0s0 becomes the active boot environment. The c0t4d0s0 boot environment is now inactive.
# luactivate c0t15d0s0 # init 6 |
Three procedures for falling back depend on your new boot environment activation situation:
The activation is successful, but you want to return to the original boot environment. See Example 38–1.
The activation fails and you can boot back to the original boot environment. See Example 38–2.
The activation fails and you must boot back to the original boot environment by using media or a net installation image. See Example 38–3.
In this example, the original c0t4d0s0 boot environment is reinstated as the active boot environment although it was activated successfully. The device name is first_disk.
# /usr/sbin/luactivate first_disk # init 6 |
In this example, the new boot environment was not bootable. You must return to the OK prompt before booting from the original boot environment, c0t4d0s0, in single-user mode.
OK boot net -s # /sbin/luactivate first_disk Do you want to fallback to activate boot environment c0t4d0s0 (yes or no)? yes # init 6 |
The original boot environment, c0t4d0s0, becomes the active boot environment.
In this example, the new boot environment was not bootable. You cannot boot from the original boot environment and must use media or a net installation image. The device is /dev/dsk/c0t4d0s0. The original boot environment, c0t4d0s0, becomes the active boot environment.
OK boot net -s # fsck /dev/dsk/c0t4d0s0 # mount /dev/dsk/c0t4d0s0 /mnt # /mnt/sbin/luactivate Do you want to fallback to activate boot environment c0t4d0s0 (yes or no)? yes # umount /mnt # init 6 |
This example shows you how to do the following tasks:
Create a RAID-1 volume (mirror) on a new boot environment
Break the mirror and upgrade one half of the mirror
Attach the other half of the mirror, the concatenation, to the new mirror
Figure 38–1 shows the current boot environment that contains three physical disks.
Create a new boot environment, second_disk, that contains a mirror.
The following command performs these tasks.
lucreate configures a UFS file system for the mount point root (/). A mirror, d10, is created. This mirror is the receptacle for the current boot environment's root (/) file system that is copied to the mirror d10. All data on the mirror d10 is overwritten.
Two slices, c0t1d0s0 and c0t2d0s0, are specified to be used as submirrors. These two submirrors are attached to mirror d10.
# lucreate -c first_disk -n second_disk \ -m /:/dev/md/dsk/d10:ufs,mirror \ -m /:/dev/dsk/c0t1d0s0:attach \ -m /:/dev/dsk/c0t2d0s0:attach |
Activate the second_disk boot environment.
# /usr/sbin/luactivate second_disk # init 6 |
Create another boot environment, third_disk.
The following command performs these tasks.
lucreate configures a UFS file system for the mount point root (/). A mirror, d20, is created.
Slice c0t1d0s0 is removed from its current mirror and is added to mirror d20. The contents of the submirror, the root (/) file system, are preserved and no copy occurs.
# lucreate -n third_disk \ -m /:/dev/md/dsk/d20:ufs,mirror \ -m /:/dev/dsk/c0t1d0s0:detach,attach,preserve |
Upgrade the new boot environment, third_disk, by installing a Solaris Flash archive. The archive is located on the local system. The operating systems versions for the -s and -a options are both Solaris 9 releases. All files are overwritten on third_disk except shareable files.
# luupgrade -f -n third_disk \ -s /net/installmachine/export/Solaris_9/OS_image \ -a /net/server/archive/Solaris_9 |
Activate the third_disk boot environment to make this boot environment the currently running system.
# /usr/sbin/luactivate third_disk # init 6 |
Delete the boot environment second_disk.
# ludelete second_disk |
The following commands perform these tasks.
Clear mirror d10.
Check for the number for the concatenation of c0t2d0s0.
Attach the concatenation that is found by the metastat command to the mirror d20. The metattach command synchronizes the newly attached concatenation with the concatenation in mirror d20. All data on the concatenation is overwritten.
# metaclear d10 metastat -p | grep c0t2d0s0 dnum 1 1 c0t2d0s0 metattach d20 dnum |
Is the number found in the metastat command for the concatenation
The new boot environment, third_disk, has been upgraded and is the currently running system. third_disk contains the root (/) file system that is mirrored.
Figure 38–2 shows the entire process of detaching a mirror and upgrading the mirror by using the commands in the preceding example.
Solaris Live Upgrade enables the creation of a new boot environment on RAID–1 volumes (mirrors). The current boot environment's file systems can be on any of the following:
A physical storage device
A Solaris Volume Manager controlled RAID–1 volume
A Veritas VXFS controlled volume
However, the new boot environment's target must be a Solaris Volume Manager RAID-1 volume. For example, the slice that is designated for a copy of the root (/) file system must be /dev/md/dsk/rootvol. rootvol is the volume that contains the root (/) file system.
In this example, the current boot environment contains the root (/) file system on a volume that is not a Solaris Volume Manager volume. The new boot environment is created with root (/) on the Solaris Volume Manager RAID-1 volume c0t2d0s0. The lucreate command migrates the current volume to the Solaris Volume Manager volume. The name of the new boot environment is svm_be. The lustatus command reports if the new boot environment is ready to be activated and be rebooted. The new boot environment is activated to become the current boot environment.
# lucreate -n svm_be -m /:/dev/md/dsk/d1:mirror,ufs \ -m /:/dev/dsk/c0t2d0s0:attach # lustatus # luactivate svm_be # lustatus # init 6 |
The following procedures take you through the three step process:
Creating the empty boot environment
Installing the archive
Activating the boot environment which then becomes the currently running boot environment.
The lucreate command creates a boot environment that is based on the file systems in the active boot environment. When using the lucreate command with the -s - option, lucreate quickly creates an empty boot environment. The slices are reserved for the file systems specified, but no file systems are copied. The boot environment is named, but not actually created until installed with a Solaris Flash archive. When the empty boot environment is installed with an archive, file systems are installed on the reserved slices. The boot environment is then activated.
In this first step, an empty boot environment is created. Slices are reserved for the file systems specified, but no copy of file systems from the current boot environment occurs. The new boot environment is named second_disk.
# lucreate -s - -m /:/dev/dsk/c0t1d0s0:ufs \ -n second_disk |
The boot environment is ready to be populated with a Solaris Flash archive.
Figure 38–3 shows the creation of an empty boot environment.
In this second step, an archive is installed on the second_disk boot environment that was created in the above example. The archive is located on the local system. The operating system versions for the -s and -a options are both Solaris 9 releases. The archive is named Solaris_9.flar.
# luupgrade -f -n second_disk \ -s /net/installmachine/export/Solaris_9/OS_image \ -a /net/server/archive/Solaris_9.flar |
The boot environment is ready to be activated.
In this last step, the second_disk boot environment is made bootable with the luactivate command. The system is then rebooted and second_disk becomes the active boot environment.
# luactivate second_disk # init 6 |
For step-by-step information about creating an empty boot environment, see To Create an Empty Boot Environment for a Solaris Flash Archive (Command-Line Interface).
For step-by-step information about creating a Solaris Flash archive, see Chapter 21, Creating Solaris Flash Archives (Tasks).
For step-by-step information about activating a boot environment or falling back to the original boot environment, see Failure Recovery: Falling Back to the Original Boot Environment (Command-Line Interface).
In this example, a new boot environment is created on a system that is running the Solaris 7 release. The new boot environment is upgraded to the Solaris 9 release. The upgraded boot environment is then activated.
Insert the Solaris DVD or Solaris Software 2 of 2 CD.
Run the installer for the media you are using.
If you are using the Solaris DVD, change directories to the installer and run the installer.
# cd /cdrom/cdrom0/Solaris_9/Tools/Installers # ./liveupgrade20 |
The Solaris Web Start installer is displayed.
If you are using the Solaris Software 2 of 2 CD, run the installer.
% ./installer |
The Solaris Web Start installer displays.
From the Select Type of Install panel, click Custom.
On the Locale Selection panel, click the language to be installed.
Choose the software to install.
For DVD, on the Component Selection panel, click Next to install the packages.
For CD, On the Product Selection panel, click Default Install for Solaris Live Upgrade and click on the other product choices to deselect the software.
Follow the directions on the Solaris Web Start installer panels to install the software.
In this example, the source boot environment is named c0t4d0s0. The root (/) file system is copied to the new boot environment. Also, a new swap slice is created rather than sharing the source boot environment's swap slice.
Display the character interface:
# /usr/sbin/lu |
From the main menu, select Create.
Name of Current Boot Environment: c0t4d0s0 Name of New Boot Environment: c0t15d0s0 |
Press F3.
From the Configuration menu, press F2 to display the Choices menu.
Choose slice 0 from disk c0t15d0 for root (/).
From the configuration menu, create a new slice for swap on c0t15d0 by selecting a swap slice to be split.
Press F2 to display the Choices menu.
Select slice 1 from disk c0t15d0 for the new swap slice.
Press F3 to create the new boot environment.
The operating system image is taken from the network for the upgrade.
From the main menu, select Upgrade.
Name of New Boot Environment: c0t15d0s0 Package Media: /net/ins3-svr/export/Solaris_9/combined.solaris_wos |
Press F3.
The c0t15d0s0 boot environment is made bootable. The system is then rebooted and c0t15d0s0 becomes the active boot environment. The c0t4d0s0 boot environment is now inactive.
From the main menu, select Activate.
Name of Boot Environment: c0t15d0s0 Do you want to force a Live Upgrade sync operations: no |
Press F3.
Press Return.
Type:
# init 6 |
If a fallback is necessary, use the command-line procedures in the previous example: Fall Back to the Source Boot Environment.