[Return to Library] [Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


5    LSM Root and Swap Disk Mirroring

This chapter describes the Logical Storage Manager support for mirroring the root and swap partitions.

You can find additional information in the volencap(8), volintro(8), volrootmir(8), and volunroot(8) reference pages.

Refer to Chapter 14 for information about recovering after a failure of the boot disk and on issues with system reinstallation.


[Return to Library] [Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


5.1    Introduction to Root and Swap Mirroring

LSM provides the ability to encapsulate the partitions used for the root file system and swap partition to LSM volumes. The root and swap devices then appear to applications as volumes and provide the same mirroring characteristics as other LSM volumes.

Using LSM to mirror the root and swap volumes provides complete redundancy and recovery capability in the event of boot disk failure. By mirroring disk drives that are critical to booting, you ensure that no single disk failure will leave your system unusable.

Digital suggests you mirror the original boot disk using the volrootmir command, which causes LSM to mirror volumes created on the original boot disk onto another available disk. The volume that contains the root file system is referred to as the root volume ( rootvol). The volume that contains the primary swap area is referred to as the swap volume (swapvol).

Other volumes that you use for swap (secondary swap volumes) are treated as ordinary LSM volumes.

For information about creating secondary swap volumes, refer to Section 7.9. For more information on mirroring the boot disk, see Section 5.3.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.1.1    Root and Swap Usage Types

The following special usage types exist for root and swap volumes:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.1.2    Boot Disk Availability

LSM root and swap disk mirroring help you provide system availability by ensuring that you can boot the system despite certain errors. For example, booting can proceed even if errors occur when you start the swap volume. To do this, configure swap volumes so that all plexes of the volume are accessible as a swap device through normal disk drivers.

To boot the system despite the failure of the primary boot disk, you can boot the system using a disk containing the root and swap volume mirrors. See Section 5.3 for more information.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.2    Encapsulating the Root and Swap Partitions

You set up to mirror root and swap by first encapsulating the existing boot disk. Digital recommends that the root and swap partitions be encapsulated together. The steps for encapsulating the root file system are the same whether you are using UFS or AdvFS.

Refer to Section 14.6 if you have problems with this procedure. Refer to Section C.14 and Section C.15 for detailed examples.

Follow these steps to encapsulate the root and primary swap partitions:

  1. Verify that the following conditions are met before beginning the encapsulation process:

    LSM uses space from the swap area to create an LSM private region for the root disk. After the encapsulation process has finished, the swap area is smaller by the size of the private region (by default 1024 sectors).

  2. Execute the volencap utility on the root disk. Do not specify particular partitions; supply the name of the physical boot device, as follows:

    /usr/sbin/volencap rz0

    This command creates the necessary LSM command scripts to convert all the partitions contained on rz0 to LSM volumes. Note that you use the volencap command whether the root file system is a UFS or an AdvFS file system. This converts all in-use partitions on rz0 to LSM volumes.

  3. Enter the shutdown command with the reboot switch to execute the command scripts created by the volencap utility:

    shutdown -r +2

  4. As part of the root encapsulation, LSM automatically reboots the system twice to set up the LSM configuration. During the system reboot, watch the system console for error messages that indicate problems with the encapsulation process.

    During the first reboot, the following messages are displayed on the system console.

    vm_swap_init: warning /sbin/swapdefault swap device not found

    vm_swap_init: in swap over commitment node

    You can safely ignore these messages.

The names rootvol and swapvol are automatically assigned to the root volume and swap volume. Do not change these names. The root and swap volumes have the following specific minor device numbers:

As part of the encapsulation, LSM creates configuration files and changes the following system files and directories:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.3    Mirroring the Boot Disk

To maintain system availability, you must mirror the data important to running and booting your system. However, traditional LSM mirroring (described in Section 2.4), cannot be used to mirror the root disk. This is because mirroring, which is typically used to mirror data disks, cannot access some of the data required for a system reboot (such as the boot track). In addition, root disk mirroring is restricted such that the plexes on the mirrored disk must be accessible as root and swap partitions. Therefore, you must create a secondary root disk to make LSM continue to function if the boot disk fails.

The following list describes how to ensure that the secondary root disk has a boot track in the proper location and the root and swap partitions are accessible as partitions:


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.3.1    Mirroring rootvol and swapvol

To mirror the rootvol and swapvol volumes, you can use any of the following methods. Refer to Appendix C for detailed examples.

Example 5-1 shows how to add the the boot disk to LSM, on a system that has disks already under LSM control. In this example, you encapsulate rz0, which is the boot disk, and you use rz1 to mirror rz0. Note that this example also sets the default boot path so that the system first tries to boot from rz0 and, if that fails, from rz1.

Example 5-1: Mirroring the Boot Disk


volencap nconfig=0 rz0 [1]

shutdown -h +2  [2]
>>>  set bootdef_dev dka0 dka100  [3]
>>>  boot [4]
volrootmir -a rz1  [5]


  1. Encapsulate the entire boot disk. [Return to example]

  2. Shut down the system. [Return to example]

  3. At the console prompt, set dka0 as the primary boot device and dka100 as the alternate boot device. [Return to example]

  4. Reboot the system. [Return to example]

  5. Mirror the boot disk onto rz1. [Return to example]


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.3.2    Mirroring Other Volumes on the Root Disk

If you used the volrootmir command without the -a option, you mirrored only the root and swap partitions of the boot disk. In this case, the layout of the mirrored root disk partition is similar to the layout of the original root disk. For example, if the g and h partitions on the original root disk were in use for /usr and /usr/staff file systems, you can add the g and h partitions on the mirrored root disk to LSM. Then, you can add partitions g and h to LSM as nopriv disks, and mirror these partitions to obtain higher data availability for the /usr and /usr/staff file systems.

See Section 12.3.5 (mirroring using the graphical user interface) or Section 7.3.2 (mirroring using the command line interface), and the volassist(8) reference page for information about creating mirrors for existing volumes.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.4    Evacuating a Boot Disk

Because the data on the book disk in rootvol and swapvol must be accessed as partitions, you cannot use traditional methods to evacuate a disk or move a subdisk. Hence, you should not use volevac, volassist move, or volsd mv. Instead, perform one of the methods described in Section 5.3.1 to create a new mirror. Later, remove the plex on the disk to be evacuated, as described in Section 5.5.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


5.5    Removing Root and Swap Volume Mirrors

To remove mirrors associated with the root and swap volumes, enter the volplex disassociate command. For example:

volplex dis rootvol-01

volplex dis swapvol-01

..LP When you disassociate a plex from rootvol, you should also disassociate the corresponding plex from swapvol.

You can remove the last plex of the root and swap volumes only by using the volunroot utility, as described in Section 5.6.

Refer to voledit(8) for information about removing rootvol-01 and swapvol-01 from the rootdg disk group.


[Return to Library] [Contents] [Previous Chapter] [Previous Section] [Next Chapter] [Index] [Help]


5.6    Removing rootvol and swapvol

If you want the system to revert back to using UNIX partitions instead of LSM volumes for the root file system and primary swap partition, use the volunroot utility.

When volunroot is executed, the LSM configuration for rootvol and swapvol is removed, and the system is set up to use disk partitions for the root file system and the swap partition. When volunroot is executed with the -a option, it unencapsulates all volumes on the boot disk that map directly to a physical disk partition.

After executing volunroot, you must reboot the system, using the disk that was last used for rootvol and swapvol.

Note

Rebooting from the disk that was used for rootvol and swapvol may require that you first change the default boot device in the console.

The following considerations apply to using the volunroot utility:

Follow the steps shown here to execute the volunroot utility:

  1. Enter the following command:

    volunroot

    or

    volunroot -a

  2. Reboot the system, using the disk that was last used for rootvol and swapvol.

The volunroot utility performs the following actions: