Works like a champ! <br><br>Thanks!<br><br><div><span class="gmail_quote">On 1/24/06, <b class="gmail_sendername">Rick Stevens</b> <<a href="mailto:rstevens@vitalstream.com">rstevens@vitalstream.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Tue, 2006-01-24 at 16:28 -0500, Devon Harding wrote:<br>> Is there a way I could monitor mount points & automatically remount
<br>> them (mount -a) if its ever disconnected?<br><br>Uhm, yeah. I do it. Cheap and dirty way:<br><br>--------------------- CUT HERE ---------------------------------------<br>#!/bin/bash<br>MNTLIST="/mountpoint1 /mountpoint2 ..." # Build list of dirs to check
<br>for MNT in $MNTLIST; do # For each directory...<br> RES=`mount | grep $MNT` # Perform the check<br> if [ $? -ne 0 ]; then # Did we get a failure?<br> mount $MNT # Yes, remount the volume
<br> fi<br>done<br>--------------------- CUT HERE ---------------------------------------<br><br>Save that as a shell script, say "/usr/local/bin/chkmnt.sh", chown it<br>as root:root and chmod it to 755. Finally, add an entry to root's
<br>crontab:<br><br> * * * * * /usr/local/bin/chkmnt.sh >/dev/null 2>&1<br><br>which will run it once a minute. You could add things such as touching<br>a file on each directory to verify the thing is writable and such. It's
<br>up to you.<br><br>----------------------------------------------------------------------<br>- Rick Stevens, Senior Systems Engineer <a href="mailto:rstevens@vitalstream.com">rstevens@vitalstream.com</a> -<br>- VitalStream, Inc.
<a href="http://www.vitalstream.com">http://www.vitalstream.com</a> -<br>- -<br>- ...Had this been an actual emergency, we would have fled in terror -<br>
- and you'd be on your own, pal! -<br>----------------------------------------------------------------------<br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">
fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a><br></blockquote></div><br>