Use this procedure to unmirror a file system that can be unmounted while the system is running. To unmirror root (/), /opt, /usr, or swap, or any other file system that cannot be unmounted while the system is running. use the command line procedure on "How to Unmirror a File System That Cannot Be Unmounted (Command Line)".
After checking the prerequisites ("Prerequisites for Maintaining DiskSuite Objects"), and the preliminary information ("Preliminary Information for Mirrors"), use the metadetach(1M) and metaclear(1M) commands to unmirror a file system. For more information refer to the metadetach(1M) and metaclear(1M) man pages.
The high-level steps to unmirror a mirror are:
Running the metastat(1M) command to verify that at least one submirror is in the "Okay" state
Unmounting the file system
Running the metadetach(1M) command on the submirror that will continue to be used for the file system
Editing the /etc/vfstab file to use a nonmirror device, if the file system entry appears here
Remounting the file system
# metastat d4 d4: Mirror Submirror 0: d2 State: Okay Submirror 1: d3 State: Okay ... # umount /var # metadetach d4 d2 d4: submirror d2 is detached # metaclear -r d4 d4: Mirror is cleared d3: Concat/Stripe is cleared (Edit the /etc/vfstab file so that the entry for /var is changed from d4 to d2) # mount /var |
/var is made of a two-way mirror named d4; its submirrors are d2 and d3, made of slices /dev/dsk/c0t0d0s0 and /dev/dsk/c1t0d0s0, respectively. The metastat(1M) command verifies that at least one submirror is in the "Okay" state. (A mirror with no submirrors in the "Okay" state must be repaired first.) The file system is unmounted then submirror d2 is detached. The metaclear -r command deletes the mirror and the other submirror, d3.
Next, the entry for /var in the /etc/vfstab file is changed to reference the submirror. For example, if d4 were the mirror and d2 the submirror, the following line:
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 2 yes - |
should be changed to:
/dev/md/dsk/d2 /dev/md/rdsk/d2 /var ufs 2 yes - |
By using the submirror name, you can continue to have the file system mounted on a metadevice. Lastly, /var is remounted.
By using d2 instead of d4 in the /etc/vfstab file, you have unmirrored the mirror. Because d2 consists of a single slice, you can mount the file system on the slice name (/dev/dsk/c0t0d0s0) if you do not want the device to support a metadevice.