# metainit -f d1 1 1 c1t0d0s0 d1: Concat/Stripe is setup # metainit d2 1 1 c1t1d0s0 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/c1t1d0s0. (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, the entry for the file system should be changed in the /etc/vfstab file to reference the mirror. For example, the following line:
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 /var ufs 2 yes - |
should be changed to:
/dev/md/dsk/d0 /dev/md/rdsk/d0 /var ufs 2 yes - |
Finally, the file system is remounted and submirror d2 is attached to the mirror, causing a mirror resynchronization. The system confirms that the RAID 0 and RAID 1 volumes are set up, and that submirror d2 is attached.