How To Replace A Failed SVM Disk - Solaris Commands

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

How To Replace A Failed SVM Disk | Solaris Commands

Solaris Commands
Commands and how-to tips for the Solaris admin
Home
Backup

Transcend 32 GB Class 10... TRANSCEND New $22.62

AmazonBasics USB A to Li... AmazonBasics New $14.99

About Us
Disk

Privacy Policy

Terms

Contact Us
Process System Controller Posts

Search

Network

Operating System

Comments

How To Replace A Failed SVM Disk


0 Tweet 0 Sh Share LikeLike

Recent Posts
How To Upgrade The M4000 XSCF Firmware How To Create A Live Upgrade Boot Environment
2

How To Configure The M4000 XSCF How To Change The IP Address Of A Sun T5120 System Controller How To Configure sendmails Smart Relay Host

Before you replace (what you believe is) a failed Solaris Volume Manager (SVM) disk, you need to establish whether it has indeed failed or is still in the process of failing. Why is it important to determine if an SVM disk has failed? It could save you a little time replacing a failed SVM disk as opposed to a failing one. ReadHow To Tell The Difference Between A Failed Disk And A Failing Disk to find out which one your disk is. If your disk hasnt quite failed yet, this article will show you How To Replace A Failing SVM Disk. Now that you have established that you do have a failed SVM disk, find out if the disk contains SVM metadatabase replicas and delete them. Assuming that the failed disk is c1t1d0.

N w

# metadb | grep c1t1d0 W p l W p l W p l # # metadb -d c1t1d0s7 # # metadb flags a m p luo a p luo a p luo #

16 8208 16400

8192 8192 8192

/dev/dsk/c1t1d0s7 /dev/dsk/c1t1d0s7 /dev/dsk/c1t1d0s7

Ca

Solaris 10 System Administration Ess... Solaris System Eng... Best Price $22.42 or Buy New $33.74

Privacy Information

first blk 16 8208 16400 block count 8192 8192 8192 /dev/dsk/c1t0d0s7 /dev/dsk/c1t0d0s7 /dev/dsk/c1t0d0s7

Pu

Unix in a Nutshell, Fourth Edition Arnold Robbins Best Price $9.37 or Buy New $22.30

Unconfigure the failed SVM disk

# cfgadm -al Ap_Id c0 c0::dsk/c0t0d0 c1 c1::dsk/c1t0d0 c1::dsk/c1t1d0 c1::dsk/c1t2d0 c1::dsk/c1t3d0 c2 c3 c3::5006016239a02018 c3::5006016b39a02018 c3::5006048452a70c17 c3::5006048c52a70c07 c4 c4::5006016339a02018 c4::5006016a39a02018 c4::5006048452a70c18 c4::5006048c52a70c08 usb0/1 usb0/2 usb1/1 usb1/2 # Type scsi-bus CD-ROM scsi-bus disk disk disk disk scsi-bus fc-fabric disk disk disk disk fc-fabric disk disk disk disk unknown unknown unknown unknown Receptacle connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected empty empty empty empty Occupant configured configured configured configured configured configured configured unconfigured configured configured configured configured configured configured configured configured configured configured unconfigured unconfigured unconfigured unconfigured Condition unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown ok ok ok ok

Privacy Information

UNIX System Administration Handbook ... Evi Nemeth, Garth ... Best Price $0.04 or Buy New

Privacy Information

# cfgadm -c unconfigure c1::dsk/c1t1d0

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

How To Replace A Failed SVM Disk | Solaris Commands cfgadm: Component system is busy, try again: failed to offline: Resource -----------------/dev/dsk/c1t1d0s2 # Information ------------------------Device being used by VxVM

Note: This host uses SVM to manage internal disks and Veritas Volume Manager (VxVM) to manage SAN attached disks. VxVM keeps track of the internal disks even if it doesnt actually manage them and may not allow you to unconfigure them. To get around this restriction, you may need to forcibly unconfigure the failed SVM disk by specifying the -f parameter to cfgadm.

