LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-01-2013, 11:50 AM   #1
bothra
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Rep: Reputation: 0
centos 6 - rpcbind restart breaks nfs file locking


nfs works fine after a reboot but as soon as rpcbind is restarted, we cannot get file locks. only solution has been to reboot, afaict. this problem occurs on several different centos 6 servers and I've duplicated it with fresh installs.

server:
Code:
[root@nfstest01_rm12340 ~]# cat /etc/exports 
/srv/test1 nfstest02_rm12340(rw,no_root_squash,fsid=1)

client:
Code:
[root@nfstest02_rm12340 ~]# cat /etc/fstab 
...
nfstest01_rm12340:/srv/test1 /mnt/test1 nfs _netdev,intr,noatime,nodiratime,nfsvers=3	0	0
*every* time:
- on server boot, nfs is exported fine
- on client boot, nfs mounts are mounted fine
- on client, run file lock test, successful
- on server, issue a rpcbind restart
- on client, run file lock test, failed
- on server, restart all nfs daemons (rpcbind, nfslock, nfs)
- on client, run file lock test, failed
- on server, reboot, wait for up
- on client, run file lock test, successful

for now, we're just resolved to not restart rpcbind but this cannot be expected behavior, right?
 
Old 03-03-2013, 12:05 AM   #2
a31amit
LQ Newbie
 
Registered: Feb 2013
Location: /root
Distribution: RHEL CENTOS UBUNUTU
Posts: 7

Rep: Reputation: 1
Please try nfslock restart with rpcbind, before or after.

nfslock must also be started for both the NFS client and server to function properly.
To start NFS locking, use the following command:

Code:
service nfslock start
If NFS is set to start at boot, ensure that nfslock also starts by running
Code:
 chkconfig --list nfslock
If nfslock is not set to on, this implies that you will need to manually run the service nfslock start or restart each time .


nfslock is only needed for NFSv2 and NFSv3.
 
Old 03-03-2013, 11:17 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As you've got Centos v6, go with NFSv4 and you can forget all the 'extra' daemons. See Section 9.1 https://access.redhat.com/knowledge/...de/ch-nfs.html
 
Old 03-04-2013, 09:08 AM   #4
bothra
LQ Newbie
 
Registered: Mar 2008
Posts: 3

Original Poster
Rep: Reputation: 0
@ a31amit: I've tried all combinations of restarting those services in every order, all with the same results. nlockmgr will not show in rpcinfo and file locks will be unavailable unless I reboot the server.

@ chrism01: i'm looking into moving those mounts to nfs v4, thanks.

Last edited by bothra; 03-04-2013 at 10:17 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba on NFS File Locking Cottsay Linux - Software 5 07-28-2015 02:23 AM
Locking access to file system when NFS is being used ujejski1 Linux - Server 1 12-06-2011 08:16 AM
Ubuntu 8.04 breaks samba file locking dgermann Linux - Networking 4 08-08-2008 08:43 AM
Linux Hpux NFS file locking clarkem Linux - Networking 1 08-24-2006 12:38 PM
How to enable NFS file locking? ahz10 Linux - Networking 2 05-22-2006 11:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration