Você está na página 1de 3

HARDWARE REPLACEMENTS DISK REPLACEMENT The various scenarios of a disk replacement are as listed below: Scenario 2: The root

disk that needs to be replaced and is configured under Solaris Volume Manager. The metadevices show in Need Maintenance. Once we are sure and confirm for that the disk needs replacement, as only a reseating can also resolve issue at times. Cases where reseating helps for sure is, when you can only see transport errors and no hard or soft errors, in the output of iostat En. Also the drive shows as <not available> in the format output. Example: bash-3.00$ iostat -En
c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 252 Vendor: FUJITSU Product: MAY2073RCSUN72G Revision: 0501 Serial No: 0705S08CW1 Size: 73.40GB <73400057856 bytes>

If we are confirm for the disk replacement the following steps need to be followed: Considering a situation as below, where the metadevices are showing in Needs Maintenance, where the disk c0t0d0 needs replacement.
AVAILABLE DISK SELECTIONS: 0. c0t0d0 <drive not available> /pci@1c,600000/scsi@2/sd@0,0 1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1c,600000/scsi@2/sd@1,0 2. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@2,0 3. c0t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@3,0 Specify disk (enter its number): bash-3.00$ metastat d101 p d100 p d50 m d51 s d52 s d80 m d81 s d82 s d40 m d41 s d42 s d30 m d31 s d32 s -acq 50GB 6.0GB 56GB 56GB 56GB 68GB 68GB 68GB 2.0GB 2.0GB 2.0GB 4.0GB 4.0GB 4.0GB d50 d50 d51 (maint) d52 c0t0d0s5 (maint) c0t1d0s5 d81 d82 c0t2d0s0 c0t3d0s0 d41 (maint) d42 c0t0d0s4 (maint) c0t1d0s4 d31 (maint) d32 c0t0d0s3 (maint) c0t1d0s3

d10 d0

d11 d12 d1 d2

m s s m s s

2.0GB 2.0GB 2.0GB 4.0GB 4.0GB 4.0GB

d11 (maint) d12 c0t0d0s1 (maint) c0t1d0s1 d1 (maint) d2 c0t0d0s0 (maint) c0t1d0s0

Before we begin with the replacement Step 1: Check if the disk is a hot swap. Step 2: Take necessary backups (formost O/P of command format) Step 3: The devices that show in maintenance (Submirror) need to be detached from there mirrors.
#metadetach #metadetach #metadetach #metadetach #metadetach d50 d51 d40 d41 d30 d31 d10 d11 d0 d1 #metadetach <mirror> <bad submirror>

Note: To run all the above commands you would require sudo privileges. Step 4: Once all are detached, check by command
#metastat p

Step 5: Clear all the metadevices detached from the mirrors


#metaclear d51 d41 d31 d11 d1

Step 6: Check for the status of state databases replicas they are also showing errors. After deleting the metadevices, delete the replicas.
#metadb d c0t0d0s7

Once the replicas are deleted, ask the FE to do a hot swap for the disk incase it is a hot swap disk. When replacement is done Step 7: Check the size, no. of cylinders, drive type by running the format command. The new drive should match the already existing mirror drive. Once this is confirmed as, Example:
AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1c,600000/scsi@2/sd@0,0 1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248> /pci@1c,600000/scsi@2/sd@1,0 2. c0t2d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@2,0 3. c0t3d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424> /pci@1c,600000/scsi@2/sd@3,0 Specify disk (enter its number):

Here the drives c0t0d0 and c0t1d0 are the mirror for each other. Once the drive is detected they would look as above example. Step 8: The new disk drive would not have partitions and we would require to copy the VTOC of the ok disk to the new one.
#prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2

**Slice 2 is used as it symbolizes the entire disk. Step 9: Verify the above by running format command and checking for partitions made. Step 10: Create the State database replicas on the new disk first.
#metadb c a /dev/dsk/c0t0d0s7 (Use the same slice to create replicas as used by the mirror disk, 7 in this case) #metadb i

Step 11: We can now create the meta devices which were cleared earlier.
# # # # # metainit metainit metainit metainit metainit d51 1 1 c0t0d0s5 d41 1 1 c0t0d0s4 d31 1 1 c0t0d0s3 d11 1 1 c0t0d0s1 d1 1 1 c0t0d0s0

Step 12: Once all the metadevices are created, as we start attaching them to the mirror syncing process begins.
# # # # # metattach metattach metattach metattach metattach d50 d51 d40 d41 d30 d31 d10 d11 d0 d1

Once the sync is complete check for the iostat for any disk related errors (Soft or Hard errors). Step 13: Run installboot on the new disk, just in case
#:/root #installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0

Você também pode gostar