View previous topic :: View next topic |
Author |
Message |
borfig Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 27 Oct 2004 Posts: 162
|
Posted: Sat Jan 19, 2008 10:05 am Post subject: NFSv4 problems: mount point not found??? |
|
|
I have a NFSv4 server and a client with net-fs/nfs-utils-1.1.1 (with nonfsv4 USE flag disabled of course)
My /etc/exports looks like:
Code: | /exports 1.2.*(ro,fsid=0,secure,no_subtree_check,sync,root_squash)
/exports/portage 1.2.*(rw,secure,no_subtree_check,sync,nohide,no_root_squash) |
when /exports/portage is a symlink to the server's /usr/portage
When the client tries to mount server:/ it works, but when it tries to mount /portage, I get:
Code: | client ~ # mount -t nfs4 server:/portage /usr/portage/
mount.nfs4: mount point /usr/portage is not a directory |
but /usr/portage is a directory...
dmesg shows:
Code: | nfs4_get_root: lookupfh encountered non-directory |
What am I doing wrong here??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gazj n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/6044754784744b160b3c7b.jpg)
Joined: 18 Nov 2007 Posts: 49 Location: Cambs, UK
|
Posted: Sat Jan 19, 2008 10:30 am Post subject: |
|
|
Your mount line needs to be
Code: | mount -t nfs4 server:/exports/portage /usr/portage/ |
i.e you need the absolute path from your server in the mount command _________________ Gary |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
borfig Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 27 Oct 2004 Posts: 162
|
Posted: Sat Jan 19, 2008 7:19 pm Post subject: |
|
|
gazj wrote: | Your mount line needs to be
Code: | mount -t nfs4 server:/exports/portage /usr/portage/ |
i.e you need the absolute path from your server in the mount command |
your suggestion contradicts the documentation. But I will try.. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gazj n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/6044754784744b160b3c7b.jpg)
Joined: 18 Nov 2007 Posts: 49 Location: Cambs, UK
|
Posted: Sat Jan 19, 2008 8:31 pm Post subject: |
|
|
I must admit I haven't used it in a mount command for a long time, but it's how it is used in /etc/fstab. Mine line is full path as follows
server:/data/home /home/docs nfs rw 0 0 _________________ Gary |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tarpman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/194464846347fed31505afc.jpg)
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Sun Jan 20, 2008 12:38 am Post subject: |
|
|
gazj wrote: | Your mount line needs to be
Code: | mount -t nfs4 server:/exports/portage /usr/portage/ |
i.e you need the absolute path from your server in the mount command |
No. This format changed in nfsv4. What he has already is correct.
borfig, I think your problem is that /exports/portage is a symlink, which could be confirmed by the message you posted:
borfig wrote: | Code: | nfs4_get_root: lookupfh encountered non-directory |
|
The correct fix is to use a bind mount instead of a symlink. To do this, remove the symlink, create an empty directory at /exports/portage, and add the following line in the server's /etc/fstab:
/etc/fstab: | /usr/portage /exports/portage none bind 0 0 |
And then to mount it without rebooting:
Code: | mount /exports/portage |
_________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gazj n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/6044754784744b160b3c7b.jpg)
Joined: 18 Nov 2007 Posts: 49 Location: Cambs, UK
|
Posted: Sun Jan 20, 2008 1:22 am Post subject: |
|
|
Quote: | No. This format changed in nfsv4. What he has already is correct. |
Well you learn something new everyday . Is nfsv4 backwards compatible with the old way as a matter of interest. May have to look into new features of nfsv4 for my server. _________________ Gary |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tarpman Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/194464846347fed31505afc.jpg)
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Sun Jan 20, 2008 7:45 am Post subject: |
|
|
gazj wrote: | Quote: | No. This format changed in nfsv4. What he has already is correct. |
Well you learn something new everyday . Is nfsv4 backwards compatible with the old way as a matter of interest. May have to look into new features of nfsv4 for my server. |
They are different filesystems as far as the kernel is concerned. nfsv4 also has slightly different exports and mount options (you've already seen one difference there). The vast majority of stuff from our point of view does work the same, though. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
chris.c.hogan Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 02 Oct 2005 Posts: 189
|
Posted: Sun Jan 20, 2008 8:23 am Post subject: |
|
|
Not sure if this adds anything to the topic. However...
I have /usr/portage symlinked to /mnt/net/portage without this problem. However, I have the mount set up in /etc/fstab:
Code: |
server:/portage /mnt/net/portage nfs4 defaults 0 0
| (I have some other options set instead of defaults. I'm on a different system and can't remember them off the top of my head)
From the client I can mount like so:
Mount seems to see that /usr/portage is a symlink to /mnt/net/portage and finds the correct entry in /etc/fstab. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
borfig Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 27 Oct 2004 Posts: 162
|
Posted: Sun Jan 20, 2008 6:40 pm Post subject: |
|
|
Now that I mounted the NFSv4 with bind on the server as tarpman suggested.
ls /usr/portage works, but cat'ing files (and running emerge) freezes.
I get the following message in dmesg:
Code: | Error: state recovery failed on NFSv4 server 1.2.3.4 with error 121 |
What is that??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
toralf Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/10034462014367c4dfe33c1.gif)
Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Wed Feb 13, 2008 1:43 pm Post subject: |
|
|
I've a similar problem. At my nfs server I've this exports Code: | n22 ~ # cat /etc/exports
# /etc/exports: NFS file systems being exported. See exports(5).
/tmp n22_uml(rw,sync,all_squash,fsid=0,no_subtree_check)
| A mount with NFSv3 works fine : Code: | n22_uml ~ # mount -t nfs n22:/tmp /mnt/nfs/n22_tmp && ls -ld /mnt/nfs/n22_tmp/ks* && umount /mnt/nfs/n22_tmp
drwx------ 3 tfoerste users 4096 Feb 13 14:33 /mnt/nfs/n22_tmp/ksocket-tfoerste | whereas for NFSv4 it failed with : Code: | n22_uml ~ # mount -t nfs4 n22:/tmp /mnt/nfs/n22_tmp && ls -ld /mnt/nfs/n22_tmp/ks* && umount /mnt/nfs/n22_tmp
mount.nfs4: mount point /mnt/nfs/n22_tmp does not exist |
BTW a diff of the strace files shows this differenc:
tfoerste@n22 /tmp $ grep -B 4 -A 4 WEXITSTATUS v?.out
v3.out-getcwd("/root", 4095) = 6
v3.out-readlink("/root/n22:", 0xbfb18b0b, 4096) = -1 ENOENT (No such file or directory)
v3.out-stat64("/sbin/mount.nfs", {st_mode=S_IFREG|S_ISUID|0511, st_size=47352, ...}) = 0
v3.out-clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x40160748) = 2278
v3.out:wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 2278
v3.out---- SIGCHLD (Child exited) @ 0 (0) ---
v3.out-exit_group(0) = ?
--
v4.out-getcwd("/root", 4095) = 6
v4.out-readlink("/root/n22:", 0xbf93612b, 4096) = -1 ENOENT (No such file or directory)
v4.out-stat64("/sbin/mount.nfs4", {st_mode=S_IFREG|S_ISUID|0511, st_size=47352, ...}) = 0
v4.out-clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x40160748) = 2264
v4.out:wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 32}], 0, NULL) = 2264
v4.out---- SIGCHLD (Child exited) @ 0 (0) ---
v4.out-exit_group(32) = ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|