[svlug] Mounting and a simplified "race" condition

James Sparenberg james at linuxrebel.org
Sun Mar 23 22:00:55 PST 2008


All,

   I've got a few dozen systems in a load balanced array.  The applications 
running on them share a common "scratch pad" area on a single system that is 
mounted via sshfs.  (Using fuse.)

   Now I've got it into fstab in such a way that it mounts without a problem 
with the correct UID and GID.  However with the recent upgrade to CentOS 5.x, 
and the fact that for the first time in over a year the systems restarted, I 
noticed that the mount call quite often occurs before the NIC comes up fully.  
(static IP's).  One of the beauties of sshfs is that it doesn't block the 
system init, it just fails quietly, and is simple to "fix".  The joy of user 
space.

  I can think of any of a number of ways to ensure that a restart of a system 
for whatever reason doesn't fail to mount the remote dir.  What I'm curious 
about is if anyone here has any thoughts on the best way to do it.  My goals 
are:

1.  Works is such a way that withing 5 minutes of login prompt the remote dir 
is mounted (other network related events give me that window)

2.  Is drop dead simple to understand. (If I get hit by a bus my backup won't 
go nuts figuring out what I did.)

3.  It doesn't introduce more problems than it solves.  

James



More information about the svlug mailing list