Linux: Which physical disk is /dev/sdd?

6,017

Solution 1

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.

Solution 2

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.

Share:
6,017

Related videos on Youtube

Eddie Parker
Author by

Eddie Parker

Updated on September 18, 2022

Comments

  • Eddie Parker
    Eddie Parker over 1 year

    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?

    • RobinJ
      RobinJ almost 12 years
      The name can change, but it's unlikely. That's why we have UUID's (or something like that).