0

Is there a command that tells you the device name (ie. "/dev/sda1"), when you give it a mount point (ie. "/home")?

I'm running Ubuntu Server 9.04.

Nick
  • 4,503
  • 29
  • 69
  • 97

2 Answers2

4

df, mount, or just cat /etc/fstab.

If the actual physical device is hidden behind software RAID (eg, you see /dev/md), then cat /proc/mdstat will uncover that layer.

And if there's a blanket of LVM (eg, you see something like /dev/LogVol00), use pvdisplay.

Matt
  • 933
  • 5
  • 12
  • 1
    when you use cat though, doesn't it just tell you what's supposed to be mounted, not what actually is? If you had a typo in /etc/fstab, the entry would be there, but the device might not actually be mounted due to the error. – Nick Sep 25 '09 at 22:33
  • For /etc/fstab, you're exactly correct. – Matt Sep 25 '09 at 22:34
2
df -k /home

and

mount
wfaulk
  • 6,878
  • 7
  • 46
  • 75