Just in case for me (and others) when a software raid 5 degraded, how do I know which Sata Channel my dev/sda, /dev/sdb, etc. associated with, so that we can replace them properly?
Just in case for me (and others) when a software raid 5 degraded, how do I know which Sata Channel my dev/sda, /dev/sdb, etc. associated with, so that we can replace them properly?
Rather than trying to identify the failed disk by the SATA channel it's connected to, you can identify it by its serial number. I have found that most hard disks these days have their serial numbers stamped/printed on the front edge, so all you need to do is determine the serial number of the failed drive.
I assume you have already discovered the logical name of the failed drive via
cat /proc/mdstat
. For the sake of example, let's assume that failed drive is/dev/sdb
.Next, if you haven't got it already, install the
lshw
package, and then run this command (I'm not sure if you need tosudo
it; it's harmless to try it with/withoutsudo
):You should get output that looks something like the following:
From this, you should be able to identify the problem drive from its
logical name
(e.g./dev/sdb
), and thus obtain its serial number (e.g.6DE78FG9
). With the serial number in hand, you can be confident you're pulling the correct drive.(If your failed drive doesn't show up in the
lshw
output at all, then it's really dead. You can probably still uselshw
to find the dead drive, but this time by process of elimination.)This file will give you RAID informations like which drives are assigned to each RAID