You are not logged in.

#1 2014-05-05 20:56:53

hippieben
Member
Registered: 2013-10-27
Posts: 218

Help setting up NFS

I've been at this for a while now, and been through multiple attempts but I just can't seem to get nfs to work.

When I try to connect on my client I get mount.nfs: Failed to resolve server arch-desktop.local: Name or service not known

Server Files:

/etc/hostname

arch-desktop

/etc/hosts

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost
::1             localhost.localdomain   localhost


# End of file

/etc/exports

/srv/nfs4 192.168.1.37/255.255.255.0(fsid=0,rw,sync,no_subtree_check,async,no_root_squash)
/srv/nfs4/ben 192.168.1.37/255.255.255.0(rw,sync,no_subtree_check,async,no_root_squash,nohide)

/etc/fstab

#NFS Exports
nfsd /proc/fs/nfsd nfsd rw,user,nodev,exec,nosuid 0 0 
/home/ben /srv/nfs4/ben none bind

/etc/nsswitch.conf

# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files mdns_minimal [NOTFOUND=return] dns myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf

Client mount command

mount -t nfs 192.168.1.42:/ben /mnt/nfs/ben
mount -t nfs arch-desktop:/ben /mnt/nfs/ben
mount -t nfs arch-desktop.local:/ben /mnt/nfs/ben

None of which work and I'm not using any kind of firewall

Anyone have any advice to offer, the wiki doesn't seem to be helping any?  Thanks.

Last edited by hippieben (2014-05-05 21:00:11)

Offline

#2 2014-05-05 21:12:52

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Help setting up NFS

mount -t nfs is for nfs versions 2 & 3. Try mount -t nfs4. It should also work without specifying type.

When I try to connect on my client I get mount.nfs: Failed to resolve server arch-desktop.local: Name or service not known

I guess this was the output of

mount -t nfs arch-desktop.local:/ben /mnt/nfs/ben

Did the other two commands fail with a similar error (Failed to resolve server ...: Name or service not known)? If not, you should have posted those errors too. That looks like a bad address, not a problem with mount or nfs.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2014-05-05 21:18:34

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

alphaniner wrote:

mount -t nfs is for nfs versions 2 & 3. Try mount -t nfs4. It should also work without specifying type.

When I try to connect on my client I get mount.nfs: Failed to resolve server arch-desktop.local: Name or service not known

I guess this was the output of

mount -t nfs arch-desktop.local:/ben /mnt/nfs/ben

Did the other two commands fail with a similar error (Failed to resolve server ...: Name or service not known)? If not, you should have posted those errors too. That looks like a bad address, not a problem with mount or nfs.

Exact same error with -t nfs4 and hangs when I do -t nfs4 and use the IP address, which is expected I guess.

Offline

#4 2014-05-05 21:30:37

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Help setting up NFS

hangs when I do -t nfs4 and use the IP address, which is expected I guess.

Why is that expected?

Also, why do you have nfsd in your fstab?
And both sync and async in your exports?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2014-05-05 21:35:56

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Help setting up NFS

What you are doing looks nothing like what I see in the wiki. Are you sure you read the nfs wiki entry?  https://wiki.archlinux.org/index.php/Nfs#Exports

Offline

#6 2014-05-05 21:41:13

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

2ManyDogs wrote:

What you are doing looks nothing like what I see in the wiki. Are you sure you read the nfs wiki entry?  https://wiki.archlinux.org/index.php/Nfs#Exports

Wiki instructions didn't work, so I did some googling and found some forum posts.  What's posted is what my configuration is right now.

Offline

#7 2014-05-05 21:45:46

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

Changed exports to match wiki, same results

Offline

#8 2014-05-05 21:48:48

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Help setting up NFS

Try following all the wiki instructions exactly, just to get it working, then modify it if you really think you need to. It works for me, and obviously works for whoever wrote the wiki page, so you must be doing something wrong. You're sure you have the nfs server running?

Offline

#9 2014-05-05 21:53:56

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

2ManyDogs wrote:

Try following all the wiki instructions exactly, just to get it working, then modify it if you really think you need to. It works for me, and obviously works for whoever wrote the wiki page, so you must be doing something wrong. You're sure you have the nfs server running?

I think the issue is setting the domain in idmapd.conf.  What is my domain?  How do I set it up?  Instructions unclear, computer stuck in tree.

Offline

#10 2014-05-05 21:59:13

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Help setting up NFS

Probably not. I don't even have an imapd.conf file. I just know what works on my machine. I have this in /etc/exports on the server:

/media/shared   192.168.0.0/255.255.255.0(rw,sync,no_subtree_check)

and then I connect with the ip adress of the server, or I add it to /etc/hosts on the client

192.168.0.23 otherbox

and then this just works:

mount otherbox:/media/shared /mnt

But I will leave this now for others who know more about nfs. This may be really bad advice, but it works for me.

Last edited by 2ManyDogs (2014-05-06 05:47:05)

Offline

#11 2014-05-05 23:42:15

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

I'll try playing with the hosts file on the client. Looks promising. Thanks for the reply.

Offline

#12 2014-05-06 05:43:55

hippieben
Member
Registered: 2013-10-27
Posts: 218

Re: Help setting up NFS

Got it working.

Next issue is that

arch-desktop:/srv/nfs4/ben /mnt/nfs/ben nfs4 rsize8192,wsize-8192,timeo-14,intr,_netdev 0 0

in fstab doesn't mount the share with "mount -all" and in turn mounting with networkmanager doesn't work either.

Last edited by hippieben (2014-05-06 06:17:46)

Offline

Board footer

Powered by FluxBB