Setup a SVM mirror in Solaris 10

Part Tag Flag Cylinders Size Blocks
0 root wm 70 – 1143 8.23GB (1074/0/0) 17253810
1 swap wu 3 – 69 525.56MB (67/0/0) 1076355
2 backup wm 0 – 1170 8.97GB (1171/0/0) 18812115
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 home wm 1144 – 1170 211.79MB (27/0/0) 433755
8 boot wu 0 – 0 7.84MB (1/0/0) 16065
9 alternates wu 1 – 2 15.69MB (2/0/0) 32130

Partition 0 is /
Partition 1 is swap
Partition 8 is /boot
Partition 9 is where metadevice state database

metadb -a -f -c3 /dev/dsk/c0d0s9

# metainit -f d12 1 1 c0d0s0

# metainit -f d12 1 1 c0d0s1

# metainit -f d12 1 1 c0d0s8

# metastat -p

# metainit d10 -m d12

# metaroot d10

# metainit d20 -m d22

# metainit d30 -m d32

# shutdown -y -g0 -i6

Then create the metadevices for the other side of the mirror and attach them

metainit -f d11 1 1 c0d1s0
metainit -f d21 1 1 c0d1s1
metainit -f d31 1 1 c0d1s8

metattach d10 d11
metattach d20 d21
metattach d30 d31

metadb -a -f -c3 /dev/dsk/c0d1s9