Mirroring boot disks with LSM |
This example assumes that you are setting up LSM for the first time on a
system and will only be mirroring the boot disk. This process requires two
system reboots. As a safety measure, it is recommend that a full system
backup be done before beginning this procedure.
The example below, assumes that the boot disk for the system is
currently "rz0" and will be mirrored on rz1.
1 # volsetup rz1
2 # volencap rz0
3 # shutdown -r +2
4 # voldctl add disk rz0
5 # voldg rmdisk rz1
6 # voldisk rm rz1
7 # voldctl rm disk rz1
8 # disklabel -rw rz1 rz26
9 # volrootmir rz1
10 # volencap rz0g
11 # shutdown -h +2
12 >>> set boodef_dev rz0 rz1
13 >>> boot
14 # disklabel -e rz1g
15 # voldisk init rz1g type=nopriv
16 # voldg adddisk rz1g
17 # voldctl add disk rz1
18 # volassist mirror vol-rz0g
- Set up the initial LSM infrastructure with the "volsetup"
command. Use "rz1" as a dummy device for the time being, since
the volsetup command requires at least one disk. This command creates
device files, starts the vold daemon, creates the /etc/vol/volboot
command, and creates the "rootdg" disk group.
- Encapsulate the root partition which is on rz0.
- Reboot the system.
- Add rz0 to the list of disks in the /etc/vol/volboot file.
- The next several steps are used to clean up after using rz1 as a
dummy device. First remove the disk rz1 from the rootdg disk group.
- Remove the rz1 disk access records from LSM control.
- Remove rz1 from the /etc/vol/volboot file.
- Restore the disk label for rz1 to a clean state. This command assumes
that the disk was of type "rz26". The actual disk type can be
obtained by using the "disklabel" command to display the
labeling for /dev/rrz1c.
- Create a mirror of the root and swap partitions on the rz1 disk.
- Encapsulate the rz0 disk's /usr partition, which we are assuming is
on rz0g in this example.
- Halt the system.
- At the console prompt, set rz0 as the primary boot device and rz1 as
the alternate boot device.
- Reboot the system.
- Modify the the disklabel for rz1 so that the partition g covers the
remainder of the disk if it doesn't allready do so.
- Place rz1g under LSM.
- Add rz1g to the root dg disk group.
- Add rz1 to the /etc/vol/volboot command.
- For the rz0 disk's /usr partition, create a mirrored volume called
vol-rz0g.
If your boot disk has additional partitions on the boot disk, repeat
steps 15,16, and 18 for the additional partitions.