I have a partition, /dev/sdb1, that gets mounted at /data. In /etc/fstab I have:
/dev/sdb1 /data ext4 defaults 1 2
After that partition gets mounted, I then have the following bind mounts:
/data/backups/f17/opt /opt none rw,bind 0 0 /data/backups/f17/home /home none rw,bind 0 0 /data/var/www/html /var/www/html/ none rw,bind 0 0
All the mounting is done just fine.
The problem is that when I run
df, the only entry I get relating to sdb1 points to "/opt", not "/data".
/dev/sdb1 240233144 196081648 31925236 86% /opt
df to show the original mount point, that is /data, instead of /opt. Or at the very least, show all the mount points related to sdb1. If I
umount the /opt bind mount point, then
df happily shows /data (even though the other two bind mounts are still mounted, strangely).
There is no difference in behavior if I do the mounting commands in the terminal (vs letting the system do it via
mount -a, which uses /etc/fstab).
I know I can use something like
findmnt --df to get a better picture of all mounted filesystems, but I want to use
df (and I don't want to alias df to anything else).
- Fedora 21
- kernel 3.19.3-200.fc21.x86_64
- df (GNU coreutils) 8.22
- mount from util-linux 2.25.2
(adding more information)
/proc/mounts shows all four mount points:
/dev/sdb1 /data ext4 rw,relatime,data=ordered 0 0 /dev/sdb1 /var/www/html ext4 rw,relatime,data=ordered 0 0 /dev/sdb1 /home ext4 rw,relatime,data=ordered 0 0 /dev/sdb1 /opt ext4 rw,relatime,data=ordered 0 0