# metainit -f d11 1 1 c0t0d0s1 d11: Concat/Stripe is setup # metainit d21 1 1 c1t0d0s1 d21: Concat/Stripe is setup # metainit d1 -m d11 d1: Mirror is setup (Edit the /etc/vfstab file so that swap references the mirror) # reboot ... # metattach d1 d21 d1: Submirror d21 is attached |
The -f option forces the creation of the first concatenation, d11, which contains the mounted file system swap on /dev/dsk/c0t0d0s1. The second concatenation, d21, is created from /dev/dsk/c1t0d0s1. (This slice must be the same size or greater than that of d11.) The metainit command with the -m option creates the one-way mirror d1 using the concatenation that contains swap. Next, if there is an entry for swap in the /etc/vfstab file, it must be edited to reference the mirror. For example, the following line:
/dev/dsk/c0t0d0s1 - - swap - no - |
should be changed to:
/dev/md/dsk/d1 - - swap - no - |
After a reboot, the second submirror d21 is attached to the mirror, causing a mirror resynchronization. (The system confirms that the concatenations and the mirror are set up, and that submirror d21 is attached.
To save the crash dump when you have mirrored swap, use the dumpadm command to configure the dump device as a volume. For instance, if the swap device is named /dev/md/dsk/d2, use the dumpadm command to set this device as the dump device.