You are not logged in.

#1 2010-08-12 02:12:14

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Two quirks mounting nfs4 shares

I've just spent some time troubleshooting a nfs4 setup that used to work fine but at some recent update broke. I didn't see any discussion of the issues here, so I thought I'd post what I've learned.

1. Suppose your root exported nfs directory is /srv/nfs, and that you also want clients to be able to access /srv/nfs/subdirectory, which is a directory elsewhere on your drive remounted underneath /srv/nfs. There are two ways to specify this in your /etc/exports file. First, you can add the "crossmnt" option to the line exporting /srv/nfs. (And if you do that, you don't even need a line exporting /srv/nfs/subdirectory, if the clients are never going to ask to mount it directly.) Alternatively, you can add a line exporting /srv/nfs/subdirectory, and specify the "nohide" option on that line.

I used to use the "crossmnt" option, but it turns out that with recent nfs4 updates this has broken. I found some discussion of the issue here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567546, which says that upstream is aware of the problem but it's not clear when a fix will arrive. That report said that the issue affected nfs-utils 1.2.1 and 1.2.2, and that the problem appeared with both the "crossmnt" and "nohide" options. Perhaps it did once; I can report though that now the "nohide" option seems to be working, but "crossmnt" still doesn't work.

2. A separate issue has to do with auto-mounting nfs volumes on a client. Suppose your /etc/fstab line has an entry like this:

my_nfs_server:/ /mnt/my_nfs_mountpoint   nfs4    noauto,nosuid,nodev,noatime,_netdev 0 0

If the network is available on the client, and the nfs server is active, then formerly one could rely on "sudo mount -a" (or sudo /etc/rc.d/netfs start) on the client mounting the nfs share for you. However this doesn't seem to work anymore. I don't know when it broke.

Note that if there's such a line in your fstab, then just doing:

sudo mount /mnt/my_nfs_mountpoint

will work. You don't need to do a fully explicit, name-the-server-and-netfilesystem-type mount. But for some reason the "mount -a" type commands aren't working.

This recent thread https://bbs.archlinux.org/viewtopic.php?id=102407 about autofs could be connected, though that issue is there said to have been around for a while.

If any readers have insights/further links about these issues, they'd be welcome. As I said, I thought I'd post just to help anyone else who encountered these problems.

Offline

#2 2010-08-12 03:21:23

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Two quirks mounting nfs4 shares

I'm pretty sure that the noauto mount option in your fstab example means that you have to manually mount.
"sudo mount -a" will ignore that entry.

From man mount:

       auto   Can be mounted with the -a option.

       noauto Can  only  be  mounted explicitly (i.e., the -a
              option will not  cause  the  filesystem  to  be
              mounted).

Last edited by my0pic (2010-08-12 03:23:27)

Offline

#3 2010-08-12 04:18:17

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Two quirks mounting nfs4 shares

• . . . . . .. . . . . . . . . . . ,.-'". . . . . . . . . .``~.,
. . . . . . . .. . . . . .,.-". . . . . . . . . . . . . . . . . ."-.,
. . . . .. . . . . . ..,/. . . . . . . . . . . . . . . . . . . . . . . ":,
. . . . . . . .. .,?. . . . . . . . . . . . . . . . . . . . . . . . . . .\,
. . . . . . . . . /. . . . . . . . . . . . . . . . . . . . . . . . . . . . ,}
. . . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . . ,:`^`.}
. . . . . . . ./. . . . . . . . . . . . . . . . . . . . . . . . . ,:". . . ./
. . . . . . .?. . . __. . . . . . . . . . . . . . . . . . . . :`. . . ./
. . . . . . . /__.(. . ."~-,_. . . . . . . . . . . . . . ,:`. . . .. ./
. . . . . . /(_. . "~,_. . . .."~,_. . . . . . . . . .,:`. . . . _/
. . . .. .{.._$;_. . ."=,_. . . ."-,_. . . ,.-~-,}, .~"; /. .. .}
. . .. . .((. . .*~_. . . ."=-._. . .";,,./`. . /" . . . ./. .. ../
. . . .. . .\`~,. . .."~.,. . . . . . . . . ..`. . .}. . . . . . ../
. . . . . .(. ..`=-,,. . . .`. . . . . . . . . . . ..(. . . ;_,,-"
. . . . . ../.`~,. . ..`-.. . . . . . . . . . . . . . ..\. . /\
. . . . . . \`~.*-,. . . . . . . . . . . . . . . . . ..|,./.....\,__
,,_. . . . . }.>-._\. . . . . . . . . . . . . . . . . .|. . . . . . ..`=~-,
. .. `=~-,_\_. . . `\,. . . . . . . . . . . . . . . . .\
. . . . . . . . . .`=~-,,.\,. . . . . . . . . . . . . . . .\
. . . . . . . . . . . . . . . . `:,, . . . . . . . . . . . . . `\. . . . . . ..__
. . . . . . . . . . . . . . . . . . .`=-,. . . . . . . . . .,%`>--

Offline

#4 2010-08-12 04:20:26

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: Two quirks mounting nfs4 shares

Hey, how did you know what I looked like ? smile

Offline

Board footer

Powered by FluxBB