NFS woes

Hello,

I’m trying to set up an NFS server with openSuSE 13.1. Problem is, when I try to mount the NFS system, it hangs and doesn’t actually mount…

Here is my /etc/exports:


/usr/local      *(fsid=0,crossmnt,ro,root_squash,sync,no_subtree_check)

Here is my /etc/fstab:


/dev/disk/by-id/ata-ST31000524AS_6VPH1GC5-part2 swap    swap    defaults 0 0 
/dev/disk/by-id/ata-ST31000524AS_6VPH1GC5-part1 /       ext4    defaults 1 1 
catch22bbs:/usr/local   /mnt    nfs     rsize=1024,wsize=1024 0 0 

Here is “rpcinfo -p”:


   program vers proto   port  service                                               
    100000    4   tcp    111  portmapper                                            
    100000    3   tcp    111  portmapper                                            
    100000    2   tcp    111  portmapper                                            
    100000    4   udp    111  portmapper                                            
    100000    3   udp    111  portmapper                                            
    100000    2   udp    111  portmapper                                            
    100005    1   udp  20048  mountd                                                
    100005    1   tcp  20048  mountd                                                
    100005    2   udp  20048  mountd                                                
    100005    2   tcp  20048  mountd                                                
    100005    3   udp  20048  mountd                                                
    100005    3   tcp  20048  mountd                                                
    100024    1   udp  38900  status                                                
    100024    1   tcp  42376  status                                                
    100003    2   tcp   2049  nfs                                                   
    100003    3   tcp   2049  nfs                                                   
    100003    4   tcp   2049  nfs                                                   
    100227    2   tcp   2049  nfs_acl                                               
    100227    3   tcp   2049  nfs_acl                                               
    100003    2   udp   2049  nfs                                                   
    100003    3   udp   2049  nfs                                                   
    100003    4   udp   2049  nfs                                                   
    100227    2   udp   2049  nfs_acl                                               
    100227    3   udp   2049  nfs_acl                                               
    100021    1   udp  45158  nlockmgr                                              
    100021    3   udp  45158  nlockmgr
    100021    4   udp  45158  nlockmgr
    100021    1   tcp  54632  nlockmgr
    100021    3   tcp  54632  nlockmgr
    100021    4   tcp  54632  nlockmgr

Any help would be greatly appreciated.

-Ignatius

I forgot to add a bit of pertinent information. Here is “rcnfs status”:


Checking for mounted nfs shares (from /etc/fstab):                       unused
nfs.service - LSB: NFS client services
   Loaded: loaded (/etc/init.d/nfs)
  Drop-In: /run/systemd/generator/nfs.service.d
           `-50-insserv.conf-$remote_fs.conf
   Active: active (running) since Sat 2014-07-26 09:15:01 PDT; 46min ago
  Process: 1322 ExecStart=/etc/init.d/nfs start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs.service
           `-1377 /usr/sbin/rpc.gssd -D -p /var/lib/nfs/rpc_pipefs

Jul 26 09:15:01 catch22bbs nfs[1322]: ..done
Jul 26 09:15:01 catch22bbs systemd[1]: Started LSB: NFS client services.
Jul 26 09:18:05 catch22bbs rpc.gssd[1377]: ERROR: unable to resolve 198.105.254...wn
Jul 26 09:18:05 catch22bbs rpc.gssd[1377]: ERROR: failed to read service info
Jul 26 09:24:27 catch22bbs rpc.gssd[1377]: ERROR: unable to resolve 198.105.244...wn
Jul 26 09:24:27 catch22bbs rpc.gssd[1377]: ERROR: failed to read service info
Jul 26 09:24:29 catch22bbs rpc.gssd[1377]: ERROR: unable to resolve 192.168.1.2...wn
Jul 26 09:24:29 catch22bbs rpc.gssd[1377]: ERROR: failed to read service info
Jul 26 09:50:47 catch22bbs rpc.gssd[1377]: ERROR: unable to resolve 198.105.254...wn
Jul 26 09:50:47 catch22bbs rpc.gssd[1377]: ERROR: failed to read service info
Hint: Some lines were ellipsized, use -l to show in full.


On 2014-07-27 02:16, ignatius999 wrote:
>
> I forgot to add a bit of pertinent information. Here is “rcnfs status”:
>

That shows that the server is running. But why does it want to resolve
those addresses?

And you do not show errors or messages from the client side (mount -v
…, for instance)

Why do you export “/usr/local/”? It is a system directory, I hope you
are not replacing contents with something else. Or are you just using it
for testing nfs export?


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I have no idea why it’s looking for those addresses. The problem is, while attempting to mount the NFS directories, it hangs. No output is given. And, yes, /usr/local is just for testing purposes. I changed it to /usr/nfs, and it still hangs.

Thanks,
Ignatius

It’s not clear to me what you might have missed in setting the NFS server up, or what you did to test on the client-side.

Have a read of this how-to

http://www.unixmen.com/setup-nfs-server-opensuse-13-1/

On 2014-07-27 04:36, ignatius999 wrote:
>
> I have no idea why it’s looking for those addresses. The problem is,
> while attempting to mount the NFS directories, it hangs.

What is “it”? The client? The server?

I say again: try mount -v whatever on client and wait at least 15
minutes (I don’t remember if timeout is 3).

> No output is
> given. And, yes, /usr/local is just for testing purposes. I changed it
> to /usr/nfs, and it still hangs.

