monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit] Help getting monit to mount/unmount device


From: Alex Soto
Subject: [monit] Help getting monit to mount/unmount device
Date: Mon, 25 May 2009 15:20:10 -0700

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]