Skip to contentSkip to conversation

automount doesn't expire nested nfs mounts for certain kernel configs

DISCUSSION mack 2 participants 9 messages May 9, 2004 – May 10, 2004 Kernel automounter

lore
Share & tools
lore

mack

author
#0 lore raw

I have 6 similar systems, which automount and auto-expire floppy, zipdisk, cdrom and nfs
mounts just fine.

Except 2 of the systems won't umount nested nfs mounts on timeout. These nfs mounts stay mounted forever. No messages appear the logs not even messages to indicate that automount has timed out the mounts and is trying to umount them.

If I umount the lower dependant nfs mounts, leaving only the top autofs nfs mount, the top level autofs nfs mount will expire normally.

here is a sample line from the auto.nfs file

routera -fstype=nfs,soft / routera:/ /usr routera:/usr /src
routera:/src

Google didn't have any answers when looking through the mailing list with "autofs expire nested"

The systems are near identical (cloned progressively from each other, so there will be some differences and some machines get updated more often, but the differences should be small).

Comparing the kernels of a pair of machines, one of which auto expires OK and one which doesn't, I find in the file system section

machine that does autoexpire nested nfs mounts

< > Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

machine that doesn't autoexpire nested nfs mounts

<M> Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Re-compiling the kernel/modules on the machine that doesn't work with the .config for the machine that does work, fixes the problem. I assume having the first line turned on kills the auto expiration for nested nfs mounts, but I don't know why.

I guess this is a bug report.

I'm using kernel 2.4.26, libc-2.3.2, gcc 2.95.3, autofs-4.0.0pre10

I can't get the automount from autofs-4.1.2 to load on the machine which doesn't autoexpire. automount runs and exits with no process in the ps table, no errors in the logs. Running with -d gives a few lines in the log files as it fires up, but no error messages. firing up the demon under strace, looks the same in both cases, as I don't see anything after the fork().

autofs-4.1.2 works fine on the machine without the first module.

Request: Can the install script not overwrite any existing /etc/auto.* files please? You can install new ones as auto.*.NEW if you like.

Request: Can automount be loaded without going into demon mode, so that I can watch the logs on stdout?

Thanks Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
maintainer
#1 lore raw
Quoted 24 lines · mack

I have 6 similar systems, which automount and auto-expire floppy, zipdisk, cdrom and nfs
mounts just fine.

Except 2 of the systems won't umount nested nfs mounts on timeout. These nfs mounts stay mounted forever. No messages appear the logs not even messages to indicate that automount has timed out the mounts and is trying to umount them.

If I umount the lower dependant nfs mounts, leaving only the top autofs nfs mount, the top level autofs nfs mount will expire normally.

here is a sample line from the auto.nfs file

routera -fstype=nfs,soft / routera:/ /usr routera:/usr /src
routera:/src

Google didn't have any answers when looking through the mailing list with "autofs expire nested"

The systems are near identical (cloned progressively from each other, so there will be some differences and some machines get updated more often, but the differences should be small).

Quoted 7 lines

Comparing the kernels of a pair of machines, one of which auto expires OK and one which doesn't, I find in the file system section

machine that does autoexpire nested nfs mounts

< > Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Yes. It loads the autofs4 module.

Quoted 10 lines

machine that doesn't autoexpire nested nfs mounts

<M> Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Re-compiling the kernel/modules on the machine that doesn't work with the .config for the machine that does work, fixes the problem. I assume having the first line turned on kills the auto expiration for nested nfs mounts, but I don't know why.

Using autofs-4.0.0 you need to add

alias autofs autofs4

to your modules.conf to ensure that autofs4 gets loaded.

I wasn't aware expire didn't work with the autofs module and v4.

Quoted 3 lines

I guess this is a bug report.

I reccommend using matching autofs and daemon.

Quoted 7 lines

I'm using kernel 2.4.26, libc-2.3.2, gcc 2.95.3, autofs-4.0.0pre10

I can't get the automount from autofs-4.1.2 to load on the machine which doesn't autoexpire. automount runs and exits with no process in the ps table, no errors in the logs. Running with -d gives a few lines in the log files as it fires up, but no error messages. firing up the demon under strace, looks the same in both cases, as I don't see anything after the fork().

Are you actually sending the *.debug to the log?

Quoted 5 lines

autofs-4.1.2 works fine on the machine without the first module.

