* Re: How can I tell what drive is sdb?
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:30 ` Kristleifur Daðason
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Matt Garman @ 2010-01-27 14:09 UTC (permalink / raw)
To: Rick Bragg; +Cc: linux-raid
On Wed, Jan 27, 2010 at 8:03 AM, Rick Bragg <lists@gmnet.net> wrote:
> I have 4 identical disks on it and they show up as /dev/sda, b, c, and
> d.
>
> However, sdb needs to be replaced. How can I tell which drive is sdb?
> 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.
-Matt
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: How can I tell what drive is sdb?
2010-01-27 14:09 ` Matt Garman
@ 2010-01-27 14:18 ` Jan Ceuleers
2010-01-27 14:21 ` Steven Haigh
0 siblings, 1 reply; 10+ messages in thread
From: Jan Ceuleers @ 2010-01-27 14:18 UTC (permalink / raw)
To: linux-raid
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?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
2010-01-27 14:18 ` Jan Ceuleers
@ 2010-01-27 14:21 ` Steven Haigh
2010-01-27 14:29 ` Matt Garman
0 siblings, 1 reply; 10+ messages in thread
From: Steven Haigh @ 2010-01-27 14:21 UTC (permalink / raw)
To: linux-raid
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.
--
Steven Haigh
Email: netwiz@crc.id.au
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
2010-01-27 14:21 ` Steven Haigh
@ 2010-01-27 14:29 ` Matt Garman
2010-01-27 15:12 ` Goswin von Brederlow
2010-01-27 18:10 ` Nagilum
0 siblings, 2 replies; 10+ messages in thread
From: Matt Garman @ 2010-01-27 14:29 UTC (permalink / raw)
To: Steven Haigh; +Cc: linux-raid
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
2010-01-27 14:29 ` Matt Garman
@ 2010-01-27 15:12 ` Goswin von Brederlow
2010-01-27 18:10 ` Nagilum
1 sibling, 0 replies; 10+ messages in thread
From: Goswin von Brederlow @ 2010-01-27 15:12 UTC (permalink / raw)
To: linux-raid
Matt Garman <matthew.garman@gmail.com> writes:
> 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.
Shut down the raid arry (or just don't access it), set the spin down
time to 10s with hdparm and run dd if=/dev/sdb of=/dev/null. All but sdb
should spin down and then you should be able to hear/feel the activity.
Some drives also have a small led onboard which you see if you run the
system opened.
MfG
Goswin
PS: If you have to take the system offline and disassemble the drives to
find the right one then write down the serial number for each drive and
stick is some place visible when reassembled. If you lack space a color
coded dot or a number combined with a lookup table for color/numer ->
serial is also helpfull.
MfG
Goswin
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: How can I tell what drive is sdb?
2010-01-27 14:29 ` Matt Garman
2010-01-27 15:12 ` Goswin von Brederlow
@ 2010-01-27 18:10 ` Nagilum
1 sibling, 0 replies; 10+ messages in thread
From: Nagilum @ 2010-01-27 18:10 UTC (permalink / raw)
To: Matt Garman; +Cc: Steven Haigh, linux-raid
----- Message from matthew.garman@gmail.com ---------
Date: Wed, 27 Jan 2010 08:29:50 -0600
From: Matt Garman <matthew.garman@gmail.com>
Subject: Re: How can I tell what drive is sdb?
To: Steven Haigh <netwiz@crc.id.au>
Cc: linux-raid@vger.kernel.org
> 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?
>>>>
> 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.
blkid could also be used to identify the drives.
It should work with all types of drives SCSI/SATA/PATA/USB/...
----- End message from matthew.garman@gmail.com -----
========================================================================
# _ __ _ __ http://www.nagilum.org/ \n icq://69646724 #
# / |/ /__ ____ _(_) /_ ____ _ nagilum@nagilum.org \n +491776461165 #
# / / _ `/ _ `/ / / // / ' \ Amiga (68k/PPC): AOS/NetBSD/Linux #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/ Mac (PPC): MacOS-X / NetBSD /Linux #
# /___/ x86: FreeBSD/Linux/Solaris/Win2k ARM9: EPOC EV6 #
========================================================================
----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
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:30 ` Kristleifur Daðason
2010-01-27 16:57 ` Zdenek Kaspar
2010-01-28 9:00 ` Jon Hardcastle
3 siblings, 0 replies; 10+ messages in thread
From: Kristleifur Daðason @ 2010-01-27 14:30 UTC (permalink / raw)
To: Rick Bragg; +Cc: linux-raid
On Wed, Jan 27, 2010 at 2:03 PM, Rick Bragg <lists@gmnet.net> wrote:
> Hi,
>
> I have a system with raid10 running Ubuntu 8.10. It uses a
> "promise"card
>
> # lsusb
> ..
> 01:02.0 Mass storage controller: Promise Technology, Inc. PDC40718 (SATA
> 300 TX4) (rev 02)
> ..
>
> I have 4 identical disks on it and they show up as /dev/sda, b, c, and
> d.
>
> However, sdb needs to be replaced. How can I tell which drive is sdb?
> Is there a way to identify what drive is what?
>
> Thanks
> Rick
>
I think you can use the wonderful 'lshw' utility for this. It tells
you what serial numbers the disks have, and then you can look at the
labels on the drives to see which one has what serial number.
If this doesn't work out, you can PROBABLY stop the array and PROBABLY
hotswap the disks in and out, running 'watch -n0 -d "dmesg | tail"' to
see what the kernel says. It will tell you what drive you have just
unplugged. But if you do this - BE CAREFUL - and I can't vouch that
this is OK as I've never done this. I'm only guessing at theory.
Good luck!
-- Kristleifur
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
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:30 ` Kristleifur Daðason
@ 2010-01-27 16:57 ` Zdenek Kaspar
2010-01-28 9:00 ` Jon Hardcastle
3 siblings, 0 replies; 10+ messages in thread
From: Zdenek Kaspar @ 2010-01-27 16:57 UTC (permalink / raw)
To: linux-raid
Dne 27.1.2010 15:03, Rick Bragg napsal(a):
> Hi,
>
> I have a system with raid10 running Ubuntu 8.10. It uses a
> "promise"card
>
> # lsusb
> ..
> 01:02.0 Mass storage controller: Promise Technology, Inc. PDC40718 (SATA
> 300 TX4) (rev 02)
> ..
>
> I have 4 identical disks on it and they show up as /dev/sda, b, c, and
> d.
>
> However, sdb needs to be replaced. How can I tell which drive is sdb?
> Is there a way to identify what drive is what?
>
> Thanks
> Rick
Hi
Check serial number of drive via hdparm -I /dev/sdb or looks into
/dev/disk/by-id. Write carefully serial number and shutdown & replace
correct drive :)
HTH, Z.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: How can I tell what drive is sdb?
2010-01-27 14:03 How can I tell what drive is sdb? Rick Bragg
` (2 preceding siblings ...)
2010-01-27 16:57 ` Zdenek Kaspar
@ 2010-01-28 9:00 ` Jon Hardcastle
3 siblings, 0 replies; 10+ messages in thread
From: Jon Hardcastle @ 2010-01-28 9:00 UTC (permalink / raw)
To: linux-raid, Rick Bragg
--- On Wed, 27/1/10, Rick Bragg <lists@gmnet.net> wrote:
> From: Rick Bragg <lists@gmnet.net>
> Subject: How can I tell what drive is sdb?
> To: linux-raid@vger.kernel.org
> Date: Wednesday, 27 January, 2010, 14:03
> Hi,
>
> I have a system with raid10 running Ubuntu 8.10. It
> uses a
> "promise"card
>
> # lsusb
> ..
> 01:02.0 Mass storage controller: Promise Technology, Inc.
> PDC40718 (SATA
> 300 TX4) (rev 02)
> ..
>
> I have 4 identical disks on it and they show up as
> /dev/sda, b, c, and
> d.
>
> However, sdb needs to be replaced. How can I tell
> which drive is sdb?
> Is there a way to identify what drive is what?
>
> Thanks
> Rick
>
I had this problem, and and as it is a mare removing the drives to identify what one is what.. When i needed to reorganise my physical drive order i took the liberty of writing on the sides/back of each drive a short incrementing ID that tallys to a spreadsheet of serial numbers that i gleaned from smartctl.
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread