Re: Using mdctl for replacing failed disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday February 14, ian@stams.strath.ac.uk wrote:
> 
> ## Q.1: Why does the first device get listed as "sdb" and not "sdb1" ?
> Note that "mdctl -E /dev/sdb1" doesn't work, it requires "/dev/sdb"
> unlike the c and d drives...did I mess up?

Yep, you messed up.  You will see the same discrepancy in
/proc/mdstat.

Not that there is much harm in this.  Most of my RAID array are build
from whole disks, not partitions.  It means that autodetect cannot
work (because there is no partition ID) but regular readers will know
what I think of auto-detect.

> 
> >From /proc/scsi/scsi:
> 
> Host: scsi2 Channel: 00 Id: 00 Lun: 00
>   Vendor: SEAGATE  Model: ST336704LC       Rev: 0004
>   Type:   Direct-Access                    ANSI SCSI revision: 03
> Host: scsi2 Channel: 00 Id: 01 Lun: 00
>   Vendor: SEAGATE  Model: ST336704LC       Rev: 0004
>   Type:   Direct-Access                    ANSI SCSI revision: 03
> Host: scsi2 Channel: 00 Id: 02 Lun: 00
>   Vendor: IBM      Model: DDYS-T36950M     Rev: S93E
>   Type:   Direct-Access                    ANSI SCSI revision: 03
> 
> 
> ## Q.2: The failed device /dev/sdd1 corresponds to the IBM disk,
> ## yes?

Maybe..   sdd should correspond the the fourth drives listed in
/proc/scsi/scsi, but you have only listed 3.  Maybe you didn't include
a full listing.

> (If so, this is the third Deskstar drive to fail in the array, the
> 2 SEAGATEs are replacement drives!)

Deskstars seem to be like that.  We have had several fail.  I doubt
I'll be buying drives from IBM for a while.

> ## Q.3: Can someone verify that to replace the drive I do:
> 
> mdctl --remove /dev/md0 /dev/sdd1
> < hot swap failed drive with new one>

You do know that scsi hot-swap if not fully supported by Linux?!?
You will need to do something like:
   echo 'scsi remove-single-device 2 0 2 0' > /proc/scsi/scsi
   # pull out the old
   # push in the new
   echo 'scsi add-single-device 2 0 2 0' > /proc/scsi/scsi
It will probably work, but no guarantees

> mdctl --add /dev/md0 /dev/sdd1
> mdctl --assemble /dev/md0 /dev/sdb /dev/sdc1 /dev/sdd1
> (note - use sdb, not sdb1?)

You do not need --assemble, it is already assembled.  After the 
  mdctl --add /dev/md0 /dev/sdd1
it will start rebuilding (you can watch in /proc/mdstat).
You would only need --assemble if you shut the array down (--stop) and
wanted to restart it, such as when you reboot.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux