Linux – How to know which block device maps to which physical drive

hard drivelinuxraid

I have a server with software RAID 1, two hot-swap sata disks. One hard drive started showing errors, I'm thinking about removing and replacing it, only problem is that I have no idea which of the two correspond to which devices. And I can't shut the server down to find out.

I have /dev/sda and /dev/sdb, /dev/sda is the failing one. Thought about doing something along the lines

# mdadm --manage /dev/md0 --remove /dev/sda1

then somehow stop/suspend the drive using tuning software and try to listen which of the two stopped, but that's not gonna work in a noisy server environment. Drive panels have no LEDs.

Thanks for any ideas!

Best Answer

The A and B in sda and sdb should map to channels 1 and 2 (or 0 and 1) for your drives. If the system is set up so that they're labeled, you can tell that way. I don't know how your drives are structured with the wiring; I've had them numbered with small print on the motherboard so you can tell what port is going to what drive.

I supposed you could use your idea to then try feeling for vibration from the drives too, if there's enough room for you to feel the drives. Again depends on the way they're mounted.

Related Topic