Mount gets stuck

I am using 11.3 on one machine and 11.2 on the other (a netbook). 11.4 won’t install on either and 11.3 on the netbook fails to install as well.

I am using the same setup as I have always used when both systems ran 11.2 (details below) but now I can only mount a drive in one direction. In the other direction the mount command gets stuck with no error message until it eventually times out. I can ping and ssh the machines from each other without difficulty.

Even in the direction in which the mount apparently works (11.2 mounting a drive on the 11.3 machine) when I try to copy files across nothing actually happens.

exportfs -a was run successfully on the exporting machine, and nfsserver is running on both machines as does nfs client.

The exporting machine is 192.168.1.102 (eeelinux) and the other machine is 192.168.1.101 (nina).

How can I check what is going wrong?

Thanks,

Abe

Details:
The /etc/exports file on the exporting machine (192.168.1.102) looks like this:
eeelinux:/home/naima # more /etc/exports

See the exports(5) manpage for a description of the syntax of this file.

This file contains a list of all directories that are to be exported to

other computers via NFS (Network File System).

This file used by rpc.nfsd and rpc.mountd. See their manpages for details

on how make changes in this file effective.

/home/naima linux(rw,sync)
/home/naima nina(rw,sync)

and hosts.allow looks like this:
mountd : 192.168.1.100 : allow
statd : 192.168.1.100 : allow
ugidd : 192.168.1.100 : allow
lockd : 192.168.1.100 : allow
nfsd : 192.168.1.100 : allow
portmap : 192.168.1.100 : allow
rquotad:192.168.1.100:allow
nfsd:192.168.1.100:allow
ugidd:192.168.1.100:allow

mountd : 192.168.1.101 : allow
statd : 192.168.1.101 : allow
ugidd : 192.168.1.101 : allow
lockd : 192.168.1.101 : allow
nfsd : 192.168.1.101 : allow
portmap : 192.168.1.101 : allow
rquotad:192.168.1.101:allow
nfsd:192.168.1.101:allow
ugidd:192.168.1.101:allow

/etc/hosts has this content:

hosts This file describes a number of hostname-to-address

mappings for the TCP/IP subsystem. It is mostly

used at boot time, when no name servers are running.

On small systems, this file can be used instead of a

“named” name server.

Syntax:

IP-Address Full-Qualified-Hostname Short-Hostname

127.0.0.1 localhost

special IPv6 addresses

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 eeelinux
192.168.1.100 nina
192.168.1.101 linux
192.168.1.102 eeelinux

I may be misunderstanding you, but it appears you’re trying to share files in both directions (reciprocal NFS client/server arrangement). If that’s the case, then both machines will require /etc/exports adjustments to allow the respective client access accordingly.

To post readable computer text here, please use CODE tags: Posting in Code Tags - A Guide

I did not read trough all of the listings, but are you aware that somewhere between those openSUSE levels, the default was changed to NFSv4. Thus explicitly defining NFSv3 might be needed on some places.

Thanks for both replies,and point taken about using the code tag. I should have done it a while ago, but forgot. Hopefully my future postings will be more readable.

Regarding the two-way communication, yes, this is my intention and indeed the settings I quoted have been made on both machines.

I was not aware of different versions of NFS being used in 11.2 and 11.3. Can you please tell me where I need to specifically mention NFSv3?

Thanks,

Abe

As said, I do not know exactly, but YaST > network services > NFS server has a switch where you can switch NFSv4 on/off. You could at least check if this is switched off on both (or one of them when the older level one does not support). See also

man rpc.nfsd

.

On the client side it seems that the file system type in /etc/fstab should be nfs4, thus nothing to change/check there, as you will still have nfs there.

I should make clear that I am not using permanent shares, so I am not adding entries to /etc/fstab. I set up the share if and when I need it, because my machines are off most of the time anyway and the main use of the shares is for occasional backups.

So typically I type a mount command from the command line. The question then is whether I should add some flag to it to indicate NFSv3/4 and if so - how?

Abe

Search for NFS4 here (v3 and v4 exports are discussed second reference):

Chapter

OpenSUSE 11.1 Reference - Exporting File Systems with YaST

When it only shows in* /etc/fstab* inusing nfs4 vs nfs as file system type, that is of course the same in a mount statement. After all /etc/fstab only contains the parameters to be used in mount. I guess you have the complete fstab entry of those NFS mounts in the* /etc/fstab,* with the noauto parameter, thus that you can use a very simple mount statement when it comes to mounting them. Well that is how I would do it.

In any case, my message is that you need to change to fstype nfs4 when you want to moun t NFSv4 exports. This being not the case, there should be no change neither in your fstab nor in your mount statement.

But did you check the server side as I suggested?

Henk,

Sorry for the delay in replying:
On both machines I can not see “nfs server” under network services in YaST - only “nfs client”.
However, in system -> services (run level), expert mode, I found that both nfs and nfsserver were not running, despite being enabled. I started nfsserver manually, but nfs does not start - returning an error code and stating that the program is not configured. By now I have added the shares to /etc/fstab, but what else do I need to do in order to configure nfs?

Abe

Then first check if you have all the software; You need the folloeing packages: nfsclient, nfs-kernel-server, yast2-nfs-client, yast2-nfs-common, yast2-nfs-server.
Please report back if one of them was missing and install the missing ones.

I was only missing yast2-nfs-server (on both machines) - now installed. However, the nfs service still returns the “not configured” error when I try to start it.

Abe

This is what I’m using to mount NFS v3 and NFS v4 shares. (if someone has better options, I’m open to suggestions):

  • NFS 3 mount:
mount -t nfs -o rsize=32768,wsize=32768,noatime,nodev,vers=3

  • NFS 4 mount:
