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?
#vserver nfs connected-clients show clear cache?
1 messages · Page 1 of 1 (latest)
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?
If I recall, wait 24 (or was it 48) hours. It clears after that…I think
It doesn't clear after a specific period. This isn't the only volume I've seen this on. The last time it only cleared after I deleted the volume, which was 2 weeks after I offlined and unmounted the volume. More specifically, it didn't clear until the volume recover queue expired.
I have a case open on this issue. I will update when I have more information.
takeover/giveback should clear the cache... 🤪
Unfortunately for us, takeover/giveback requires an approved change. We need a way to flush the cache without a takeover/giveback.
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
If you’re really quick:
vserver nfs stop -vserver xxx ; vserver nfs start -vserver xxx
But I would not do it
🤓
Yeah, no, I won't be doing that. 😀
I know it works though. Hehe
A LIF migrate to another node might also work but I haven't tried it
I previously tried that and it did not work.
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.
caches are usually per-node though in ONTAP. it was worth a shot 🤷♂️
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