Ok, no problem then.

Try fsid nonzero.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Ok. I got it working. That link brought some things to my attention that I didn’t know of before. Thank you much for the help.

Good to hear, but it might help others to know what you’d missed or had to adjust… :slight_smile:

Eh, I spoke too soon. While the client computer is trying to access the NFS share, I get the following messages:


Configuring ethernet card...
Configuring your gateway...
Running /sbin/rpc.portmap...
Mount NFS...
Mount: RPC: Timed out

Again, any help is greatly appreciated.

-ignatius

Did you use YaST > System > Services Manager to switch on nfs (the nfs client service)?

And please, while it is very good that you post computer text between CODE tags, why do you add stories like “Here is my /etc/exports”? Just post prompt, command, output and next prompt. Apart from the many advantages it has, in this case the pormpt will at leasts how us what you do on which system. Like:

henk@boven:~> cat /etc/exports
/home/wij       b*.henm.xs4all.nl(rw,sync,no_subtree_check)
henk@boven:~>
mgi@beneden:~> cat /etc/fstab
/dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part2   /       ext4    acl,user_xattr 1 1 
/dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part5   /home   ext4    acl,user_xattr 1 2 
/dev/disk/by-id/ata-ST2000DM001-1CH164_Z1E89L2J-part1   swap    swap    defaults 0 0 
boven.henm.xs4all.nl:/home/wij  /home/wij       nfs     noauto 0 0 
mgi@beneden:~>
mgi@beneden:~> grep boven /etc/hosts
10.0.0.154      boven.henm.xs4all.nl boven
mgi@beneden:~>

I’m sorry for not being more assertive. I’ll remember to be more assertive next time. But, yes, I did enable NFS in YaST.

On 2014-07-27 12:26, ignatius999 wrote:
>
> I’m sorry for not being more assertive. I’ll remember to be more
> assertive next time. But, yes, I did enable NFS in YaST.

But you see, it is not clear at all where you see that message:


Configuring ethernet card...
Configuring your gateway...
Running /sbin/rpc.portmap...
Mount NFS...
Mount: RPC: Timed out

You say that “trying to access the NFS share”, but… how exactly? What
commands are you using?

You see, to you all that may seem obvious, but you have to understand
that we are not sitting besides you looking at what you do, and we all
do things differently. So we have to fill the gaps with guesses, and
they may usually be wrong :slight_smile:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Ok. Here’s the issue: i’m trying to install Slackware off of the boot disk, since I don’t have access to a (working) CD-ROM drive. I’m using the “setup” command, and am selecting an “NFS” install. It’s all pretty much automated. I’d install openSuSE if I had it came with a boot disk. :slight_smile: Basically, it first asks for an IP address, then a netmask, then a gateway, and then, the IP address of the NFS server, and then finally, the path to the Slackware files.

Sorry for barging into the thread but something to think about in the future;
You could setup a PXE server and install openSUSE via that method ->

https://en.opensuse.org/SDB:PXE_boot_installation

Also another dumb suggestions from me; have you tried using NFS3 and not NFS4? ( /etc/sysconfig/nfs -> NFS4_SUPPORT=“no” ) - perhaps the Slackware installer is having issues with it (need to restart the nfs server afterwards).

Well, this specific computer is a Libretto 50CT. I’m not sure if it supports PXE booting or not.

On 2014-07-27 13:16, ignatius999 wrote:
>
> Ok. Here’s the issue: i’m trying to install Slackware off of the boot
> disk, since I don’t have access to a (working) CD-ROM drive. I’m using
> the “setup” command, and am selecting an “NFS” install. It’s all pretty
> much automated. I’d install openSuSE if I had it came with a boot disk.
> :slight_smile: Basically, it first asks for an IP address, then a netmask, then a
> gateway, and then, the IP address of the NFS server, and then finally,
> the path to the Slackware files.

Ok, but… that is not very relevant - unless it is that slackware that does not connect, while openSUSE does.

What I typically do when creating an NFS server is to try both server and client on the same machine. Only after this works, I attempt to connect from a different machine.

See:


minas-tirith:~ # cat /etc/exports
/home/	127.0.0.1/24(fsid=2456,rw,root_squash,sync,nohide,no_subtree_check)

minas-tirith:~ # grep localhost /etc/fstab
localhost:/home		/mnt/nfs/local		nfs	defaults,noauto,nofail		0 0
minas-tirith:~ #

minas-tirith:~ # rcnfsserver start
redirecting to systemctl start nfsserver.service
minas-tirith:~ #

minas-tirith:~ # mount -v /mnt/nfs/local
mount.nfs: timeout set for Sun Jul 27 14:15:51 2014
mount.nfs: trying text-based options 'vers=4,addr=::1,clientaddr=::1'
mount.nfs: mount(2): Permission denied
mount.nfs: trying text-based options 'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
minas-tirith:~ # ls /mnt/nfs/local
_backup_fctry       _backup_fctry.12.3.tar.bz2   _usr_local       _var_data         _var_spool_news  cer-g       pepe
....

Success.

So what we need to see is the same test, on your system.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

I noticed something about your setup… you have files in the NFS share. Did you put those there, or are they “automatically” generated?

Well, obviously there should be files there, I mean, they look like they are generated somehow.

While doing some reasearch, I noticed that there is nothing in my /proc/fs/nfs/exports file. I’m not sure how this file should look.

Scratch that. I meant my /var/lib/nfs/xtab file.