How to refresh NFS filesystem without remounting

Latest response


I am looking to see if it is possible to refresh a NFS filesystem without unmounting/remounting the FS

Here is the specifics on what is going on.

In site A, we have a linux configuration with NFS going on it. the SAN disk that this fs is on is replicated to site B. At site B an incremental flashcopy is ran against the target volume. That flashcopy is mounted to the site B linux NFS setup.

what we want to hopefully do, is every 30 minutes, initiate a flashcopy of the target LUN to pick up changes on it and have the Target OS see those changes on that flashcopy lun which is mapped to the host.

Currently we are able to do this, but the changes do not get picked up until an unmount and remount on the target system is performed against the flashcopy lun mounted to it

I am wondering if there is anyway that this can be done without the unmount/remount, and if there is anything that can be done on the target system to sort of pause the NFS during this time so the app doesnt freak out.

This target flashcopy will only ever be read from on the target side.


Hi James,

NFSv3/v4 cache on the client side by default. You'd need to disable caching - which will also reduce performance - but that should allow you to see the changes in real time.

You may want to try both the "forcedirectio" and "lookupcache=positive" mount options, though I don't know for sure if this will resolve your issue.

performance is not an issue i dont think as this filesystem will be readonly, and in all reality the files will be looked at not very often, they just need to be there.

So this will allow the updates from the flashcopy to be seen without a remount if i understand correctly?

It may - without understanding fully why the files are not showing up, I can only take a guess that it is NFS caching that is the problem, but I don't know for sure.

i should probably have mentioned at this point, the NFS configuration is not there yet, this is just storage assigned to the host, with a LV\VG configured for testing

I'm a little confused then; before it was implied that the system reading the NFS volume was not seeing the copied files and you had to remount the NFS volume for the changes to be reflected.

Is the issue actually you are actually having to remount the logical volume to see the changes?

sorry for the confusion.. right now NFS is not configured, we just have a filesystem created on the target flashcopy lun and mapped to the target host. On the source system side, we make a change, it replicates over to target side, an incremental flashcopy is done against the target (replication and flashcopy done on the array) that flashcopy target that is mapped to the target host does not see the changes we made until we unmount and remount the filesystem on the target system.

Trying to figure out how to get it to not require a remount to see the changes. - so basically yes, remount the logical volume to see the changes is what is happening and hoping there is a way around this

Ok, additional clarification: A flashcopy means that the there's a direct LUN-to-LUN block copy happening?

If that's the case I'm not sure what you're asking is possible, the destination system would be unaware of the changes to the logical drive - I'd also recommend it's probably a bad idea to do while the filesystem is mounted, just in case there were accidental writes to the filesystem while the flash copy was happening - you'd probably end up with a corrupted journal at the least (if you're using a journaling filesystem)

My personal recommendation would be to: 1) umount lun b 2) Perform copy from lun a to lun b 3) mount lun b

Alternately, consider rsync?

For flashcopy, yep LUN to LUN block copy

So for testing without NFS configured, that works, but once NFS is configured, we will need someway to pause the NFS share or something to do this.

that data on that drive will only ever be read from, and it doesnt have to be up to date to the second, in fact we were going to schedule flashcopies every 30 minutes to grab the changes.

But it looks like for the end result with NFS configured, we will need to somehow allow NFS to gracefully disconnect or whatever, unmount, run the flash, remount, bring NFS back online.... all gracefully.... if possible

This would be a pretty good use case for an ansible playbook, if you hadn't considered that yet.

nope, havent thought about that, TBH dont know much about ansible.
Thanks for the information here, I really appreciate it.