Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an odd situation with NFS after I rebooted the server. Before the boot I could access the NFS mount from my client machine no problem but suddenly I don't see the correct contents any more. For instance, I touch:ed a file on the client side, but going to the server, I can't see the file there. My home directory contents are also not visible any more on the client side.

What happened? I thought I had everything mounted as I had before the boot. Bind seems to be correct on the server side and mount server:/dir /dir works.

/etc/exports looks like this:

/share 10.0.0.0/24(rw,no_root_squash,async)

EDIT: I forgot to say that when I mount that dir on the client side, there is some stuff in the directory, but not the same is in the server side (and changes are not visible as I said).

Here are the requested files.

Client-side fstab:

my.server.com:/share /share nfs rsize=8192,wsize=8192,timeo=13,intr

I haven't booted the client yet, though.

Server-side fstab:

/home /share/home none bind 0 0

I have been using the information on this post: http://ubuntuforums.org/showthread.php?t=249889 to work this out.

One thing I noticed is that even though nfs-common is installed on the client, there is no nfs-common init script anywhere. I guess this is because I'm running Lucid Lynx.

EDIT2: Could this be an issue with user rights? I have a different user name in the client and server boxes, how does NFS determine what rights I have?

share|improve this question
    
So basically NFS fails to automatically mount at startup? How do you mount, using fstab or autofs? Can we see the applicable mount lines of the configuration? –  andol Jul 23 '10 at 11:12
    
I don't think that's the problem as I haven't rebooted the client yet but I added the files into my post anyways. –  Marko Poutiainen Jul 23 '10 at 11:32
add comment

1 Answer

up vote 1 down vote accepted

On your server, you are remounting your /home directory inside /share/home? That's...unusual. I'm betting NFS has shared your local /shared/home directory, instead of the remounted one from /home. You can probably test this by unmounting /share/home on the server, and see if the files you've been creating on the client are there.

Restarting the NFS daemon might make it pick up the remounted one you want. But it might cause the same problems any time you reboot. So you may just be better off exporting /home, rather than using that bind mount.


--Christopher Karel

share|improve this answer
    
Hm, I picked up that idea from some web site, don't know if I still have it open at work. So how should I map the /home directory for NFS? –  Marko Poutiainen Jul 23 '10 at 17:37
    
This was actually the correct answer to begin with. It seems like a bound directory doesn't work properly. –  Marko Poutiainen Jul 26 '10 at 8:26
1  
In case you don't have it working, you'll want to add the following to your exports file: /home 10.0.0.0/24(rw,no_root_squash,async) That way, you have all of /home available to other clients. –  Christopher Karel Jul 26 '10 at 15:14
    
Yeah, Christopher, that's what I already did, but good you mentioned if someone else is looking at this. –  Marko Poutiainen Jul 26 '10 at 15:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.