Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-16-2007, 04:24 AM   #1
LQ Newbie
Registered: Oct 2007
Posts: 6

Rep: Reputation: 1
NFS locking problem when using IP alias or secondary IP (Heartbeat)

I try to set up a highly available NFS server using Heartbeat and DRBD. Everything works quite well, but I experience a file locking problem when I mount the NFS shares using the Heartbeat-controlled IP alias (using the Heartbeat IPaddr script) or secondary IP address (using the Heartbeat IPaddr2 script).
How Heartbeat (or DRBD) works is really not important for this problem. The problem comes down to this:

- I have a NFS server on an internal network, IP address
- This server has an IP alias
- I have two NFS clients, IP address (client1) and (client2)
- When I mount an NFS share on the clients using the address everything works, including file locking.
- When I mount the NFS share using the address file locking also works, but I experience this specific problem:

I lock (flock) an NFS shared file on client1 for 5 seconds, and during that interval I try to lock the same file on client2. Client2 has to wait until the lock comes free. This works, ony client2 is not notified by the NFS server when the lock comes free. It keeps waiting, until client2 decides to ask the NFS server for the lock again (after 30 seconds). This time it is granted the lock, and client2 can update the file. I want to get rid of this delay of half a minute.

Normally, when client1 gives free the lock on the file, the NFS server should inform client2 immediately that the lock has been gone. This is the case when I use the 'normal' IP address, but this mechanism does not work when I use the IP alias (or a secondary IP address). It looks like the portmapper (or statd? or lockd?) forgets that client2 is waiting for a status update when it is connected with

When I mount the NFS share using on client1 and on client2, client2 is informed like it should.

I use Debian Etch with the standard Debian 2.6.18 kernel.

Is this a known problem? And above all, what can I do about it? I have searched the internet for days now (really), but I can't find any information about this specific problem. Also not a single 'NFS with Heartbeat' tutorial/howto mentions this problem.

I have to use an IP alias or secondary IP because Heartbeat works this way. I could add an extra NIC to the NFS server(s) and create a Heartbeat script so it uses a primary IP on that extra NIC instead, but that's a workaround I'd like to avoid.


alias, heartbeat, locking, nfs, portmapper, rpc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
NFS Locking problem: starting "rpc.statd " gives error message opmetc Linux - Networking 2 11-16-2009 02:58 AM
NFS Locking.............FAILED xbill311x Fedora 13 11-16-2007 11:11 AM
NFS Locking? Meabert Linux - Software 5 11-30-2005 08:52 AM
NFS locking up jmickens Linux - Enterprise 1 10-13-2005 05:41 PM
MAC Address spoofing on alias/secondary interface tara Linux - Networking 3 08-31-2005 09:22 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:52 AM.

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