In systemd service file the script expects fusermount in /bin/fusermount. lxcfs.service is provided from ebuild sources. My current sys-fs/fuse-2.9.9-r1 installs fusermount at /usr/bin/fusermount My temporary solution was to create a systemd drop-in to override the ExecStopPost. The lxcfs logs are: Jun 16 16:30:01 zerg systemd[1]: Started FUSE filesystem for LXC. Jun 16 16:30:01 zerg lxcfs[9087]: Running constructor lxcfs_init to reload liblxcfs Jun 16 16:30:01 zerg lxcfs[9087]: mount namespace: 4 Jun 16 16:30:01 zerg lxcfs[9087]: hierarchies: Jun 16 16:30:01 zerg lxcfs[9087]: 0: fd: 5: Jun 16 16:30:01 zerg lxcfs[9087]: 1: fd: 6: name=systemd Jun 16 16:30:01 zerg lxcfs[9087]: 2: fd: 7: blkio Jun 16 16:30:01 zerg lxcfs[9087]: 3: fd: 8: cpuset Jun 16 16:30:01 zerg lxcfs[9087]: 4: fd: 9: cpu,cpuacct Jun 16 16:30:01 zerg lxcfs[9087]: 5: fd: 10: perf_event Jun 16 16:30:01 zerg lxcfs[9087]: 6: fd: 11: memory Jun 16 16:30:01 zerg lxcfs[9087]: 7: fd: 12: net_cls,net_prio Jun 16 16:30:01 zerg lxcfs[9087]: 8: fd: 13: devices Jun 16 16:30:01 zerg lxcfs[9087]: 9: fd: 14: freezer Jun 16 16:30:01 zerg lxcfs[9087]: 10: fd: 15: pids Jun 16 16:30:01 zerg lxcfs[9087]: 11: fd: 16: hugetlb Jun 16 16:30:01 zerg lxcfs[9087]: Kernel supports pidfds Jun 16 16:30:01 zerg lxcfs[9087]: api_extensions: Jun 16 16:30:01 zerg lxcfs[9087]: - cgroups Jun 16 16:30:01 zerg lxcfs[9087]: - sys_cpu_online Jun 16 16:30:01 zerg lxcfs[9087]: - proc_cpuinfo Jun 16 16:30:01 zerg lxcfs[9087]: - proc_diskstats Jun 16 16:30:01 zerg lxcfs[9087]: - proc_loadavg Jun 16 16:30:01 zerg lxcfs[9087]: - proc_meminfo Jun 16 16:30:01 zerg lxcfs[9087]: - proc_stat Jun 16 16:30:01 zerg lxcfs[9087]: - proc_swaps Jun 16 16:30:01 zerg lxcfs[9087]: - proc_uptime Jun 16 16:30:01 zerg lxcfs[9087]: - shared_pidns Jun 16 16:30:01 zerg lxcfs[9087]: - cpuview_daemon Jun 16 16:30:01 zerg lxcfs[9087]: - loadavg_daemon Jun 16 16:30:01 zerg lxcfs[9087]: - pidfds Jun 16 16:30:01 zerg lxcfs[9087]: fuse: mountpoint is not empty Jun 16 16:30:01 zerg lxcfs[9087]: fuse: if you are sure this is safe, use the 'nonempty' mount option Jun 16 16:30:01 zerg lxcfs[9087]: Running destructor lxcfs_exit Jun 16 16:30:01 zerg systemd[1]: lxcfs.service: Main process exited, code=exited, status=1/FAILURE Jun 16 16:30:01 zerg systemd[9088]: lxcfs.service: Executable /bin/fusermount missing, skipping: No such file or directory Jun 16 16:30:01 zerg systemd[1]: lxcfs.service: Failed with result 'exit-code'. Jun 16 16:30:01 zerg systemd[1]: lxcfs.service: Scheduled restart job, restart counter is at 5. Jun 16 16:30:01 zerg systemd[1]: Stopped FUSE filesystem for LXC. Jun 16 16:30:01 zerg systemd[1]: lxcfs.service: Start request repeated too quickly. Jun 16 16:30:01 zerg systemd[1]: lxcfs.service: Failed with result 'exit-code'. Jun 16 16:30:01 zerg systemd[1]: Failed to start FUSE filesystem for LXC.
It seems that also with the drop-in the problem is not solved: Jun 16 17:01:13 zerg systemd[1]: Started FUSE filesystem for LXC. Jun 16 17:01:13 zerg lxcfs[125410]: Running constructor lxcfs_init to reload liblxcfs Jun 16 17:01:13 zerg lxcfs[125410]: mount namespace: 4 Jun 16 17:01:13 zerg lxcfs[125410]: hierarchies: Jun 16 17:01:13 zerg lxcfs[125410]: 0: fd: 5: Jun 16 17:01:13 zerg lxcfs[125410]: 1: fd: 6: name=systemd Jun 16 17:01:13 zerg lxcfs[125410]: 2: fd: 7: blkio Jun 16 17:01:13 zerg lxcfs[125410]: 3: fd: 8: cpuset Jun 16 17:01:13 zerg lxcfs[125410]: 4: fd: 9: cpu,cpuacct Jun 16 17:01:13 zerg lxcfs[125410]: 5: fd: 10: perf_event Jun 16 17:01:13 zerg lxcfs[125410]: 6: fd: 11: memory Jun 16 17:01:13 zerg lxcfs[125410]: 7: fd: 12: net_cls,net_prio Jun 16 17:01:13 zerg lxcfs[125410]: 8: fd: 13: devices Jun 16 17:01:13 zerg lxcfs[125410]: 9: fd: 14: freezer Jun 16 17:01:13 zerg lxcfs[125410]: 10: fd: 15: pids Jun 16 17:01:13 zerg lxcfs[125410]: 11: fd: 16: hugetlb Jun 16 17:01:13 zerg lxcfs[125410]: Kernel supports pidfds Jun 16 17:01:13 zerg lxcfs[125410]: api_extensions: Jun 16 17:01:13 zerg lxcfs[125410]: - cgroups Jun 16 17:01:13 zerg lxcfs[125410]: - sys_cpu_online Jun 16 17:01:13 zerg lxcfs[125410]: - proc_cpuinfo Jun 16 17:01:13 zerg lxcfs[125410]: - proc_diskstats Jun 16 17:01:13 zerg lxcfs[125410]: - proc_loadavg Jun 16 17:01:13 zerg lxcfs[125410]: - proc_meminfo Jun 16 17:01:13 zerg lxcfs[125410]: - proc_stat Jun 16 17:01:13 zerg lxcfs[125410]: - proc_swaps Jun 16 17:01:13 zerg lxcfs[125410]: - proc_uptime Jun 16 17:01:13 zerg lxcfs[125410]: - shared_pidns Jun 16 17:01:13 zerg lxcfs[125410]: - cpuview_daemon Jun 16 17:01:13 zerg lxcfs[125410]: - loadavg_daemon Jun 16 17:01:13 zerg lxcfs[125410]: - pidfds Jun 16 17:01:13 zerg lxcfs[125410]: fuse: mountpoint is not empty Jun 16 17:01:13 zerg lxcfs[125410]: fuse: if you are sure this is safe, use the 'nonempty' mount option Jun 16 17:01:13 zerg lxcfs[125410]: Running destructor lxcfs_exit Jun 16 17:01:13 zerg systemd[1]: lxcfs.service: Main process exited, code=exited, status=1/FAILURE Jun 16 17:01:13 zerg systemd[125413]: lxcfs.service: Executable /bin/fusermount missing, skipping: No such file or directory Jun 16 17:01:13 zerg fusermount[125416]: /usr/bin/fusermount: failed to unmount /var/lib/lxcfs: Invalid argument Jun 16 17:01:13 zerg systemd[1]: lxcfs.service: Failed with result 'exit-code'. Jun 16 17:01:13 zerg systemd[1]: lxcfs.service: Scheduled restart job, restart counter is at 5. Jun 16 17:01:13 zerg systemd[1]: Stopped FUSE filesystem for LXC. Jun 16 17:01:13 zerg systemd[1]: lxcfs.service: Start request repeated too quickly. Jun 16 17:01:13 zerg systemd[1]: lxcfs.service: Failed with result 'exit-code'. Jun 16 17:01:13 zerg systemd[1]: Failed to start FUSE filesystem for LXC.
"fuse: mountpoint is not empty" led me to believe you have something in your /var/lib/lxcfs before you attempt to start lxcfs. Could you check if the directory is empty indeed? If you *know* there is something and don't mind, can you update this line in your lxcfs.service: -ExecStopPost=-/bin/fusermount -u /var/lib/lxcfs +ExecStopPost=-/usr/bin/fusermount -o nonempty -u /var/lib/lxcfs
I realize now that it was there an hidden file: .keep_sys-fs_lxcfs-0 But for the unmount runs properly with the service stop is required to correct ExecStopPost to the expected path. Thanks Joonas Niilola
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=019d6bc22c11aa9bb41510b920d579feb2c48316 commit 019d6bc22c11aa9bb41510b920d579feb2c48316 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2020-06-21 16:48:03 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-06-21 17:02:08 +0000 sys-fs/lxcfs: update fusermount path to systemd service file, #728470 Closes: https://bugs.gentoo.org/728470 Signed-off-by: Joonas Niilola <juippis@gentoo.org> sys-fs/lxcfs/files/lxcfs.service | 16 ++++++++++++++++ .../lxcfs/{lxcfs-4.0.4.ebuild => lxcfs-4.0.4-r1.ebuild} | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-)