Request: Can the install script not overwrite any existing /etc/auto.* files please? You can install new ones as auto.*.NEW if you like.

OK. That bugs me as well.

Quoted 3 lines

Request: Can automount be loaded without going into demon mode, so that I can watch the logs on stdout?

Not at the moment.

Ian

#2 lore raw
Quoted 12 lines · Ian Kent
Quoted 4 lines

machine that does autoexpire nested nfs mounts

< > Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Yes. It loads the autofs4 module.

Quoted 5 lines

machine that doesn't autoexpire nested nfs mounts

<M> Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Looked at the kernel config help for these options to find that you don't activate the first option if you want autofs v3 or v4 support. Since the question is simple, and knew I wanted autofs support, it never occured to me to read the help. I just said yes to the first option. I didn't know what the first line did or why there were two lines for autofs. Perhaps I thought that the first line was core autofs code while the 2nd line was for v3 and v4.

Here's a suggestion for a fix

< > Kernel automounter version 1,2 support (incompatible with v3,4) < > Kernel automounter version 3,4 support

Quoted 5 lines

Using autofs-4.0.0 you need to add

alias autofs autofs4

to your modules.conf to ensure that autofs4 gets loaded.

autofs4 was loaded

Quoted 1 line

I wasn't aware expire didn't work with the autofs module and v4.

If you have the first option activated in the kernel config then
expire with _nested_ nfs mounts doesn't work automount from autofs-4.1.2 won't load (well, loads and exits) automount from autofs-4.0.0pre10 loads OK
expire with non-nested mounts works fine
fi

Quoted 7 lines
Quoted 5 lines

I can't get the automount from autofs-4.1.2 to load on the machine which doesn't autoexpire. automount runs and exits with no process in the ps table, no errors in the logs. Running with -d gives a few lines in the log files as it fires up, but no error messages. firing up the demon under strace, looks the same in both cases, as I don't see anything after the fork().

Are you actually sending the *.debug to the log?

