Ad Widget

Collapse

Zabbix agent remounting automount file system after unmounting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Shore
    Junior Member
    • Jan 2014
    • 7

    #1

    Zabbix agent remounting automount file system after unmounting

    Hi,

    We are using ZFS with snapshots on one of our servers and occasionally need to mount the snapshot to retrieve a file. Trouble is Zabbix is picking up the mount of the .zfs filesystem and starting to monitor it, when I unmount the file system the next probe by the Zabbix agent remounts the auto mount file system and I am never able to unmount it!

    Is there a way to tell Zabbix to ignore monitoring partitions mounted under .zfs? Or a better way of handling automounted file systems?

    Thanks

    Paul
  • Paul Shore
    Junior Member
    • Jan 2014
    • 7

    #2
    Server version - 3.4.6, agent version 3.4.14-1+xenial (from package repos)

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Originally posted by Paul Shore
      Hi,

      We are using ZFS with snapshots on one of our servers and occasionally need to mount the snapshot to retrieve a file. Trouble is Zabbix is picking up the mount of the .zfs filesystem and starting to monitor it, when I unmount the file system the next probe by the Zabbix agent remounts the auto mount file system and I am never able to unmount it!
      In case of ZFS you don.t need to mount snapshot. Just "cd </vo/mount/point>/.zfs/snapshots/<snapshot_name>"
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      • Paul Shore
        Junior Member
        • Jan 2014
        • 7

        #4
        I didn't mount it manually - I did use cd to enter the .zfs/snapshot directory. This cd actually uses the auto mounter to mounts the snapshot as another read only file system and it shows up as another file system in the output of df. This additional file system mount starts to get monitored by Zabbix. When I have finished with a snapshot I usually unmount the file system so that the scripts which automatically delete older snapshots can do the delete, but the Zabbix monitoring process has seen this new mount point and checks it again, causing the auto mounter to mount it again. This leaves the snapshot mounted which causes issues with my scripts. I could modify the script to attempt an unmount before zfs destroy, but its zabbix and automounted file systems that really need fixing.

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Again .. ZFS snapshots are not [u]mountable
          All snapshots are presented in normal VFS tree without any mounting. You cannot as well umount snapshot.
          If you don't see exact shanpshot tree in .zfs/snapshots directory that meand that there is no such snapshot.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • Paul Shore
            Junior Member
            • Jan 2014
            • 7

            #6
            # df -h
            Filesystem Size Used Avail Use% Mounted on
            udev 63G 0 63G 0% /dev
            tmpfs 13G 33M 13G 1% /run
            /dev/sda1 90G 6.2G 79G 8% /
            tmpfs 63G 0 63G 0% /dev/shm
            tmpfs 5.0M 0 5.0M 0% /run/lock
            tmpfs 63G 0 63G 0% /sys/fs/cgroup
            storage 651G 0 651G 0% /storage
            storage/backup 651G 3.5M 651G 1% /storage/backup
            tmpfs 13G 0 13G 0% /run/user/3000
            # cd /storage/backup/.zfs/snapshot/autosnap-201810062355
            # df -h
            Filesystem Size Used Avail Use% Mounted on
            udev 63G 0 63G 0% /dev
            tmpfs 13G 33M 13G 1% /run
            /dev/sda1 90G 6.2G 79G 8% /
            tmpfs 63G 0 63G 0% /dev/shm
            tmpfs 5.0M 0 5.0M 0% /run/lock
            tmpfs 63G 0 63G 0% /sys/fs/cgroup
            storage 651G 0 651G 0% /storage
            storage/backup 651G 3.5M 651G 1% /storage/backup
            tmpfs 13G 0 13G 0% /run/user/3000
            storage/backup@autosnap-201810062355 651G 3.5M 651G 1% /storage/backup/.zfs/snapshot/autosnap-201810062355
            # cd /; umount /storage/backup/.zfs/snapshot/autosnap-201810062355
            # df -h
            Filesystem Size Used Avail Use% Mounted on
            udev 63G 0 63G 0% /dev
            tmpfs 13G 33M 13G 1% /run
            /dev/sda1 90G 6.2G 79G 8% /
            tmpfs 63G 0 63G 0% /dev/shm
            tmpfs 5.0M 0 5.0M 0% /run/lock
            tmpfs 63G 0 63G 0% /sys/fs/cgroup
            storage 651G 0 651G 0% /storage
            storage/backup 651G 3.5M 651G 1% /storage/backup
            tmpfs 13G 0 13G 0% /run/user/3000

            Comment

            Working...