Mirroring a disk using Solstice Disksuite
The following is an unverified (as yet) procedure for mirroring two disks on a Solaris sparc using disksuite.
- Having installed disksuite, the first task is to produce the meta database replicas.
- Ensure you have a free partition of at least 2Mb to put our three (min) replicas on.
- Use the command metadb -c 3 -a -f /dev/dsk/c0t0d0s5 – assuming your free partition is c0t0d0s5
- Now we create metadevices for each parition on the source disk that we want to mirror.
- Edit the md.tab file, in my example I want to mirror /dev/dsk/c0t0d0s1 and /dev/dsk/c0t0d0s2 onto the second disk at c1t0d0.
- e.g.
- /dev/md/dsk/d1 1 1 /dev/dsk/c0t0d0s1
- /dev/md/dsk/d2 1 1 /dev/dsk/c0t0d0s2
- Now save and exit and run the command "metainit -a".
- Disksuite should now have created two metadevices, d1 and d2, corresponding to partition 1 and partition 2.
- Having partitioned the second disk exactly as the first, we also create the metadevices for these.
- /dev/md/dsk/d11 1 1 /dev/dsk/c1t0d0s1
- /dev/md/dsk/d12 1 1 /dev/dsk/c1t0d0s2
- Again, save and exit and run "metainit -a" to create the new metadevices.
- Now we create two metamirrors, one for each source metadevice, again by editing md.tab as follows:-
- /dev/md/dsk/d51 -m /dev/md/dsk/d1
- /dev/md/dsk/d52 -m /dev/md/dsk/d2
- Save, exit and run metainit -a and you’ll have two new metamirrors attached to one submirror each.
- Now we can attach the two "blank" metadevices to the metamirrors with the command
- metattach d51 d11
- metattach d52 d12
- The disk will then sync automatically and your mirrors are working.