Solstice DiskSuite 4.2.1 User's Guide

Example -- Creating a Two-Way Mirror


# metainit -f d1 1 1 c1t0d0s0
d1: Concat/Stripe is setup
# metainit d2 1 1 c2t0d0s0
d2: Concat/Stripe is setup
# metainit d0 -m d1
d0: Mirror is setup
# umount /master
(Edit the /etc/vfstab file so that the file system references the mirror)
# mount /master
# metattach d0 d2
d0: Submirror d2 is attached

The -f option forces the creation of the first concatenation, d1, which contains the mounted file system /master on /dev/dsk/c1t0d0s0. The second concatenation, d2, is created from /dev/dsk/c2t0d0s0. (This slice must be the same size or greater than that of d1.) The metainit command with the -m option creates the one-way mirror, d0, from d1.

Next, /master is unmounted and its entry changed in the /etc/vfstab file to reference the mirror. For example, the following line:


/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 /master ufs 2 yes -

should be changed to:


/dev/md/dsk/d0 /dev/md/rdsk/d0 /master ufs 2 yes -

Finally, the /master file system is remounted and submirror d2 attached to the mirror, causing a mirror resync. (The system verifies that the concatenations and the mirror are set up, and that submirror d2 is attached.)