From: "Rajouri Jammu" Subject: Re: wait_for_lock() in mount Date: Sat, 19 Apr 2008 10:52:16 -0700 Message-ID: <3307cdf90804191052v194cc2bctb25b6aab612e903d@mail.gmail.com> References: <3307cdf90804180939t42fed2d7k8fc96304f8d01455@mail.gmail.com> <1208576146.3090.5.camel@raven.themaw.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6145197287216573936==" Return-path: In-Reply-To: <1208576146.3090.5.camel@raven.themaw.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: Ian Kent Cc: autofs@linux.kernel.org --===============6145197287216573936== Content-Type: multipart/alternative; boundary="----=_Part_8388_32949118.1208627536054" ------=_Part_8388_32949118.1208627536054 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for the prompt response. Yes, I'm using autofs4 which came with CentOS release 4.6 mount -V mount: mount-2.12a Is that version of mount OK or do I need a newer version to work with the locking path? If I need a newer version can you please let me know approximately which one? Lastly, does autofs5 not have this issue? Thanks, On Fri, Apr 18, 2008 at 8:35 PM, Ian Kent wrote: > > On Fri, 2008-04-18 at 09:39 -0700, Rajouri Jammu wrote: > > Hi, > > > > > > I'm trying to bring up a stacked file system on top of an NFS mount > > point both via automount. > > > > > > For example: > > On my client system I have two directories /data1 and /data2 > > /data1/nfs_01 > > /data2/nfs_01 > > > > > > nfs_server:/data/nfs_01 is mounted on /data1/nfs_01 (type nfs) > > > > > > /data1/nfs_01 is mounted on /data2/nfs_01 > > > > > > The automount config files look like: > > /etc/auto.data1: > > nfs_01 nfs_server:/data/nfs_01 > > > > > > > > /etc/auto.data2: > > nfs_01 -fstype=ecryptfs :/data1/nfs_01 > > > > > > > > > > The problem: > > > > > > When I try to access /data2/nfs_01 it kicks in automount to > > mount /data1/nfs_01, which in turn kicks in automount again to mount > > nfs_server:/data/nfs_01 on /data1/nfs_01. > > > > > > The second mount waits for 10secs for a lock file held by the first > > mount in mount_nfs.c after mkdir_path(). > > So you're running version 4? > > > > > > > Is there a way I can configure things such that the second mount > > doesn't wait? > > There is a patch around to add a configure option > "--disable-mount-locking" but you need to be sure you're mount(8) is at > least reasonably up to date. > > You may want to look in > http://www.kernel.org/pub/linux/daemons/autofs/v4/ > > > > > > > > > The lock file is a single global. > > > > Should the file be specific to the mount point? > > No, it is meant help prevent corruption of /etc/mtab as the locking in > mount(8) was broken for a long time. > > Ian > > > > ------=_Part_8388_32949118.1208627536054 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thank you for the prompt response.

Yes, I'm using autofs4 which came with CentOS release 4.6 

mount -V
mount: mount-2.12a

Is that version of mount OK or do I need a newer version to work with the locking path?
If I need a newer version can you please let me know approximately which one?

Lastly, does autofs5 not have this issue?


Thanks,

On Fri, Apr 18, 2008 at 8:35 PM, Ian Kent <raven@themaw.net> wrote:

On Fri, 2008-04-18 at 09:39 -0700, Rajouri Jammu wrote:
> Hi,
>
>
> I'm trying to bring up a stacked file system on top of an NFS mount
> point both via automount.
>
>
> For example:
> On my client system I have two directories /data1 and /data2
> /data1/nfs_01
> /data2/nfs_01
>
>
> nfs_server:/data/nfs_01 is mounted on /data1/nfs_01 (type nfs)
>
>
> /data1/nfs_01 is mounted on /data2/nfs_01
>
>
> The automount config files look like:
> /etc/auto.data1:
> nfs_01   nfs_server:/data/nfs_01
>
>
>
> /etc/auto.data2:
> nfs_01   -fstype=ecryptfs :/data1/nfs_01
>
>
>
>
> The problem:
>
>
> When I try to access /data2/nfs_01 it kicks in automount to
> mount /data1/nfs_01, which in turn kicks in automount again to mount
> nfs_server:/data/nfs_01 on /data1/nfs_01.
>
>
> The second mount waits for 10secs for a lock file held by the first
> mount in mount_nfs.c after mkdir_path().

So you're running version 4?

>
>
> Is there a way I can configure things such that the second mount
> doesn't wait?

There is a patch around to add a configure option
"--disable-mount-locking" but you need to be sure you're mount(8) is at
least reasonably up to date.

You may want to look in
http://www.kernel.org/pub/linux/daemons/autofs/v4/

>
>
>
> The lock file is a single global.
>
> Should the file be specific to the mount point?

No, it is meant help prevent corruption of /etc/mtab as the locking in
mount(8) was broken for a long time.

Ian




------=_Part_8388_32949118.1208627536054-- --===============6145197287216573936== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs --===============6145197287216573936==--