This chapter describes the Solaris Live Upgrade process.
This book uses the term slice, but some Solaris documentation and programs might refer to a slice as a partition.
Solaris Live Upgrade provides a method of upgrading a system while the system continues to operate. While your current boot environment is running, you can duplicate the boot environment, then upgrade the duplicate. Or, rather than upgrading, you can install a Solaris Flash archive on a boot environment. The original system configuration remains fully functional and unaffected by the upgrade or installation of an archive. When you are ready, you can activate the new boot environment by rebooting the system. If a failure occurs, you can quickly revert to the original boot environment with a simple reboot. This switch eliminates the normal downtime of the test and evaluation process.
Solaris Live Upgrade enables you to duplicate a boot environment without affecting the currently running system. You can then do the following:
Upgrade a system.
Change the current boot environment's disk configuration to different file system types, sizes, and layouts on the new boot environment.
Maintain numerous boot environments with different images. For example, you can create one boot environment that contains current patches and create another boot environment that contains an Update release.
Some understanding of basic system administration is necessary before using Solaris Live Upgrade. For background information on system administration tasks such as managing file systems, mounting, booting, and managing swap, see the System Administration Guide: Basic Administration.
The process of creating a boot environment provides a method of copying critical file systems from an active boot environment to a new boot environment. The disk is reorganized if necessary, file systems are customized, and the critical file systems are copied to the new boot environment.
Solaris Live Upgrade distinguishes between two file system types: critical file systems and shareable file systems. Critical file systems are required by the Solaris operating environment. These file systems are separate mount points in the vfstab of the active and inactive boot environments. Examples are root (/), /usr, /var, or /opt. These file systems are always copied from the source to the inactive boot environment. Critical file systems are sometimes referred to as non-shareable. Shareable file systems are user-defined files such as /export that contain the same mount point in the vfstab in both the active and inactive boot environments. Therefore, updating shared files in the active boot environment also updates data in the inactive boot environment. When you create a new boot environment, shareable file systems are shared by default. But you can specify a destination slice and then the file systems are copied. For more detailed information about shareable file systems, see Guidelines for Selecting Slices for Shareable File Systems.
Swap is a special shareable file system. Like a shareable file system, all swap slices are shared by default. But, if you specify a destination directory for swap, the swap slice is copied. For procedures on reconfiguring swap, see the following:
“To Create a Boot Environment (Character Interface)” Step 9
Solaris Live Upgrade can create a boot environment with RAID-1 volumes (mirrors) on file systems. For an overview, see Creating a Boot Environment With Mirrored File Systems.
The process of creating a new boot environment begins by identifying an unused slice where a critical file system can be copied. If a slice is not available or a slice does not meet the minimum requirements, you need to format a new slice.
After the slice is defined, you can reconfigure the file systems on the new boot environment before the file systems are copied into the directories. You reconfigure file systems by splitting and merging them, which provides a simple way of editing the vfstab to connect and disconnect file system directories. You can merge file systems into their parent directories by specifying the same mount point. You can also split file systems from their parent directories by specifying different mount points.
After file systems are configured on the inactive boot environment, you begin the automatic copy. Critical file systems are copied to the designated directories. Shareable file systems are not copied, but are shared. The exception is that you can designate some shareable file systems to be copied. When the file systems are copied from the active to the inactive boot environment, the files are directed to the new directories. The active boot environment is not changed in any way.
For procedures about splitting and merging file systems, see the following procedures:
For an overview of creating a boot environment with mirrored file systems, see Creating a Boot Environment With Mirrored File Systems.
The following figures illustrate various ways of creating new boot environments.
Figure 30–1 shows that critical file system root (/) has been copied to another slice on a disk to create a new boot environment. The active boot environment contains root (/) on one slice. The new boot environment is an exact duplicate with root (/) on a new slice. The file systems /swap and /export/home are shared by the active and inactive boot environments.
Figure 30–2 shows critical file systems that have been split and have been copied to slices on a disk to create a new boot environment. The active boot environment contains root (/) on one slice. On that slice, root (/) contains the /usr, /var, and /opt directories. In the new boot environment, root (/) is split and /usr and /opt are put on separate slices. The file systems /swap and /export/home are shared by both boot environments.
Figure 30–3 shows critical file systems that have been merged and have been copied to slices on a disk to create a new boot environment. The active boot environment contains root (/), /usr, /var, and /opt with each file system on their own slice. In the new boot environment, /usr and /opt are merged into root (/) on one slice. The file systems /swap and /export/home are shared by both boot environments.
Solaris Live Upgrade uses Solaris Volume Manager technology to create a boot environment that can contain mirrored file systems. Solaris Volume Manager provides a powerful way to reliably manage your disks and data by using volumes. Solaris Volume Manager enables concatenations, stripes, and other complex configurations. Solaris Live Upgrade enables a subset of these tasks, such as creating a RAID-1 volume for the root (/) file system.
A volume can group disk slices across several disks to transparently appear as a single disk to the operating environment. Solaris Live Upgrade is limited to creating a boot environment for the root (/) file system that contains single-slice concatenations inside a RAID-1 volume (mirror). This limitation is because the boot PROM is restricted to choosing one slice from which to boot.
When creating a boot environment, you can use Solaris Live Upgrade to manage the following tasks.
Detach a single-slice concatenation (submirror) from a RAID-1 volume (mirror). The contents can be preserved to become the content of the new boot environment if necessary. Because the contents are not copied, the new boot environment can be quickly created. After the submirror is detached from the original mirror, the submirror is no longer part of the mirror. Reads and writes on the submirror are no longer performed through the mirror.
Create a boot environment that contains a mirror.
Attach a maximum of three single-slice concatenations to the newly created mirror.
To use the mirroring capabilities of Solaris Live Upgrade, you must create a least one state database and at least three state database replicas. A state database stores information on disk about the state of your Solaris Volume Manager configuration. The state database is a collection of multiple, replicated database copies. Each copy is referred to as a state database replica. When you copy the state database, you protect against data loss from single points of failure. For procedures about creating a state database, see “State Database (Overview)” in Solaris Volume Manager Administration Guide.
You use the lucreate command with the -m option to create a mirror, detach submirrors, and attach submirrors for the new boot environment.
For procedures, see To Create a Boot Environment With RAID-1 Volumes (Mirrors) (Command-Line Interface).
For in-depth information about other complex Solaris Volume Manager configurations that are not supported if using Solaris Live Upgrade, see “Storage Management Concepts” in Solaris Volume Manager Administration Guide.
A state database stores information on disk about the state of your Solaris Volume Manager configuration. The state database is a collection of multiple, replicated database copies. Each copy is referred to as a state database replica. The state database tracks the location and status of all known state database replicas.
state database replica
A copy of a state database. The replica ensures that the data in the database is valid.
A group of physical slices or other volumes that appear to the system as a single logical device. A volume is functionally identical to a physical disk in the view of an application or file system. In some command-line utilities, a volume is called a metadevice.
Table 30–2 shows the components that Solaris Live Upgrade can manage.Table 30–2 Classes of Volumes
A class of volume that replicates data by maintaining multiple copies. A RAID-1 volume is sometimes called a mirror. A RAID-1 volume is composed of one or more RAID-0 volumes that are called submirrors.
A class of volume that can be a stripe or a concatenation. These components are also called submirrors. A stripe or concatenation is the basic building blocks for mirrors.
A RAID-1 volume. See RAID-1 volume.
A RAID-0 volume. If slices are concatenated, the data is written to the first available slice until that slice is full. When that slice is full, the data is written to the next slice, serially. A concatenation provides no data redundancy unless it is contained in a mirror.
See RAID-0 volume.
Figure 30–4 shows a new boot environment with a RAID-1 volume (mirror) that is created on two physical disks. The following command created the new boot environment and the mirror.
# lucreate -n second_disk -m /:/dev/md/dsk/d30:mirror,ufs \ -m /:c0t1d0s0,d31:attach -m /:c0t2d0s0,d32:attach \ -m -:c0t1d0s1:swap -m -:c0t2d0s1:swap
This command performs the following tasks:
Creates a new boot environment, second_disk.
Creates a mirror d30 and configures a UFS file system.
Creates a single-device concatenation on slice 0 of each physical disk. The concatenations are named d31 and d32.
Adds the two concatenations to mirror d30.
Copies the root (/) file system to the mirror.
Configures files systems for swap on slice 1 of each physical disk.
Figure 30–5 shows a new boot environment that contains a RAID-1 volume (mirror). The following command created the new boot environment and the mirror.
# lucreate -n second_disk -m /:/dev/md/dsk/d20:ufs,mirror \ -m /:/dev/dsk/c0t1d0s0:detach,attach,preserve
This command performs the following tasks:
Creates a new boot environment, second_disk.
Breaks mirror d10 and detaches concatenation d12.
Preserves the contents of concatenation d12 and file systems are not copied.
Creates a new mirror d20. You now have two one-way mirrors d10 and d20.
Attaches concatenation d12 to mirror d20.
After you have created a boot environment, you can perform an upgrade on the boot environment. As part of that upgrade, the boot environment can contain RAID-1 volumes (mirrors) for any file systems. The upgrade does not affect any files in the active boot environment. When you are ready, you activate the new boot environment, which then becomes the current boot environment.
For procedures about upgrading a boot environment, see Chapter 33, Upgrading With Solaris Live Upgrade (Tasks).
For an example of upgrading a boot environment with mirrored file systems, see Example of Detaching and Upgrading One Side of a Mirror.
Figure 30–6 shows an upgrade to an inactive boot environment.
Rather than an upgrade, you can install a Solaris Flash archive on a boot environment. The Solaris Flash installation feature enables you to create a single reference installation of the Solaris operating environment on a system. This system is called the master system. Then, you can replicate that installation on a number of systems that are called clone systems. In this situation, the inactive boot environment is a clone. When you install the Solaris Flash archive on a system, the archive replaces all the files on the existing boot environment as an initial installation would.
For procedures on installing a Solaris Flash archive, see Installing Solaris Flash Archives on a Boot Environment.
Figure 30–7 shows an installation of a Solaris Flash archive on an inactive boot environment.
When you are ready to switch and make the new boot environment active, you quickly activate the new boot environment and reboot. Files are synchronized between boot environments the first time that you boot a newly created boot environment. “Synchronize” means that certain system files and directories are copied from the last-active boot environment to the boot environment being booted. When you reboot the system, the configuration that you installed on the new boot environment is active. The original boot environment then becomes an inactive boot environment.
For procedures about activating a boot environment, see Activating a Boot Environment.
For information about synchronizing the active and inactive boot environment, see Synchronizing Files Between Boot Environments.
Figure 30–8 shows a switch after a reboot from an inactive to an active boot environment.
If the new boot environment cannot be booted
If the new environment boots but does not work completely
If you are not satisfied with the results
The use of fallback takes only the time to reboot the system, which is much quicker than backing up and restoring the original. The new boot environment that failed to boot is preserved. The failure can then be analyzed. You can only fall back to the boot environment that was used by luactivate to activate the new boot environment.
You fall back to the previous boot environment the following ways:
If the new boot environment boots successfully, but you are not happy with the results, you run the luactivate command with the name of the previous boot environment and reboot.
If the new boot environment does not boot, you boot the fallback boot environment in single-user mode and run the luactivate command and reboot.
If you cannot boot in single-user mode, do one of the following:
Boot from DVD or CD media or a net installation image.
Mount the root (/) file system on the fallback boot environment.
Run the luactivate command and reboot.
For procedures to fall back, see Failure Recovery: Falling Back to the Original Boot Environment (Command-Line Interface).
Figure 30–9 shows the switch that is made when you reboot to fallback.
You can also do various maintenance activities such as checking status, renaming, or deleting a boot environment. For maintenance procedures, see Chapter 34, Maintaining Solaris Live Upgrade Boot Environments (Tasks).