Subject: | Prefer /proc/self/mounts when running in Linux |
Hi,
/proc/self/mounts is an mtab format magic file in Linux that contains
what the kernel actually has mounted, as opposed to /etc/mtab, which is
an actual file that is updated when the mount/unmount commands are used.
One gotcha with /proc/mounts is that on recent kernels/initrd's, the
root filesystem's device may be a symbolic link, "/dev/root", which
points to the actual root device.
/proc/self/mounts is more likely to be accurate in all cases, and is
the _only_ accurate version for people taking advantage of per-process
mount namespaces.