Sei sulla pagina 1di 2

Step By Step Procedure for Beginners to replace failed SCSI disk under SVM in Solaris First of all take

the backups of following (necessary): # metastat p >/var/tmp/metastat-p-b4repalcement # metastat t >/var/tmp/metastat-t-b4replacement # metadb i >/var/tmp/metadb-i-b4replacement # echo | format >/var/tmp/format-b4replacement # iostat en >/var/tmp/iostat-en-b4repalcement # ifconfig a >/var/tmp/ifconfig-a-b4repalcement 1. Identify the failed disk by following commands: # echo | format OR # iostat en or iostat En (for complete details regarding failed disk) OR # By identifying the logs (/var/adm/messages) & dmesg. 2. Run metadetach command to detach the failed disks submirrors (Break the mirror) # metastat -p, metastat -ac (for sol. 10) and metastat -t (for all sol. versions) --> to check the disk status, it will show the disk in maintenance state which is faulty. # metadetach -f <mirror> <submirror-of-failed-disk> -> -f for forcefully # metaclear <submirror-of-failed-disk> # metastat -p | grep i <failed disk> ---to check the submirrors has been cleared or not. 3. Delete the statedata base replica's of the failed disk: # metadb -i # metadb -d /dev/dsk/<failed disk with slice s7> # metadb -i | grep -i <failed disk> 4. Remove the hard drive from the device tree, type the following command: # cfgadm al # cfgadm c unconfigure c1::dsk/<failed-disk> 5. Verify the device has been removed from the device tree, type following command: # cfgadm al 6. Remove failed disk form the server and insert new disk. 7. Configure the new hard drive, type following command: # cfgadm c configure c1:dsk/<failed-disk> 8. Verify the device has been added to the device tree, type following command: # cfgadm -al 9. Check the disk status in the server by applying: # echo | format OR # iostat en If disk is not visible in the server apply devfsadm C command to reconfigure the attached devices, for reconfigure all disk apply:

# devfsadm C c disks # echo | format OR # iostat -en 10. Check the vtoc table for root disk and replaced disk, if not same then use fmthard (It would not be the same for the replaced disk). # prtvtoc /dev/dsk/<root disk with s2> # prtvtoc /dev/dsk/<replaced disk with s2> Copy the VTOC to the replaced disk: # prtvtoc /dev/dsk//<root disk with s2> | fmthard -s - /dev/rdsk/<replaced disk with s2> 11. Create the statedata base devices on replaced disk. # metadb -a -f -c 3 /dev/dsk/<replaced disk with slice s7> as s7 we have preserved for statedata base devices/replicas. 12. Reattach the mirrors and wait untill all mirrors will syncned. # metainit <submirror> 1 1 <disk partition----c#t#d#s#> # metattach <mirror> <submirror> to# metastat ac OR metastat t ---- check syncing status 13. Safe to run metadevadm command to update the new devID. # metadevadm -u <c#t#d#> ---> replaced disk (this command is mandatory else it would cost SVM databases to corrupted state and disk will show the status as faulty) metadevadm To update metadevice information.

Potrebbero piacerti anche