Lets see how to replace a defective disk which is in 'Maintenance' state in SVM.
This is a hot swap in which the old failed disk is pulled out of the live system and a new disk is attached back into it. Before removing a disk, it must be un-configured from SVM.
The disk is part of a concatenated mirror. Six disks are organized as mirror with 3 disks forming a concatenation at each ends.
Mirror - d6
Sub-Mirror 1 - d15
Sub-Mirror 2 - d16
d 6
| |
| |
d15 | | d16
One of the failed disk is in the sub-mirror d16. To replace, we need to detach the sub-mirror, clear the sub-mirror, replace the disk, recreate the sub-mirror.
This is a hot swap in which the old failed disk is pulled out of the live system and a new disk is attached back into it. Before removing a disk, it must be un-configured from SVM.
The disk is part of a concatenated mirror. Six disks are organized as mirror with 3 disks forming a concatenation at each ends.
Mirror - d6
Sub-Mirror 1 - d15
Sub-Mirror 2 - d16
d 6
| |
| |
d15 | | d16
One of the failed disk is in the sub-mirror d16. To replace, we need to detach the sub-mirror, clear the sub-mirror, replace the disk, recreate the sub-mirror.
Step-1
$metadetach d6 d16
[Once detached, the logging device is no longer part of the trans, thus the trans is no longer logging and all benefits of logging are lost. Use the -f option if the device is busy. Use it only if the disk is in maintenance state]
$metadetach -f d6 d16
$metadetach d6 d16
[Once detached, the logging device is no longer part of the trans, thus the trans is no longer logging and all benefits of logging are lost. Use the -f option if the device is busy. Use it only if the disk is in maintenance state]
$metadetach -f d6 d16
Step-2
$metaclear d16
[The metaclear command deletes the specified metadevice or deletes all hotspares/soft partitions. Once cleared, we need to create again using metainit to be able to use again]
Step-3
Here the disk is pulled out and the new disk is inserted. Necessary un-configuration is done using cfgadm and after replacement, then action is taken to recognize the disk at oS level.
$cfgadm -al
Step-4
The new attached disk is now formatted similar to the opposite sub-mirrors configuartion.
$prtvtoc /dev/dsk/c2t1d0s2|fmthard -s - /dev/rdsk/c0t1d0s2
[Copy the VTOC from old disk to new using fmthard command]
Step-5
$metainit d16 3 1 c0t0d0s6 1 c0t1d0s2 1 c0t2d0s2
[Recreate the sub-mirror using metainit]
Step-6
$metattach d6 d16
[This reattaches the other sub-mirror and immediately starts the synchronization of data from the other sub-mirror]
Step-7
$metastat -C
[This checks the metadevice states]
No comments:
Post a Comment