Solaris Volume Management (LVM), the earlier name was DiskSuite (SDS).
Basically it is an inflexible implementation, but works okay with UFS (which is also inflexible).
The Solaris roadmap sees ZFS replacing UFS. ZFS is flexible, faster than UFS, and has integrated volume management.
Short instruction to get a mirror on two bootable disks.
Install the OS on one disk, 2nd identical disk is unused.
Ensure there is no cold mirror in the crontab.
crontab -l | grep mirror
Ensure there is no swap on the 2nd disk.
swap -l
grep '^/dev.*swap' /etc/vfstab
Meta-DBs hold all configuration info (/etc/lvm.cf is a text file copy)
Have a partition (s7, smallest size, 13MB is enough) on the boot disk
If necessary, create one in format -> disk 0, partition
Identify the boot disk with
df -k /
It should show up as disk 0 in
format
Transfer the disk layout with format, disk -> 0 (with the OS),
partition, print
Note the layout.
Then quit, disk -> 1, partition, select -> original[0]
Check with print that it is identical, then label -> yes.
We have two redundant s7 partitions for the meta-DBs.
Assuming the two disks are c1t0d0 and c1t1d0,
install with
metadb -c 3 -a -f c1t0d0s7 c1t1d0s7
metadb
(Three replicas per partition.)
Create a sub-device d1 (concat/stripe) with the disk with the OS
metainit -f d1 1 1 c1t0d0s0
metastat
Create a one-way(yet degraded) mirror d0 on the sub-device
metainit d0 -m d1
metastat
Special treatment for bootable disk
metaroot d0
cat /etc/vfstab
tail /etc/system
reboot
Create a sub-device d2 (concat/stripe) on the 2nd disk
metainit d2 1 1 c1t1d0s0
metastat
Add the sub-device to the mirror d0
metattach d0 d2
metastat
(Resync is in progress...)
Wait until resync is ready.
For each additional OS partition s1,s3,...,s6 in /etc/vfstab
do
(example with s6):
Create a sub-device (concat/stripe) on the OS disk
metainit -f d61 1 1 c1t0d0s6
metastat d61
Create a one-way mirror
metainit d60 -m d61
metastat d60
Rename the corresponding entry in /etc/vfstab:
/dev/dsk/c1t0d0s6
to
/dev/md/dsk/d60
and
/dev/rdsk/c1t0d0s6
to
/dev/md/rdsk/d60
Verify /etc/vfstab contains no /c1t0d0 entry
reboot
For each d*0 device in /etc/vfstab
do
(example with d60)
Create a sub-device on the 2nd disk
metainit d62 1 1 c1t1d0s6
metastat d62
Attach it to the mirror
metattach d60 d62
metastat d60
Do not more than two resyncs in parallel.
Add "disk1" as an optional automatic boot device
eeprom boot-device
Example:
boot-device=disk net
Add disk1 after disk (and hope this alias works).
eeprom "boot-device=disk disk1 net"
eeprom boot-device
#to be sure prepare for recovery
ls -l /dev/dsk/c1t1d0s0 (get path for second path) such as
/sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a
and create an alias at OpenBootPrompt if it doesnt exist
ok nvalias disk1 /sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a
(or devalias disk1 /sbus@3,0/SUNW,fas@3,8800000/sd@1,0:a - depending on system)
check for correct swap device:
dumpadm