Find it

Friday, July 31, 2009

Breaking root mirror in Sun Solaris

Few days back I posted notes on creating mirror for root and rest of the FS. It is equally important to know how to break them so thought of sharing this info.

Breaking root mirror

1. #metastat d0 [All d?0 devices should be present and 'Okay'.]

2. If breaking the root mirror (as in this example) do this:

#metaroot /dev/dsk/c0t0d0s0 # Alters /etc/system and /etc/vfstab; clean
# up (if desired) and update SunFiles.
# else do this:

vi /etc/vfstab # Change the vfstab line specifying the mirror
# metadevice to instead use the actual device path

3. De-attach

#metadetach -f d10 d20 # Detaches the master mirror, which represents
# the original mounted disk to mirror.

# NOTE: Before rebooting (next step) sanity check /etc/system and /etc/vfstab.
For /etc/system, make sure there is no uncommented 'rootdev' SDS
setting. For /etc/vfstab, make sure the device paths for '/' no longer
reference metadevices. System will not boot properly if metaroot did
not properly update these files.

#init 6

#metaclear -r d10 # Clears d10 and d30.
#metaclear d20 # Clears d20 (previously detached).
#metastat d10 # You should see no d?0 devices.

You done breaking root mirror.


  1. information very valid. But can understand bit experience persons.

    If you intersted give more detail(like taking example of 2 harddisks)

  2. Hi buddy,

    Thanks for the suggestion. I'll certainly try to write something which you mentioned. BTW - I write this blog for both communities experienced as well as freshers. So some of the information you may find little basic.