Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1772

Use /proc/self/mountinfo for filesystem discovery in Linux >= 2.6.26

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.0.6, 2.1.1
    • Agent (G)
    • Linux

      /proc/mounts allows no distinction between regular mounts and bind mounts. That leads to having the same filesystem discovered multiple times. On some platforms this can potentially be worked around by parsing /etc/mtab, but that's not as reliable, as it does not represent the kernel's view.

      Bind mounts were introduced in Linux 2.4.0 (man 2 mount). /proc/self/mountinfo was introduced in 2.6.26 to solve the problem of not being able to recognize bind mounts. Please also refer to this discussion: https://bugzilla.redhat.com/show_bug.cgi?id=491924, particularly comment #20.

      The findmnt utility might bring some inspiration for how using different sources of information, including mountinfo, can be implemented.
      http://man7.org/linux/man-pages//man8/findmnt.8.html

            Unassigned Unassigned
            volter Volker Fröhlich
            Votes:
            14 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: