How can I tell what drive is sdb?
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
Quoted 5 lines · Rick Bragg
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Matt Garman
Quoted 1 line
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.
Quoted 6 lines
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?
Quoted 12 lines · Jan Ceuleers
Quoted 11 lines · Matt Garman
Quoted 1 line
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".
Quoted 5 lines
Quoted 1 line
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: [email protected]
Web: http://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Quoted 21 lines · Steven Haigh
Quoted 12 lines · Jan Ceuleers
Quoted 11 lines · Matt Garman
Quoted 1 line
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".Quoted 5 lines
Quoted 1 line
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?
Quoted 8 lines
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/nullThe 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Rick Bragg
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) ..
Quoted 9 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 27 lines · Matt Garman
Quoted 26 lines · Steven Haigh
Quoted 12 lines · Jan Ceuleers
Quoted 11 lines · Matt Garman
Quoted 1 line
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".Quoted 5 lines
Quoted 1 line
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
Quoted 8 lines
Quoted 3 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dne 27.1.2010 15:03, Rick Bragg napsal(a):
Quoted 11 lines
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) ..
Quoted 8 lines
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.
----- Message from [email protected] ---------
Date: Wed, 27 Jan 2010 08:29:50 -0600
From: Matt Garman <[email protected]>
Subject: Re: How can I tell what drive is sdb?
To: Steven Haigh <[email protected]>
Cc: [email protected]
Quoted 14 lines · Steven Haigh
Quoted 6 lines · Jan Ceuleers
Quoted 4 lines
Quoted 2 lines · Matt Garman
Quoted 1 line
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/sdXto 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/sdawill correspond to/dev/sdbwhen all drives are connected.
Quoted 5 lines
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 [email protected] -----
========================================================================
# _ __ _ __ http://www.nagilum.org/ \n icq://69646724 #
# / |/ /__ ____ _(_) /_ ____ _ [email protected] \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..
Quoted 21 lines · Rick Bragg
From: Rick Bragg <[email protected]>
Subject: How can I tell what drive is sdb?
To: [email protected]
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.
Quoted 7 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html