For my centos 7 machine. I have a /etc/fstab entry that direct the os to mount a glusterfs file system using its fuse client. However, this mount could crash sometimes so I have a cron job managed by systemd that will monitor it and re-mount  if necessary.Because I have other task to monitor as well, I put these in a python script which use subprocess.check_output([mount, /external]) to mount the glsuterfs volume. This python script run perfectly well except when it's ran by systemd which has root set as its user in unit file. I have check the log of the glusterfs fuse client as well, there is no evidence in the log that a mount command is initiated. What I can guess is that systemd process treat mount differently? Anybody have any clue? Thanks!EDIT:I found in the glusterfuse log that right after the mount. The glusterfuse receives a SIGNUM(15) and terminate itself. Could this be the reason and how could I stop it?[2017-03-17 21:14:26.070028] W [glusterfsd.c:1327:cleanup_and_exit] (-->/lib64/libpthread.so.0(+0x7dc5) [0x7f25c6572dc5] -->/usr/sbin/glusterfs(glusterfs_sigwaiter+0xe5) [0x7f25c7c04cd5] -->/usr/sbin/glusterfs(cleanup_and_exit+0x6b) [0x7f25c7c04b4b] ) 0-: received signum (15), shutting down[2017-03-17 21:14:26.070050] I [fuse-bridge.c:5788:fini] 0-fuse: Unmounting '/data'.[2017-03-17 21:14:26.070149] I [fuse-bridge.c:5080:fuse_thread_proc] 0-fuse: unmounting /data
mount a drive in systemd managed cron job
mount;systemd;automounting