LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-09-2009, 09:49 AM   #1
rmahn
LQ Newbie
 
Registered: Apr 2009
Location: North Carolina, USA
Distribution: mostly Fedora
Posts: 2
Thanked: 1
can't mount via NFS4


[Log in to get rid of this advertisement]
When I try to mount using nfs4, I get no such file or directory.

Configuration:
Fedora 11 on server and client. Both have been updated with the latest updates.

What works:
nfs3 works fine.

What doesn't work:
nfs4. I've tried it from other OSes including Fedora 4, and Fedora 1. I get similar problems, although the actual messages are slightly different.

What I've tried:
Again nfs3 works fine. I had to set specific ports and open them through the firewall, but other than that nfs3 and nfs2 are fine. I've checked the ports for nfs4 and they are open. I've used tcpdump to verify that the networking communication is correct. I've turned off the firewalls as well, with no difference. I am not able to find any error logs on either the server or the client. Only an error message after entering the mount command. My gut feel is that either there is a bug in the nfs daemon or I have something wrong in the configuration somewhere, such as the /etc/exports file. I have tried this:
/mountpoint *(sync)
and even that hasn't worked. I've modified /etc/init.d/nfs by removing the restriction on using nfs 4.1. /proc/fs/nfsd/versions shows
+2 +3 +4 +4.1
In almost all these cases, I can use
mount -t nfs host:/mountpoint /mnt
without any problem. But when I change it to
mount -t nfs4 host:/mountpoint /mnt
I get the error:
mount.nfs4: mounting host:/mountpoint failed, reason given by server:
No such file or directory
Exit 32


I haven't seen any other threads on this problem, so I must have something mis-configured, but I can't figure out what it is. Anyone have any suggestions?
windows_xp_2003 rmahn is offline  
Tag This Post ,
Reply With Quote
Old 09-09-2009, 10:56 AM   #2
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 90
Thanked: 4
Do you have the package

nfs4-acl-tools

Installed, I have not tried but it may be the mount of an nfs4 share requires the programs below which are provided by this package and my explain why you get a no such file or directory error.

/usr/bin/nfs4_editfacl
/usr/bin/nfs4_getfacl
/usr/bin/nfs4_setfacl
linuxfedora cardy is offline     Reply With Quote
Old 09-10-2009, 08:09 AM   #3
rmahn
LQ Newbie
 
Registered: Apr 2009
Location: North Carolina, USA
Distribution: mostly Fedora
Posts: 2
Thanked: 1

Original Poster
After more research, I found out the problem. It's that nfs4 has a different paradigm than earlier versions. The basic solution is this:
mount -t nfs4 host:/ /mnt

The nfs4 system uses a single hierarchical tree to export--it isn't capable of exporting multiple separate directories or filesystems. You can use the mount -bind <real_dir> <pseudo_dir> strategy to create a single hierarchical tree with all the directories you want to export, and on the client machines you can mount the desired individual portions of the tree. However, I haven't yet found a way to set up the exports to permit some clients to have access to some portions of the hierarchy and other clients to have access to other portions. So far I've found that any restrictions on the root of the hierarchical tree are carried to all the branches and leaves. It's not a huge problem for my current situation, but it seems that nfs4 would not be very useful for a real "file server" that allocates various filesystems to various groups of users.
windows_xp_2003 rmahn is offline  
Tag This Post ,
Reply With Quote
Thanked by:
Old 09-10-2009, 08:26 AM   #4
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 90
Thanked: 4
I am glad you found a solution I will have to look into nfs4 a little more. I am guessing the nfs4-acl-tools allow you to apply the permissions you require, maybe that will allow you to better define the security permissions (see my last post above)
linuxfedora cardy is offline     Reply With Quote
Old 09-10-2009, 09:35 AM   #5
avalonit
Member
 
Registered: Jun 2008
Posts: 63
Thanked: 4
rmahn,

I'm happy you found out the nfs4 thing and it will be useful for others. nfs4 also gives you much better support for locking and security control.

I can't understand how the new model is restricting you?

/etc/exports
Code:
/path       10.77.78.0/22(rw,async,root_squash,insecure,fsid=0)
What would be different in nfs3?
linuxdebian avalonit is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs4 support [GOD]Anck Slackware 5 05-25-2009 08:54 PM
packages required for NFS4? cool47 Red Hat 1 03-19-2008 10:42 PM
NFS4 mount showing wrong ownership tisource Linux - Networking 1 09-11-2006 02:02 PM
acl and Nfs4 collen Linux - Networking 0 09-30-2004 08:58 AM
Nfs4 not work.. collen Linux - Networking 0 09-02-2004 04:23 AM


All times are GMT -5. The time now is 07:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration