From: Matt Garman <matthew.garman@gmail.com>
To: Steven Haigh <netwiz@crc.id.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: How can I tell what drive is sdb?
Date: Wed, 27 Jan 2010 08:29:50 -0600 [thread overview]
Message-ID: <bdd6985b1001270629g38a371abtd513ec54d2feb77f@mail.gmail.com> (raw)
In-Reply-To: <18879E40-1CB7-47B0-90C5-1F4483729E3D@crc.id.au>
On Wed, Jan 27, 2010 at 8:21 AM, Steven Haigh <netwiz@crc.id.au> wrote:
>
> On 28/01/2010, at 1:18 AM, Jan Ceuleers wrote:
>
>> Matt Garman wrote:
>>>> Is there a way to identify what drive is what?
>>>
>>> Sometimes you can infer from dmesg. E.g., type "dmesg | less" then
>>> scroll until you see where sdb is initialized; it might show the model
>>> and serial number of the drive.
>>>
>>> Another approach is to use smartctl, i.e.: "sudo smartctl -a
>>> /dev/sdb". This will definitely show you the model and serial number.
>>> You can also use hdparm for the same effect: "sudo hdparm -I
>>> /dev/sdb".
>>>
>>> I'm sure there's more ways, but those are the first that come to mind.
>>
>> I'm guessing that the OP is looking for ways to identify disks without disassembling them all.
>>
>> In the networking world, you can ask the system to tell you which network interface is which, by blinking the network LEDs (using ethtool -p). Is there something similar for disks?
>
> I used a similar method. I have a SATA enclosure that takes 3 x 5.25" bays and gives me 4 x hot swap SATA bays.
>
> As each bay has a power and an activity LED I can do something simple like:
> dd if=/dev/sdb of=/dev/null
>
> The bay that has sdb will have a constantly on activity light.
>
> If you don't have enclosures, then this becomes somewhat difficult.
Depending on how the drives are mounted and their proximity to one
another, in the absence of LEDs, you might be able to listen to and/or
feel the drives will running dd, and possibly determine which is
which.
Another tedious approach: use smartctl or hdparm as suggested above to
get an initial mapping of /dev/sdX to serial number. Then, disconnect
the SATA cable of all but one drive, and reboot. Now look at what
/dev/sda's serial number is, and compare that to the initial mapping.
Eventually /dev/sda will correspond to /dev/sdb when all drives are
connected.
If the controller supports hotswap, you could do something similar
without so many reboots.
This scheme makes the assumption that it's easier to pull SATA cables
than just look at the drive's serial numbers.
--
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
next prev parent reply other threads:[~2010-01-27 14:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 14:03 How can I tell what drive is sdb? Rick Bragg
2010-01-27 14:09 ` Matt Garman
2010-01-27 14:18 ` Jan Ceuleers
2010-01-27 14:21 ` Steven Haigh
2010-01-27 14:29 ` Matt Garman [this message]
2010-01-27 15:12 ` Goswin von Brederlow
2010-01-27 18:10 ` Nagilum
2010-01-27 14:30 ` Kristleifur Daðason
2010-01-27 16:57 ` Zdenek Kaspar
2010-01-28 9:00 ` Jon Hardcastle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdd6985b1001270629g38a371abtd513ec54d2feb77f@mail.gmail.com \
--to=matthew.garman@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=netwiz@crc.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).