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.

I've got a couple WD 1TB drives in my computer and I want to give them labels. Right now, I've two identical disks (save logical size, no partitions, yet different content). I want to give them the right label, but I can't tell which is /dev/sdb and which is /dev/sdc

share|improve this question

2 Answers 2

up vote 3 down vote accepted

One way would be to do df -mh. I'm assuming here that, as they have different content, there are a different number of bytes on the drives. You'll see something like this printed:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             272G  195G   64G  76% /
none                  2.0G  280K  2.0G   1% /dev
none                  2.0G  984K  2.0G   1% /dev/shm
none                  2.0G  772K  2.0G   1% /var/run
none                  2.0G     0  2.0G   0% /var/lock
none                  272G  195G   64G  76% /var/lib/ureadahead/debugfs
/dev/sdb1             587G  490G   92G  85% /media/data

From this you'll be able to infer which is /dev/sdb and which is /dev/sdc.

share|improve this answer
    
Perfect thanks, I'll accept this is 4 minutes when I can. –  maxmackie Apr 24 '11 at 21:01
    
No problem at all. :) –  boehj Apr 24 '11 at 21:04

hdparm -i /dev/sdX will let you read the serial number, which you can then compare with the physical label on the drive.

share|improve this answer
    
Good answer, and the most direct one, but the one above is more practical (don't need to open the case). –  maxmackie Apr 24 '11 at 21:00
    
You can also list /dev/disk/by-id/ directory to see serials. It could be faster than running hdparm or smartctl for every disk –  Cougar Nov 19 '11 at 21:57

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.