Hi There,

I'm having trouble getting the monit stop/start command to mount/ unmount a filesystem. I'm wondering if anyone can see the problem with the following:


check device dbfs with path /dev/sdh
       group server
start program = "/bin/mkdir -p /data/db ; /bin/sleep 5 ; /bin/ mount /data/db"
       stop program  =  "/bin/umount /data/db"
       if failed uid root then unmonitor
       if failed gid disk then unmonitor
       if space usage > 80 % then alert
       if space usage > 94 % then alert
       if inode usage > 80 % then alert
       if inode usage > 94 % then alert


The behavior I see is that the /data/db directory does get created, but the disk is not mounted. I put the sleep in because my initial attempts without it failed and I thought that possibly the mount command was failing because it was not seeing the mount directory due to a race condition.

Of course, when I run it manually everything works ok. I know the environment that monit runs the command in is fairly empty, but I don't see what I may be missing if thats the root cause.

Thanks,
Alex



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to