Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disappearing nfs mount

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
mengoshmink



Joined: Sun Oct 20, 2013 4:17 pm
Posts: 9

PostPosted: Sat Jan 18, 2014 6:55 pm    Post subject: Disappearing nfs mount Reply with quote

Hi all,

I'm having an annoyance with NFS. For the most part it works great to my Linux clients and WDTV Lives but I have a couple of shares for just me that are not working as hoped. The archive share works fine but the tmp share is an example of the share that (seems to) randomly disappear. If I change the tmp line in /etc/exports so that it is available to the whole network, ie the same as archive, the problem goes away.

All the information below I believe to be relevant but to keep things simple I have only listed two shares.

On the server:
server ~]$ ls -lh /mnt/store/
Quote:
drwxrwxr-x. 12 mengoshmink users 4.0K Dec 27 2012 tmp

server ~]$ ls -lh /mnt/store/tmp/
Quote:
drwxrwxr-x. 7 mengoshmink users 4.0K Sep 21 2012 Archive


server ~]$ cat /etc/fstab
Code:
/dev/vg_server/lv_store   /mnt/store   ext4   defaults   1 2

/mnt/store/tmp                  /mnt/nfs/tmp            none  bind  0 0
/mnt/store/tmp/Archive          /mnt/nfs/archive        none  bind  0 0


server ~]$ ls -lh /mnt/nfs/
Quote:
drwxrwxr-x. 7 mengoshmink users 4.0K Sep 21 2012 archive
drwxrwxr-x. 12 mengoshmink users 4.0K Dec 27 2012 tmp


server ~]$ cat /etc/exports
Code:
/mnt/nfs                192.168.1.0/24(ro,sync,root_squash,fsid=0)
/mnt/nfs/tmp            client(ro,sync,root_squash)
/mnt/nfs/archive        192.168.1.0/24(ro,sync,root_squash)


I know the /etc/sysconfig/nfs needs tidying up but I do not believe the problem is from its current configuration.
server ~]# nano /etc/sysconfig/nfs
Code:
# Port rquotad should listen on.
RQUOTAD_PORT=875
# TCP port rpc.lockd should listen on.
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
LOCKD_UDPPORT=32769
# Port rpc.mountd should listen on.
MOUNTD_PORT=892
# Port rpc.statd should listen on.
STATD_PORT=662
# Outgoing port statd should used. The default is port
# is random
STATD_OUTGOING_PORT=2020


server ~]# service nfs status
Quote:
rpc.svcgssd is stopped
rpc.mountd (pid 2672) is running...
nfsd (pid 2735 2734 2733 2732 2731 2730 2729 2728) is running...
rpc.rquotad (pid 2668) is running...


Firewall:
Source: Range (192.168.1.64 - 192.168.1.252)
Destination: Server eth0 (192.168.1.67)
Interface: Server eth0 (192.168.1.67)
Direction: Incoming
Ports: tcp/892, tcp/2049, udp/2049, tcp/111, udp/111

On the client:
client:~> cat /etc/fstab
Code:
server:/tmp      /mnt/server/tmp      nfs4   defaults 0 0
server:/archive      /mnt/server/archive   nfs4   defaults 0 0


Any thoughts? Thank you.
_________________
Sharing knowledge is the best way to learn.
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Sat Jan 18, 2014 9:27 pm    Post subject: Reply with quote

I'm not sure nesting NFS shares is a good idea, perhaps move the Archive directory to somewhere else in the tree (say tmp-archive or similar). Also, I use a different set of options for my NFS shares (one internal and 2 on different machines, although all in the same network) in fstab. Change the defaults option to
Code:
rw,user,noauto
Also, I use NFS instead of NFS4 as the FS type in fstab and list/mount these shares under /media, not /mnt.

It means none of these shares are mounted at boot (which makes sense as not all machines are on 24/7) and it doesn't clutter up the desktop. But that's personal Wink
Back to top
View user's profile Send private message
mengoshmink



Joined: Sun Oct 20, 2013 4:17 pm
Posts: 9

PostPosted: Tue Jan 21, 2014 8:36 pm    Post subject: Reply with quote

Thanks for the reply Dutch_Master! I have tried a few things but unfortunately still no success.

I think you are right, nested shares is not a good idea. I have mount bind the folders to a new location so I didn't think it is causing the problem.

Do you think changing the mount options will help? I am used to seeing my mounted filesystems in /mnt which is why I used that folder and not /media. Also, I am using nfsv4 which is why I have used nfs4 in fstab but it shouldn't make a difference.

I tried creating a new NFS root today but that didn't help.

I have different options for exporting to my WDTV Live, they seem to work fine. Well, I have one problem but I think that is with the WDTV Live, not NFS.

FYI My server is on 24/7 because it is also my MythTV backend.

I will keep trying random things until it works ... :?
_________________
Sharing knowledge is the best way to learn.
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Tue Jan 21, 2014 8:54 pm    Post subject: Reply with quote

As the server is running 24/7 I assume it's headless. Can I suggest putting Webmin on it and use that to create your NFS shares.

There's no reason that the NFS shares must be mounted at boot on your desktop. If, for some reason, the server is down, the boot sequence of your desktop will stall for a significant time (until mount times out) before proceeding. It will happen Wink
Back to top
View user's profile Send private message
mengoshmink



Joined: Sun Oct 20, 2013 4:17 pm
Posts: 9

PostPosted: Tue Jan 21, 2014 9:37 pm    Post subject: Reply with quote

I like your thinking! I was either going to install system-config-nfs or Webmin. Last weekend I added the Webmin repo but I haven't installed it, yet. I will and let you know what happens.

I agree. I used to have a shutdown delay with caused by my NFS mounts but recently not had any problems which is why I allowed them to be automount. When I re-create my NFS shares through Webmin / system-config-nfs I will change my mounting to noauto. Lets see what we find.
_________________
Sharing knowledge is the best way to learn.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast