On Mon, May 16, 2016 at 7:05 PM, Stephen Berg (Contractor) <stephen.berg....@nrlssc.navy.mil> wrote: > > The logical volume for my home directory is mounted on /export/home locally, > and /home via NFS/automounter. In the SL5.x and SL6.x days it would have > been a bind mount and I could filter out bind mounts from the df output, > everything worked as expected. These days there's no indication that it's a > bind mount anywhere that I can see, and as you pointed out, it's displaying > the shorter of the possible mount points to display. > > That means that right after a reboot, it shows up mounted on /export/home > which is correct, but once I login it shows up as /home which isn't correct. > When running say for instance "df -PTlk" the output shouldn't ever change > where a filesystem is mounted. But this choosing of the shorter of possible > mount points means it can change on the fly. > > When my monitoring software (OMD/check_mk) does its thing it wants to see > where the filesystem is mounted during the df part of its check, but when > it changes arbitrarily it can't adjust for that on the fly.
1) Can your monitoring software be taught that /home and /export/home are the same? 2) There was a problem with the earlier implementation of "/etc/mtab" in that you could mount /dev/sdb1 /path/to/mount mount -o bind /path/to/mount /path/to/bind-mount umount /path/to/mount and still have "/path/to/bind-mount" tagged as "bind" in "/etc/mtab" because, from the kernel's perspective, running mount /dev/sdb1 /path/to/mount mount -o bind /path/to/mount /path/to/bind-mount is the same as running mount /dev/sdb1 /path/to/mount mount /dev/sdb1 /path/to/bind-mount so "/etc/mtab" was turned into a symlink to "/proc/self/mounts". It's even become a requirement in systemd but I've forgotten with which version. 3) An ex-colleague pointed out to me yesterday that one of the reasons for choosing the shortest path was that otherwise "/rootfs" or "/newroot" might show up in df rather than "/" if the "first local mount" had been chosen. He must have been referring to the old "/dev/root" symlink, but maybe he's right!