# cfgadm -f -c unconfigure c1::dsk/c1t1d0 # # cfgadm -al Ap_Id Type c0 scsi-bus c0::dsk/c0t0d0 CD-ROM c1 scsi-bus c1::dsk/c1t0d0 disk c1::dsk/c1t1d0 disk c1::dsk/c1t2d0 disk c1::dsk/c1t3d0 disk c2 scsi-bus c3 fc-fabric c3::5006016239a02018 disk c3::5006016b39a02018 disk c3::5006048452a70c17 disk c3::5006048c52a70c07 disk c4 fc-fabric c4::5006016339a02018 disk c4::5006016a39a02018 disk c4::5006048452a70c18 disk c4::5006048c52a70c08 disk usb0/1 unknown usb0/2 unknown usb1/1 unknown usb1/2 unknown #

Receptacle connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected connected empty empty empty empty

Occupant configured configured configured configured unconfigured configured configured unconfigured configured configured configured configured configured configured configured configured configured configured unconfigured unconfigured unconfigured unconfigured

Condition unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown ok ok ok ok

Verify that the failed SVM disk is marked unconfigured as above. Sun servers with hot-swappable disks will also have the disks blue ready to remove LED lit. Pull the failed SVM disk out of the drive bay and insert the new disk. The following message will come up in /var/adm/messages.

Jul 20 14:46:09 eap52 rmclomv: [ID 978967 kern.error] DISK @ HDD1 has been inserted.

Configure the new disk.

# cfgadm -c configure c1::dsk/c1t1d0 # # cfgadm -al Ap_Id Type c0 scsi-bus c0::dsk/c0t0d0 CD-ROM c1 scsi-bus c1::dsk/c1t0d0 disk c1::dsk/c1t1d0 disk c1::dsk/c1t2d0 disk c1::dsk/c1t3d0 disk c2 scsi-bus c3 fc-fabric c3::5006016239a02018 disk c3::5006016b39a02018 disk

Receptacle connected connected connected connected connected connected connected connected connected connected connected

Occupant configured configured configured configured configured configured configured unconfigured configured configured configured

Condition unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown unknown

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

How To Replace A Failed SVM Disk | Solaris Commands c3::5006048452a70c17 c3::5006048c52a70c07 c4 c4::5006016339a02018 c4::5006016a39a02018 c4::5006048452a70c18 c4::5006048c52a70c08 usb0/1 usb0/2 usb1/1 usb1/2 # disk disk fc-fabric disk disk disk disk unknown unknown unknown unknown connected connected connected connected connected connected connected empty empty empty empty configured configured configured configured configured configured unknown unknown unknown unknown unknown unknown

configured unknown unconfigured ok unconfigured ok unconfigured ok unconfigured ok

Verify that the new disk has been configured as above. Copy the volume table of contents (VTOC) from the other disk in the mirror set, c1t0d0, onto the new disk.

# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2 fmthard: New volume table of contents now in place. #

If prtvtoc returns with an error similar to this, /dev/rdsk/c1t1d0s2: Cannot get disk geometry, you will need to run format to label the disk.

# format Searching for disks...done c1t1d0: configured with capacity of 72.36GB AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN72G cyl 14087 alt /pci@1f,700000/scsi@2/sd@0,0 1. c1t1d0 <SUN72G cyl 14087 alt /pci@1f,700000/scsi@2/sd@1,0 2. c1t2d0 <SUN72G cyl 14087 alt /pci@1f,700000/scsi@2/sd@2,0 3. c1t3d0 <SUN72G cyl 14087 alt /pci@1f,700000/scsi@2/sd@3,0 Specify disk (enter its number): 1 selecting c1t1d0 [disk formatted] Disk not labeled. Label it now? y

2 hd 24 sec 424> 2 hd 24 sec 424> 2 hd 24 sec 424> 2 hd 24 sec 424>

FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name ! - execute , then return quit format> q #

Recreate the metadatabase replicas on the new disk.

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

How To Replace A Failed SVM Disk | Solaris Commands

# metadb -a -c 3 c1t1d0s7 # # metadb flags a m a a a a a # p p p luo luo luo u u u first blk 16 8208 16400 16 8208 16400 block count 8192 8192 8192 8192 8192 8192 /dev/dsk/c1t0d0s7 /dev/dsk/c1t0d0s7 /dev/dsk/c1t0d0s7 /dev/dsk/c1t1d0s7 /dev/dsk/c1t1d0s7 /dev/dsk/c1t1d0s7

