Pages

Thursday, September 8, 2011

How to delete mirror


You can delete your mirror device. It is very simple like the steps below.

  1. See your file system which is mounted from mirror device. For example you have filesystem /sample that is mounted from mirror device d1
    bash-3.00# df -h /sample
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d1 940M 1.0M 883M 1% /sample
  1. See your mirror configuration. In this example you can see there are a mirror called d1, with 2 submirrors called d11 and d12.
    bash-3.00# metasatt tat|more
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d12
State: Resyncing
Resync in progress: 2 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2048000 blocks (1000 MB)

d11: Submirror of d1
State: Okay
Size: 2048000 blocks (1000 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c3t2d0s0 0 No Okay Yes


d12: Submirror of d1
State: Resyncing
Size: 2048000 blocks (1000 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c3t3d0s0 0 No Okay Yes


Device Relocation Information:
Device Reloc Device ID
c3t3d0 Yes id1,sd@SATA_____VBOX_HARDDISK____VB5c17d304-00de27e4
c3t2d0 Yes id1,sd@SATA_____VBOX_HARDDISK____VB08da0d81-38b71174
  1. Unmount your filesystem
    bash-3.00# umount /sample
  2. Detach one of the submirror. For example you detach d12
    bash-3.00# metadetach d1 d12
    d1: submirror d12 is detached
  1. Delete your mirror and submirror device
    bash-3.00# metaclear -r d1
d1: Mirror is cleared
d11: Concat/Stripe is cleared
bash-3.00# metaclear d11 2
d12: Concat/Stripe is cleared

No comments:

Post a Comment