Wednesday, September 16, 2009

Mirroring the System Disk in Solaris

Partition the secondary disk the same as the primary:
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2

Create the matadevices:
metadb –a –c 3 -f c0t0d0s7 c0t1d0s7

Initialize the root slices for both disks are as follows:
metainit -f d11 1 1 c0t0d0s0
metainit -f d12 1 1 c0t1d0s0


Create the meta device that will be the mirror:
metainit d10 -m d11

Create the root mirror:
metaroot d10

Do the similar procedure on the other disk partitions:
metainit d21 1 1 c0t0d0s1
metainit d22 1 1 c0t1d0s1
metainit d20 -m d21

*NOTE: Manually edit /etc/vfstab if mirroring the swap partition

REBOOT THE SYSTEM

metattach d10 d12
metattach d20 d22

No comments:

Post a Comment