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 have an ubuntu box with 8 SATA drives, 6 on the mobo and 2 on an add-in card. How do i determine which physical drive maps to which of the /dev/sd% entries? it doesnt appear to be port 0 is sda, 1 is sdb, etc. is there a file somewhere that shows this mapping?

share|improve this question

4 Answers 4

up vote 6 down vote accepted

Look in /sys/block, or run sudo lshw and look under your SATA controller.

share|improve this answer
    
lshw did the trick, thanks –  Jeff Shattock Aug 24 '09 at 17:14
    
you can also examine the output of dmesg for lots of additional details. –  quack quixote Feb 27 '10 at 12:32

Try the hdparm command with -I or -i options.
There is also sdparm (never tried it though).

share|improve this answer

hdparm doesn't always work for me. I use "smartctl -i /dev/sda" (or a-z). I had to use smartcl on my USB based drives. It may depend on your drivers/adapter being used.

share|improve this answer

My standard quick way of checking which physical drives are mapped to which device entries is to run "sudo fdisk -l". This will show the size and partition table of each disk, which is usually enough information to know what's what.

"sudo blkid" can also be useful, especially when looking for the types and UUIDs of partitions.

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.