Use this task to unmirror file systems, including root (/), /usr, /opt, and swap, that cannot be unmounted during normal system operation.
- Make sure that you have root privilege and that you have a current backup of all data.
- Verify that at least one submirror is in the Okay state.
- Detach the submirror that will continue to be used for the file system.
- Use one of the following commands, depending the file system you want to unmirror:
- For the /usr, /opt, or swap file systems, change the file system entry in the /etc/vfstab file to use a non-Solaris Volume Manager device (slice).
- For the root (/) file system only: run the metaroot command.
- Reboot the system.
- Clear the remaining mirror and submirrors.
# metastat mirror
# metadetach mirror submirror
# metaroot rootslice
# reboot
# metaclear -r mirror
# metastat d0
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 40541184 blocks (19 GB)
d10: Submirror of d0
State: Okay
Size: 40541184 blocks (19 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes
d20: Submirror of d0
State: Okay
Size: 40541184 blocks (19 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Okay Yes
# metadetach d0 d20
d0: submirror d20 is detached
# metaroot /dev/dsk/c0t0d0s0
# reboot
# metaclear -r d0
d0: Mirror is cleared
d10: Concat/Stripe is cleared
# metaclear d20
d20: Concat/Stripe is cleared
Example Unmirroring the swap File System
# metastat d1
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d21
State: Okay
# metadetach d1 d21Edit the /etc/vfstab file to change the entry for swap from metadevice to slice name
d1: submirror d21 is detached
# vi /etc/vfstabIn this example, the /etc/vfstab file contains the following entry for the swap file system:
/dev/md/dsk/d1 - - swap - no -Change the entry to read as follows:
/dev/dsk/c0t0d0s1 - - swap - no -
# reboot
# metaclear -r d1
d1: Mirror is cleared
d11: Concat/Stripe is cleared
# metaclear d21
d21: Concat/stripe is cleared