1.-How to check the HW and Transport Errors
root@ # iostat -en---- errors ---
s/w h/w trn tot device
0 0 0 0 md/d20
0 0 0 0 md/d21
0 0 0 0 md/d25
0 0 0 0 md/d26
0 0 0 0 md/d60
0 0 0 0 md/d61
0 0 0 0 md/d65
0 0 0 0 md/d66
0 0 0 0 md/d80
0 0 0 0 md/d81
0 0 0 0 md/d85
0 0 0 0 md/d86
0 6 6 12 c0t1d0
0 0 0 0 c0t0d0
0 0 0 0 c0t3d0
0 0 0 0 c5t0d0
0 0 0 0 c5t1d0
3.-Verify the metadevices in maintenance
#metastatd20: Mirror
Submirror 0: d60
State: Okay
Submirror 1: d80
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 104862500 blocks (50 GB)d1: Submirror of d0
State: Needs maintenance
Invoke: metareplace d20 c1t0d0s0 <new device>
Size: 16780224 blocks (8.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Maintenance Yes
4.-You will need detach the metadevices in maintenance
root@ # metastat -c
d26 m 512MB d66 d86
d66 s 512MB c0t0d0s6
d86 s 512MB c0t1d0s6 (maint)
d25 m 164GB d65 d85
d65 s 164GB c0t0d0s5
d85 s 164GB c0t1d0s5 (maint)
d21 m 64GB d61 d81
d61 s 64GB c0t0d0s1
d81 s 64GB c0t1d0s1 (maint)
d20 m 50GB d60 d80
d60 s 50GB c0t0d0s0
d80 s 50GB c0t1d0s0 (maint)
#metadetach -f d20 d80
#metadetach -f d21 d81
#metadetach -f d25 d85
#metadetach -f d26 d86
5.-Clear or Delete las replicas detached
#metaclear d80#metaclear d81
#metaclear d85
#metaclear d86
6.-Delete metadb
#metadb -d /dev/rdsk/c0t1d0s7
6.-Unconfigure el disco del sistema operativo
root@# cfgadm -c unconfigure c0::dsk/c0t1d0
7.-Replace the disk broken
c0t1d0
8.-Execute devfsadm in order to discover the disk changed and cfgadm to see the disk discovered
----------------------------------------------#devfsadm (to discover new disk)
#cfgadm -alv (to see the new disk c0t1d0)
9.-If the step 8 fails enable the hotplug service and execute the commands again
# svcs -a | grep hotplug
disabled Jul_17 svc:/system/hotplug:default
# svcadm enable svc:/system/hotplug:default
# svcs -a | grep hotplug
online Jul_17 svc:/system/hotplug:default
#devfsadm (to discover new disk)
#cfgadm -alv (to see the new disk c0t1d0)
11.-Copy the new partition table
#prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
12.-Create metadb to the new disk
#metadb -a -c2 /dev/rdsk/c0t1d0s7
root@ # metadb -i
flags first blk block count
a m p luo 16 8192 /dev/dsk/c0t0d0s7
a p luo 8208 8192 /dev/dsk/c0t0d0s7
a p luo 16400 8192 /dev/dsk/c0t0d0s7
a u 16 8192 /dev/dsk/c0t1d0s7
a u 8208 8192 /dev/dsk/c0t1d0s7
a u 16400 8192 /dev/dsk/c0t1d0s7
13.- Create the metadevices deleted
#metainit d86 1 1 c0t1d0s0
#metainit d85 1 1 c0t1d0s1
#metainit d81 1 1 c0t1d0s5
#metainit d80 1 1 c0t1d0s6
14.-Attach mirror with submirror
metattach d26 d86
metattach d25 d85
metattach d21 d81
metattach d20 d80
15.-Check sync process
#while true; do metastat | grep "Resync in progress"; sleep 5;clear;done
16.-Install boot block in the new disk
#/usr/bin/installboot /usr/platform/`uname-i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
Comments