Solstice DiskSuite 4.2.1 User's Guide

Removing Mirrors

This section describes how to remove mirrors from the system.

Removing a mirror that is used by a file system that cannot be unmounted--such as root (/), swap, /opt, or /usr--essentially involves "unmirroring" the file system and mounting it on the underlying slice of one of the submirrors making up the mirror. Refer to "How to Unmirror a File System That Cannot Be Unmounted (Command Line)".


Note -

To remove a mirror and keep the same metadevice name as the mount device, refer to "Metadevice Name Switching".


Preliminary Information for Removing Mirrors

How to Remove a Mirror and Submirrors (DiskSuite Tool)

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)".

  1. Make sure you have met the prerequisites ("Prerequisites for Removing DiskSuite Objects"), and have read the preliminary information ("Preliminary Information for Removing Mirrors").

  2. Make sure you have a current backup of the metadevice.

  3. Stop access to the metadevice.

    For example, a mirrored file system should be unmounted. For a non-UFS application, such as a database, perform the steps necessary to stop the application's use of the metadevice.

  4. Double-click the Mirror object in the Objects list.

    The mirror object appears on the canvas.

  5. Display the Mirror object's pop-up menu and choose Delete.

  6. Click the Really Delete button.

    The mirror is split into its underlying submirrors (Concat/Stripe metadevices).

  7. [Optional] If the mirror was used as a file system and there was an entry for the mirror in the etc/vfstab file, use one of the following to clean up the entry for the mirror.

    • You change the /etc/vfstab entry to mount the file system on one of the submirrors.

    • If one of the submirrors consists of a one-way concatenation, you can change the /etc/vfstab entry to mount the file system on the underlying slice.

    • If you do not plan on accessing the data anymore, you can remove the /etc/vfstab entry for the file system altogether.

  8. Clean up the Concat/Stripe objects.

    You should delete the submirror metadevice(s) that you no longer need.

  9. To verify that the objects were deleted, display the Configuration Log.

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.