Mirroring a disk using Solstice Disksuite

The following is an unverified (as yet) procedure for mirroring two disks on a Solaris sparc using disksuite.

  1. Having installed disksuite, the first task is to produce the meta database replicas.
  2. Ensure you have a free partition of at least 2Mb to put our three (min) replicas on.
  3. Use the command metadb -c 3 -a -f /dev/dsk/c0t0d0s5 – assuming your free partition is c0t0d0s5
  4. Now we create metadevices for each parition on the source disk that we want to mirror.
  5. 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.
  6. e.g.
  7. /dev/md/dsk/d1 1 1 /dev/dsk/c0t0d0s1
  8. /dev/md/dsk/d2 1 1 /dev/dsk/c0t0d0s2
  9. Now save and exit and run the command "metainit -a".
  10. Disksuite should now have created two metadevices, d1 and d2, corresponding to partition 1 and partition 2.
  11. Having partitioned the second disk exactly as the first, we also create the metadevices for these.
  12. /dev/md/dsk/d11 1 1 /dev/dsk/c1t0d0s1
  13. /dev/md/dsk/d12 1 1 /dev/dsk/c1t0d0s2
  14. Again, save and exit and run "metainit -a" to create the new metadevices.
  15. Now we create two metamirrors, one for each source metadevice, again by editing md.tab as follows:-
  16. /dev/md/dsk/d51 -m /dev/md/dsk/d1
  17. /dev/md/dsk/d52 -m /dev/md/dsk/d2
  18. Save, exit and run metainit -a and you’ll have two new metamirrors attached to one submirror each.
  19. Now we can attach the two "blank" metadevices to the metamirrors with the command
  20. metattach d51 d11
  21. metattach d52 d12
  22. The disk will then sync automatically and your mirrors are working.