How to View Disk Mount Points and Underlying Volumes on Linux
This guide explains three practical methods—using df, mount -l, and reading /etc/mtab—to list Linux mount points together with their associated disks or logical volumes, highlighting each command's output format and limitations.
Linux administrators often need to know which physical disks or logical volumes are mounted at which mount points. This article presents three common techniques for retrieving that information.
Method 1: Using df
The df command shows filesystem usage and mount points, but its output may place the mount point and the underlying volume on separate lines, making script parsing difficult.
orientalson:/home # df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 15213032 8043668 7169364 53% /
udev 514496 104 514392 1% /dev
/dev/mapper/vg_test-lv_test
511980 32840 479140 7% /home/mt
orientalson:/home #Note that the mount point /home/mt and its volume /dev/mapper/vg_test-lv_test appear on different lines.
Method 2: Using mount -l
The mount -l command lists all mounts with their source devices on the same line, though it does not display size information.
orientalson:/home # mount -l
/dev/sda2 on / type reiserfs (rw,acl,user_xattr) []
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/mapper/vg_test-lv_test on /home/mt type reiserfs (rw) []
orientalson:/home #This format is easier for shell scripts to parse.
Method 3: Reading /etc/mtab
The file /etc/mtab is updated by the kernel each time a filesystem is mounted, so its contents reflect current mounts. However, it may be unreliable if mounts are performed with the -n option, which prevents updates to /etc/mtab.
orientalson:/home # cat /etc/mtab
/dev/sda2 / reiserfs rw,acl,user_xattr 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
debugfs /sys/kernel/debug debugfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,mode=0620,gid=5 0 0
securityfs /sys/kernel/security securityfs rw 0 0
/dev/mapper/vg_test-lv_test /home/mt reiserfs rw 0 0
orientalson:/home #If a mount is performed with -n, the new entry will not appear in /etc/mtab:
orientalson:/home # umount /home/mt
orientalson:/home # mount -n /dev/vg_test/lv_test /home/mt
orientalson:/home # cat /etc/mtab
... (no entry for /home/mt) ...
orientalson:/home #Each method has trade‑offs: df provides size information but may split lines; mount -l keeps source and target together but lacks size; /etc/mtab is straightforward but can be incomplete.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
