I have an ec2 instance that is booted from an ebs snapshot. The boot device is /dev/sda1. When I call mount, df -h or cat /etc/fstab I can see the device:

$ mount
/dev/sda1 on / type ext3 (rw)

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              50G   20G   28G  43% /

$ cat /etc/mtab
/dev/sda1 / ext3 rw 0 0

But when I cat /proc/mounts and cat /proc/self/mounts /dev/sda1 is missing. Why would this be?

This isn't causing me a problem, and the instance is running fine, it just means I can't use a monit update, because that's checking for mounted filesystems via /proc/self/mounts and complains that /dev/sda1 is missing (when it obviously isn't), and I'd like to understand why.

  • /proc/mounts should be a symlink to /proc/self/mounts and maybe you are running with namespaces ( as root: lsns -l) ; then a process will only see the mount points that are present in that namespace, which may omit others .... – HBruijn Nov 20 '17 at 14:12
  • Yeah, you're right about the symlink, but it's an older Debian with no namespaces support. – jaygooby Nov 20 '17 at 14:52
  • 1
    I've worked around my monit issue by instead of monitoring /dev/sda1 (which is missing from /proc/self/mounts) to monitor rootfs (which does appear in /proc/self/mounts) aka / aka /dev/sda1 – jaygooby Nov 20 '17 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.