Back to the main page

SVM Maintenance

Attaching/Detaching submirror

As you saw in  the docs  (about creating SVM RAID1), there is command metattach that works like:

# metattach d4 d24  (attach submirror to mirror)
Or
# metattach d40 c1t1d0s5  (attach slice to stripe)

Whit metattach, resync of new submirror starts automatically. 

Sometimes you need to do opposite, to de-attach submirror. 

#  metadetach d4 d24 

This breaks mirror permanently. 

Placing submirror offline/online

This is now different story, since placing submirror offline does not breaks mirror design. 

With metaoffline, SVM stops reading/writing to submirror that have been taken offline. 
During this time all writes are kept track of. Once submirror is back online, data will be resynchronized. 

# metaoffline d4 d24
d4: submirror d24 is offlined
But offline submirror can still be mounted as read-only (like here mount to /.1). This can be used if you want to backup data from submirror (/.1), but note that now you don't have redundancy on d4.
/dev/md/dsk/d4    2055643    2195 1991779     1%    /.0
/dev/md/dsk/d24   2055643    2195 1991779     1%    /.1 (read-only)
Offline submirror is back online with command metaonline and with machine reboot.
# metaonline d4 d24
d4: submirror d24 is onlined

Replacing components of submirror or metadevice of RAID5

Two states will require component replacement: Last Erred and Maintenance. Always replace maintenance state component first. 

Let's try example - check your mirror
# metastat d4
d4: Mirror
    Submirror 0: d14
      State: Okay
    Submirror 1: d24
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 4195944 blocks (2.0 GB)

d14: Submirror of d4
    State: Okay
    Size: 4195944 blocks (2.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s4          0     No            Okay   No

d24: Submirror of d4
    State: Okay
    Size: 4195944 blocks (2.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t1d0s4          0     No            Okay   No

Device Relocation Information:
Device   Reloc  Device ID
c1t0d0   No     -
c1t1d0   No     -
Say we want to replace slice in submirror d24.
# metareplace d4 c1t1d0s4 c1t1d0s5
d4: device c1t1d0s4 is replaced with c1t1d0s5
See what we have now, there is resync in progress
# metastat d4
d4: Mirror
    Submirror 0: d14
      State: Okay
    Submirror 1: d24
      State: Resyncing
    Resync in progress: 3 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 4195944 blocks (2.0 GB)

d14: Submirror of d4
    State: Okay
    Size: 4195944 blocks (2.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t0d0s4          0     No            Okay   No

d24: Submirror of d4
    State: Resyncing
    Size: 4195944 blocks (2.0 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c1t1d0s5          0     No       Resyncing   No

Device Relocation Information:
Device   Reloc  Device ID
c1t0d0   No     -
c1t1d0   No     -
Back to the main page