Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
The name can change, but it's unlikely. That's why we have UUID's (or something like that). –  RobinJ May 23 '12 at 15:26

2 Answers 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|improve this answer
    
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 May 24 '12 at 6:59

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.