mount -t nfs4 -o proto=tcp,port=2049

If version is not specified, it defaults to nfs4.

I don’t have that package installed anywhere, not even on my file server (running 11.4 now). It is just an interface used to configure the nfs server from YaST. I have the YaST nfs-client and YaST nfs-common packages however, as I believe they are installed by default … but I don’t use them either.

Now, when you go into YaST > Network servics > NFS server (as I asked you much earlier) do you see the configuration of your exports there correctly? And above all, is the NFSv4 checkbox switched off?

Of course one does not need yast2-nfs-server. One does not need YaST at all, everything can be done with vi. But this is the way I try to help him.

Thanks for the help, guys. Here are my answers to your messages:

please_try_again: I tried the mount commands you suggested. The good news are that I no longer get stuck - the errors come fairly fast now. When I am on the 11.3 machine, trying to mount a share on the 11.2 machine, I get the message:


nina:~ # mount -t nfs -o rsize=32768,wsize=32768,noatime,nodev,vers=3 eeelinux:/home/naima /mnt/eeelinux/
mount.nfs: mount to NFS server 'eeelinux:/home/naima' failed: timed out, giving up

In the other direction I need to use NFSv4, since I am told that the 11.3 share is served using NFSv4. Here I get an even stranger message:


eeelinux:/home/naima # mount -t nfs4 -o proto=tcp,port=2049 nina:/home/naima /mnt/nina
mount.nfs4: mounting nina:/home/naima failed, reason given by server:
  No such file or directory

This is despite the fact that the share is defined in /etc/exports and I have run exportfs -a again just to make sure.

Henk: now that I have yast2-nfs-server installed, I am a little confused about how to use it: on the 11.2 machine I did not tick the “enable NFSv4” box, because it is supposed to serve files using NFSv3.
On the 11.3 machine I did tick that box, but then I need to enter the name of the server. Why? As I understand it, the server is the machine I am working from, so it should not need to be told its own name. Or am I missing the point completely here?

Anyway, I put in the name of that machine as the server (nina) and made sure that all the directories I would like to share appear as expected in the next screen.

Still, I get those errors that I quoted at the beginning of this message.

I am confused.

Abe

I do not understand much of it either any more.

I started to tell you that it could be a fact of serving NFSv4 from one of the systems where it didn’t earlier. Then I told you that you could check that by looking in YaST > … > NFserver. And when it is checked there, to check if it fares better when switched off.

From your answers I detected that you did not have the YaST nfs-server module. Thus I told you to install it, to do the above.

You confirmed it wasn’t installed, you installed, bur then you did not do the check above before I asked you again.

Now you tell that it is not switched on on one system (thus nothing to change there, no NFSv4 used), and that is also not switched on on the second system. But instaed of reporting that you found out that none of the system is usiing NFSv4 (that is after all what a suggested you to test), you now switch it on! And that because “you are told” that it serves NGFSv4. Who “told you”. You are doing this! And when you switch on the NFSv4 box, it is NFSv4. And when you switch it off, it is NFSv3. It is not what you are old, it is what you set it to.

Further to the error saying that a file/directory does not exist, you should check that, not ask us. You can ask for advise, but then you must at least show why you think the computer is wromg. E.g. by giving a listing of */etc/exports *on the server and by ls -l listings of the appropriate file directory. We can not come to your site and see for ourselves, thus you must provide the maximum of information.

I am sorry if I gave confusing information. I must have misunderstood your early message - it looked to me like 11.3 actually uses NFSv4 (and so I must make sure that the box is ticked) while 11.2 still uses NFSv3. This is what I meant by “being told”.

If it is my choice whether to use v4 or v3, I will go for v3, being the one that worked for me before (when both machines ran 11.2).
So now the NFSv4 box is off on both machines. What I get is that the 11.3 machine appears to mount the share from 11.2. However, when I try to copy a directory across to the 11.3, several files are copied and then the operation hangs - no more files are copied.

I simply don’t understand why things are so different when 11.3 is involved.

Thanks for your help, anyway.

Abe

One more note: the exports file on 11.2 has the following content:


/home/naima     nina(rw,sync)
/home/naima     linux(rw,sync)

So 11.3 should see this share.
I did check this, of course, but apparently did not make it clear enough in my previous post.

Abe

I appreciate your coooperation, but what I try to tell you is that when you say “I did check this, of course, but apparently did not make it clear enough in my previous post.”, that is not what we want to see. We want to see what you did and the the answer. An example::

When I say: “I checked /etc.exports and it looks OK” that is wrong. But

boven:~ # cat /etc/exports
/home/wij       beneden.henm.xs4all.nl(rw,sync,no_subtree_check)
boven:~ #

that is something usefull. Because everybody can see who did this (root), what was done (cat /etc/exports) and what was the answer. And that all without talking to much about what you think you check. This is not because we believe that you are lying to us, but because, when you have a problem, it is very likely you missed something and only when you try to bring us as near as possible to the problem the better the change we see something. Do not forget that a lot of times when pointed to a mistake, the OP often says: “it was all the time there, but I did not see it”. That is very human and hits everybody now and then. Thus no stories and conclusions, but hard computer facts please.

I think, the best we can do now is redefine your problem. And please one by one so we do not get confused about who is the server and who is the client. Thus please go to one of the servers and post here:

cat /etc/exports

and also the status of that exported directory:

ls -l /home/naime

(or the other one when this belongs not to this case).
Then go to the client and post here:

cat /etc/fstab
mount /mnt/naime

or, when you still refuse to use* /etc/fstab* post the complete call of

 mount ........

and also

 ls -l ...

of the mountpoint (that is not on* /home/naime*, but on* /mnt/naime* if I understand you correct).