How to Change SCSI Disk in RAID 5 on Solaris 10 SPARC
807557May 12 2010 — edited May 17 2010I am attempting to change a scsi drive in a RAID5 configuration with hot spare. The hot spare has kicked in but I would like to get the new disk configured and synced so that the hot spare can return to idle state.
I am fairly new at this so please be patient. I have put the new drive in but I am unable to format it.
This is the output from metastat:
----
# metastat d0
d0: RAID
State: Okay
Hot spare pool: hsp000
Interlace: 32 blocks
Size: 1146692736 blocks (546 GB)
Original device:
Size: 1146711680 blocks (546 GB)
Device Start Block Dbase State Reloc Hot Spare
c2t2d0s0 20682 Yes Okay Yes
c2t3d0s0 20682 Yes Okay Yes
c2t4d0s0 20682 No Okay Yes c2t7d0s0
c2t5d0s0 20682 Yes Okay Yes
c2t6d0s0 20682 Yes Okay Yes
Device Relocation Information:
Device Reloc Device ID
c2t2d0 Yes id1,sd@n5000c500054d2c57
c2t3d0 Yes id1,sd@n5000c500054da70b
c2t4d0 Yes id1,sd@n500000e016ab3830
c2t7d0 Yes id1,sd@n5000c500054d3aa7
c2t5d0 Yes id1,sd@n5000c500054ce7e7
c2t6d0 Yes id1,sd@n5000c500054ce9ab
----
c2t4d0 is the disk that I have replaced.
After changing the drive, I have done the following:
cfgadm -c configure c2::dsk/c2t4d0
metadevadm -u c2t4d0
When I attempt a format I get the following:
Specify disk (enter its number): 7
selecting c2t4d0
[disk formatted]
/dev/dsk/c2t4d0s0 is part of SVM volume raid:d0. Please see metaclear(1M).
If I then put in the partition info that I want and attempt a format, I get:
format> format
Cannot format disk while its partitions are currently in use.
I have attempted a metadetach and metaclear but I don't seem to be getting the command in correctly or something:
# metadetach d0 c2t4d0
metadetach: d0: invalid metadevice type md_raid
ALSO TRIED:
# metadetach d0 /dev/dsk/c2t4d0s0
metadetach: d0: invalid metadevice type md_raid
# metaclear -p c2t4d0s0
metaclear: SOl10Server: c2t4d0s0: no soft partitions on this device
I have perused the SVM Admin Guide but the only replacement instructions given are for replacing a drive with a different drive, not putting a new drive in the same location as a failed drive (unless I overlooked something).
Any help is greatly appreciated.