which sata to which disk

Lonnie Olson lists at kittypee.com
Mon Feb 28 11:51:45 MST 2011


On Mon, Feb 28, 2011 at 11:47 AM, Merrill Oveson <moveson at gmail.com> wrote:
> Plug:
>
> I have raid (mdadm).
>
> I have a failed drive.  So I need to replace the broken drive.
>
> The question, I have is:  how do I know which sata is connected to
> which drive (so I know which to replace.)
>
> Is there a special linux command that says e.g.:   sata 1 connected to sda?
>

There's a ton of information, that is symlinked all around, in /sys

$ ls -l /sys/block/sd*/device
lrwxrwxrwx 1 root root 0 2011-02-28 11:49 /sys/block/sda/device ->
../../../0:0:0:0
lrwxrwxrwx 1 root root 0 2011-02-28 11:50 /sys/block/sdb/device ->
../../../1:0:1:0


More information about the PLUG mailing list