Linux: Which physical disk is /dev/sdd?

1

Really the title says it all, but with more detail:

I have a RAID 10 box set up, and one of my drives has failed (/dev/sdd). I have hot swapping enabled, so I'd like to pop the failed drive out and swap it with a new one, but I obviously want to pop the right one out, or else I could really hose my array.

Are there any tricks to knowing which is the active drive, and which isn't? Can I trust that /dev/sdd will always be the same physical drive, or can the name change inside of linux?

Eddie Parker

Posted 2012-05-23T14:46:26.210

Reputation: 2 074

The name can change, but it's unlikely. That's why we have UUID's (or something like that). – RobinJ – 2012-05-23T15:26:16.433

Answers

6

Interesting. I found, through the help of fstx's answer the ability to find out the hard drive's serial number using hdparm.

hdparm -i /dev/sda:

megatron proc # hdparm -i /dev/sda

/dev/sda:

 Model=WDC WD1001FALS-00J7B1, FwRev=05.00K05, SerialNo=WD-WMATV3008902
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=50
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=off
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=1953525168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-1,2,3,4,5,6,7

 * signifies the current active mode

Let's me see the serial number, which is on the front of my drive. Neato.

Eddie Parker

Posted 2012-05-23T14:46:26.210

Reputation: 2 074

3

cat /proc/scsi/scsi tells the channel, id, and lun for each device.

I put a label on the disk with its serial number somewhere where it is visible without removing the disk from the cage.

fstx

Posted 2012-05-23T14:46:26.210

Reputation: 932

So I get the same channel, ID and lun for each device (00 for all three). It does tell me the model of the HD, but three of them are the same. Does it matter that these aren't hooked up by SCSI? – Eddie Parker – 2012-05-24T06:59:26.470