1. Make a backup of the following files
# cp /etc/vfstab /etc/vfstab.`date +'%d-%m-%Y'`
# metastat –c > /var/tmp/metastat-c.out
# metastat > /var/tmp/metastat.out
# metadb > /var/tmp/metadb.out
# cp /etc/system /var/tmp/system.`date +'%d-%m-%Y'`
# prtvtoc /dev/rdsk/c0t0d0s2 /var/tmp/prtvtoc-c0t0d0s2
In this procedure we will assume that /dev/dsk/c0t1d0 disk failed.
2. Check defective drive:
# iostat –En /dev/dsk/c0t1d0 [You will see errors]
c0t1d0 Soft Errors: 0 Hard Errors: 102 Transport Errors: 231
Vendor: SEAGATE Product: ST914602SSUN146G Revision: 0400 Serial No: 070490N5V8
Size: 146.80GB <146800115712 bytes>
Media Error: 20 Device Not Ready: 0 No Device: 82 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
# cfgadm –al
Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 disk connected configured unknown
c0::dsk/c0t1d0 disk connected configured unknown
# metastat –c [It will show that bad disk is in maintenance state]
d6 m 10GB d16 d26 (maint)
d17 s 10GB c0t0d0s6
d27 s 10GB c0t1d0s6 (maint)
d4 m 40GB d14 d24 (maint)
d14 s 40GB c0t0d0s4
d24 s 40GB c0t1d0s4 (maint)
d3 m 40GB d13 d23 (maint)
d13 s 40GB c0t0d0s3
d23 s 40GB c0t1d0s3 (maint)
d1 m 2.0GB d11 d21 (maint)
d11 s 2.0GB c0t0d0s1
d21 s 2.0GB c0t1d0s1 (maint)
d0 m 3.0GB d10 d20 (maint)
d10 s 3.0GB c0t0d0s0
d20 s 3.0GB c0t1d0s0 (maint)
d5 m 40GB d15 d25 (maint)
d15 s 40GB c0t0d0s5
d25 s 40GB c0t1d0s5 (maint)
3. Remove mirror information from bad disk
# metadb -d /dev/dsk/c0t1d0s7
# metadetach -f d5 d25
# metadetach -f d0 d20
# metadetach -f d1 d21
# metadetach -f d3 d23
# metadetach -f d4 d24
# metadetach -f d6 d26
# metaclear d25
# metaclear d20
# metaclear d21
# metaclear d23
# metaclear d24
# metaclear d26
4. Check the successful mirror reduction:
# metastat –c
# metadb
5. Unconfigure disk in Solaris
# cfgadm -c unconfigure c0::dsk/c0t1d0
6. Physically replace the disk online (No need to shutdown)
Note: Some older server (IDE Drives) require downtime as the HDD is not hot pluggable)
7. Configure new disk
# cfgadm -c configure c0::dsk/c0t1d0
8. Verify that disk is visible and there is no error
# echo | format [It will show you c0t1d0 disk]
# iostat –En /dev/dsk/c0t1d0
# cfgadm -al
9. Copy partition table from root disk [in this case we assume it is /dev/dsk/c0t0d0]
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
fmthard: New volume table of contents now in place.
10. Install boot block
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
11. Create state database replicas on new disk
# metadb –afc3 c0t1d0s7
12. Check that replicas created
# metadb [It should show you same number of replicas on both disks and on same slice]
13. Create meta devices on new disk
# metainit -f d20 1 1 c0t1d0s0
# metainit -f d21 1 1 c0t1d0s1
# metainit -f d23 1 1 c0t1d0s3
# metainit -f d24 1 1 c0t1d0s4
# metainit -f d25 1 1 c0t1d0s5
# metainit -f d26 1 1 c0t1d0s6
14. Create mirror or synchronize data on new disk
# metattach d0 d20
# metattach d5 d25
# metattach d1 d21
# metattach d3 d23
# metattach d4 d24
# metattach d6 d26
15. Check that mirror is sync’ing
# metastat –c [It will tell you how much data has been sync’ed on each slice]
No comments:
Post a Comment