Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 7 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
sudo lshw -c storage -c disk – user19496 Sep 7 '14 at 18:33

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


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.