LinuxQuestions.org
Visit Jeremy's Blog.
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 04-11-2012, 05:02 PM   #1
fantasygoat
Member
 
Registered: Sep 2009
Posts: 119

Rep: Reputation: 17
Forcing NFS4 write cache flush


I have two servers sharing an NFS4 mount. Here's the fstab entry:

Quote:
media.prod:/media /exports/media nfs4 intr,noatime,nodiratime 0 0
The issue we're having seems related to the local write cache. A load-balanced request will come in, and the application on the first server will create a directory, but the second request hitting the second server will not see the directory until it tries a second or third time.

Is there anything I can do at the application level to initiate write cache flush so that the file or directory creation propagates as quickly as possible to all NFS mounts?
 
Old 04-13-2012, 03:37 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Most likely the write request is happening, but the other client is caching so it doesn't get the right result when it looks.

Setting actimeo=0 will disable attribute caching on the clients. Up to you if you want to take the performance hit.
 
Old 04-13-2012, 04:02 PM   #3
fantasygoat
Member
 
Registered: Sep 2009
Posts: 119

Original Poster
Rep: Reputation: 17
I was hoping to find a way to do it conditionally, without having to disable it on the full mount.
 
  


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
how to flush dns cache SarahGurung Linux - Newbie 2 10-18-2011 06:05 AM
how-to flush dns cache PlatinumRik Linux - Networking 6 07-27-2011 02:47 PM
Display and Flush DNS cache click Linux - Networking 7 11-10-2009 01:00 PM
DNS Cache Flush not Working!!!! thaj Linux - Networking 0 11-21-2007 03:21 AM
Flush file system cache? bean66 Linux - General 5 03-14-2007 02:17 PM

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

All times are GMT -5. The time now is 12:38 PM.

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