Solstice DiskSuite 4.2.1 User's Guide

How to Remove a Mirror and Submirrors (Command Line)

You can use this task for any file system or non-UFS application that uses a mirror, except for a file system that is root (/), swap, /opt, or /usr. To remove a mirror that is used by one of these file systems, refer to "How to Unmirror a File System That Cannot Be Unmounted (Command Line)".

The high-level steps for this procedure are:

Example -- Removing a Mirror, Keeping the Data on a Submirror

After checking the prerequisites ("Prerequisites for Removing DiskSuite Objects"), and the preliminary information ("Preliminary Information for Removing Mirrors"), use the metadetach(1M) and metaclear(1M) commands to delete the metadevice. Refer to the metadetach(1M) and metaclear(1M) man pages for more information.


# metastat d2
d2: Mirror
    Submirror 0: d0
      State: Okay
    Submirror 1: d1
      State: Okay
...
# umount /news
# metadetach d2 d0
# metaclear d2
d2: Mirror is cleared
(Edit the /etc/vfstab file so that /news references submirror d0)
# mount /news
# metaclear d1
d1: Concat/Stripe is cleared

This example clears the mirror d2 that also contains a mounted file system. The mirror consists of submirrors d0 and d1. The metastat command reports that both submirrors are in the "Okay" state. The file system must be unmounted before the metadetach command detaches submirror d0 from mirror d2. The mirror is then cleared.

To continue to access data on submirror d0, the entry for the file system in the /etc/vfstab file is changed from the mirror to the concatenation (submirror) d0.

After cleaning up the /etc/vfstab file to reference submirror (concatenation) d0, the file system is remounted. (It is remounted on d0.) The other submirror, d1, is cleared with the metaclear command.