Update the new disks device ID entry in SVM. This step may not be required but its a good idea to do it just in case.

# metadevadm -u c1t1d0 Updating Solaris Volume Manager device relocation information for c1t1d0 Old device reloc information: id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA New device reloc information: id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA #

Enable the submirrors on the replacement disk. Start with the swap partition as this wont affect any data in case SVM runs into a problem. You may enable the submirrors in the new disk in parallel or in sequence. If the I/O load on the system is heavy then do it in sequence. Otherwise, enable the submirrors in parallel.

# metareplace -e d1 c1t1d0s1 d1: device c1t1d0s1 is enabled solaris_1# metastat d1 d1: Mirror Submirror 0: d11 State: Okay Submirror 1: d21 State: Resyncing Resync in progress: 0 % done Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 10491456 blocks (5.0 GB) d11: Submirror of d1 State: Okay Size: 10491456 blocks (5.0 GB) Stripe 0: Device Start Block Dbase c1t0d0s1 0 No d21: Submirror of d1 State: Resyncing Size: 10491456 blocks (5.0 GB) Stripe 0: Device Start Block Dbase c1t1d0s1 0 No

State Reloc Hot Spare Okay Yes

State Reloc Hot Spare Resyncing Yes

Device Relocation Information: Device Reloc Device ID c1t0d0 Yes id1,sd@SFUJITSU_MAW3073NCSUN72G_000707B0KHT4____DAN0P720KHT4 c1t1d0 Yes id1,sd@THITACHI_HUS103073FL3800_V3X6MDDA #

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

How To Replace A Failed SVM Disk | Solaris Commands SVM will resync the submirrors as soon as they are enabled. This is done in the background and may take a fair amount of time depending on the size of the submirrors. Now is a good time to go for a cup of coffee. Dont forget to check the progress of the resync when you return.

Tweet

0 S

Share

LikeLike

12 comments - What do you think?


Posted by
Ariel Giron - 25 February 2011 at 3:59 pm Categories:
Disk Tags:
disk replacement, failed svm disk, replace disk, solaris volume manager, svm

12 Responses to How To Replace A Failed SVM Disk


penchalaiah says:

31 July 2011 at 3:54 pm

yes very interesting to learn these steps.our feedback is excellent.whos having in L1 position this steps are very helpfull.
Thank you..
Reply

rocky says:

3 August 2011 at 2:21 am

Excellent Explanation!
Reply

prince says:

4 December 2011 at 3:14 pm

Thanks Very good


Reply

Rama says:

23 December 2011 at 6:15 pm

Excellent
Reply

Saroj says:

6 January 2012 at 3:23 am

This is the proper way to follow in replacing the SVM corrupted Disk. My Rating to this Awesome.
Reply

siva says:

19 March 2012 at 11:07 pm

Good and Clear explanation.


Reply

Ewaz ali says:

2 April 2012 at 10:18 pm

This is one of the best guide I have ever found, this is very helpful. thank you very much!
Reply

Vishwa says:

4 May 2012 at 3:39 pm

Osm !!! Really nice explanation . Kindly update the same steps for VXVM Disk Replacement. Pls send the documents to this id : vel.sunsol@gmail.com So that i can learn lot
Reply

Pramod says:

17 May 2012 at 6:56 am

This is very nice explanation.


Reply

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

How To Replace A Failed SVM Disk | Solaris Commands

leyakath says:

17 May 2012 at 12:56 pm

Good Explanation..with complete screen shots! Thank you so much to posted this information
Reply

sun says:

8 June 2012 at 3:23 am

very good explanation.


Reply

Balkumar_UNIX says:

26 August 2012 at 11:31 pm

Very nice. Thnx


Reply

Leave a Comment

Name (required)
Mail (will not be published) (required)
Website

Submit Comment

Copyright 2011 filodownunder.com

WordPress Theme by HeatMapTheme.com

http://www.solariscommands.com/disk/how-to-replace-a-failed-svm-disk/[13/10/2013 12:21:50 a. m.]

You might also like