I was looking in the wrong spot. autofs-4.0.0pre10 on my machine sends the logs to a file called debug (don't have machine here, so I don't know what's in syslogd.conf). I expected the logs from autofs-4.1.2 to go to the same file, but it's being sent to the file "messages". So I found the output now.

Thanks Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#3 lore raw
Quoted 23 lines · On Mon, 10 May 2004, Joseph Mack NA3T wrote:
Quoted 12 lines · Ian Kent
Quoted 4 lines

machine that does autoexpire nested nfs mounts

< > Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Yes. It loads the autofs4 module.

Quoted 5 lines

machine that doesn't autoexpire nested nfs mounts

<M> Kernel automounter support
<M> Kernel automounter version 4 support (also supports v3)

Looked at the kernel config help for these options to find that you don't activate the first option if you want autofs v3 or v4 support. Since the question is simple, and knew I wanted autofs support, it never occured to me to read the help. I just said yes to the first option. I didn't know what the first line did or why there were two lines for autofs. Perhaps I thought that the first line was core autofs code while the 2nd line was for v3 and v4.

Quoted 5 lines

Here's a suggestion for a fix

< > Kernel automounter version 1,2 support (incompatible with v3,4) < > Kernel automounter version 3,4 support

That's not right.

The first option is autofs (aka v3).

As far as I'm aware both should work with basic functionality.

Quoted 7 lines
Quoted 5 lines

Using autofs-4.0.0 you need to add

alias autofs autofs4

to your modules.conf to ensure that autofs4 gets loaded.

autofs4 was loaded

4.1.0 and above should automatically load the v4 module unless the v3 module is already loaded.

Quoted 10 lines
Quoted 2 lines

I wasn't aware expire didn't work with the autofs module and v4.

If you have the first option activated in the kernel config then
expire with _nested_ nfs mounts doesn't work automount from autofs-4.1.2 won't load (well, loads and exits) automount from autofs-4.0.0pre10 loads OK
expire with non-nested mounts works fine
fi

autofs-4.0.0-1 was my first release. It added some fixes for submounts. pre10 was always a pre-release.

With autofs-4.1.2 add a -d to the master map line and send the log fragment.

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

I can't get the automount from autofs-4.1.2 to load on the machine which doesn't autoexpire. automount runs and exits with no process in the ps table, no errors in the logs. Running with -d gives a few lines in the log files as it fires up, but no error messages. firing up the demon under strace, looks the same in both cases, as I don't see anything after the fork().

Quoted 7 lines
Quoted 1 line

Are you actually sending the *.debug to the log?

I was looking in the wrong spot. autofs-4.0.0pre10 on my machine sends the logs to a file called debug (don't have machine here, so I don't know what's in syslogd.conf). I expected the logs from autofs-4.1.2 to go to the same file, but it's being sent to the file "messages". So I found the output now.

Depends on your syslog config.

Different severities may go to different locations.

Unless you add either -v or -d to the master map line you shouldn't see much output.

What is in your master map then?
And the map your trying to load?

Ian

#4 lore raw
Quoted 9 lines · On Mon, 10 May 2004 [email protected] wrote:
Quoted 5 lines

Here's a suggestion for a fix

< > Kernel automounter version 1,2 support (incompatible with v3,4) < > Kernel automounter version 3,4 support

That's not right.

The first option is autofs (aka v3).

OK, I don't know what's really going on here. I just know that to get what I want (expiration of nested nfs mounts), I can't have the first one activated, and you don't find this out till you read the kernel config help file.

Quoted 2 lines

4.1.0 and above should automatically load the v4 module unless the v3 module is already loaded.

no autofs.o, only autofs4.o loaded on my machine.

Quoted 2 lines

With autofs-4.1.2 add a -d to the master map line and send the log fragment.

OK, not knowing where to add the -d, I'd put it in the autofs init.d script with daemonoptions and it seemed to work

Let me set it up here and I'll post some logs (in another posting)

Quoted 1 line

What is in your master map then?

/nfs /etc/auto.nfs.machine_name -bg,intr,suid,nodev

Quoted 1 line

And the map your trying to load?

I sent a line with my first posting. It was

server	-fstype=nfs,soft	/ server:/ \
				/usr server:/usr \
				/src server:/src

Thanks Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#5 lore raw
Quoted 6 lines · On Mon, 10 May 2004, Joseph Mack NA3T wrote:
Quoted 3 lines

With autofs-4.1.2 add a -d to the master map line and send the log fragment.

OK, not knowing where to add the -d, I'd put it in the autofs init.d script with daemonoptions and it seemed to work

That should work fine.

Quoted 10 lines

Let me set it up here and I'll post some logs (in another posting)

Quoted 1 line

What is in your master map then?

/nfs /etc/auto.nfs.machine_name -bg,intr,suid,nodev

Quoted 1 line

And the map your trying to load?

I sent a line with my first posting. It was

Saw that afterward.

I'll check this out but I've been working on this multi mount stuff recently and it seemed OK.

Do you have anything running that may be scanning the directories?

The compaq stuff has done this in the past or sometimes gnome destops have this problem.

You might like to apply the 4.1.2 patches at the same location you got the tar.

Quoted 5 lines
server	-fstype=nfs,soft	/ server:/ \
				/usr server:/usr \
				/src server:/src
#6 lore raw
Quoted 1 line · On Mon, 10 May 2004 [email protected] wrote:

Do you have anything running that may be scanning the directories?

thought of that. There's nothing I know of that's doing it at 10sec intervals (my timeout) and I saw nothing with lsof or fuser. Also didn't see anything the logs (although didn't regard this as definitive). If anything was scanning directories, then disabling the first line in the kernel config wouldn't have fixed it.

Quoted 2 lines

The compaq stuff has done this in the past or sometimes gnome destops have this problem.

I use fvwm2 with a pile of xterms. I can't handle the fancy graphics interfaces.

Quoted 2 lines

You might like to apply the 4.1.2 patches at the same location you got the tar.

OK, will go get them

Thanks

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#7 lore raw
In reply to [email protected]
Quoted 2 lines · On Mon, 10 May 2004 [email protected] wrote:

You might like to apply the 4.1.2 patches at the same location you got the tar.

are the 2.4.22 patches OK if I'm using 2.4.26?

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#8 lore raw
Quoted 6 lines · On Mon, 10 May 2004, Joseph Mack NA3T wrote:
Quoted 2 lines · On Mon, 10 May 2004 [email protected] wrote:

You might like to apply the 4.1.2 patches at the same location you got the tar.

are the 2.4.22 patches OK if I'm using 2.4.26?

Haven't checked 2.4.26.
Would like to hear if it applies cleanly.

Ian