#vserver nfs connected-clients show clear cache?

1 messages · Page 1 of 1 (latest)

past edge
#

All - created an Ansible Playbook to reclaim NFS exports and to proceed after "vserver nfs connected-clients show" is empty for the volume in question.
However, playbook execution is currently failing because "vserver nfs-connected clients show" continues to display an NFS client that we unmounted from RHEL O/S
Is there a way to update/clear this cache to show only what's currently actively connected?

amber geyser
#

I see this post is over a year old with no responses. I too am experiencing this. Is there a solution?

I have a volume offline and unmounted from the namespace, yet "nfs-connected clients show" still shows clients connected to the volume. How do you clear the cache?

idle verge
#

If I recall, wait 24 (or was it 48) hours. It clears after that…I think

amber geyser
amber geyser
#

I have a case open on this issue. I will update when I have more information.

cedar wadi
#

takeover/giveback should clear the cache... 🤪

amber geyser
cedar wadi
#

yeah, I wasn't being entirely serious

#

I don't think there is a way to clear the cache. The "connected-clients show" is not supposed to be authoritative, it's merely an indication / debugging aid. As there is no session state for NFS, you can never be sure that not some client will come from out of nowhere who has the right fileid numbers and uids and accesses a file that it hasn't accessed in 12 months

idle verge
#

If you’re really quick:

vserver nfs stop -vserver xxx ; vserver nfs start -vserver xxx

But I would not do it
🤓

amber geyser
idle verge
#

I know it works though. Hehe

cedar wadi
#

A LIF migrate to another node might also work but I haven't tried it

amber geyser
queen fox
#

Yeah wouldn't work since SVM is cluster wide.

#

I don't think there is a clean way to clear it out. It should expire after 24 or 48 hours. If it isn't, Support will have to look.

cedar wadi
#

caches are usually per-node though in ONTAP. it was worth a shot 🤷‍♂️

amber geyser
#

Support didn't really have a solution other than unmount the share from the clients. I don't have access to the clients to perform the unmounts.

Here's a solution I found that works.

  • Before unmounting the volume, add an export policy rule (rule-id 1) that denies access to all clients. If the export policy is used by other volumes, you will need to create a new export policy and assign it to the volume that you want to unmount.

Example to modify the export policy:

export-pol rule create -vserver <vserver> -policy <policy> -rule 1 -prot any -client 0.0.0.0/0 -ro never -rw never -su none
  • Unmount the volume
  • Wait 48 hours for the client connection to flush from cache