Programatically disable/enable NFS share?

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
First, run midclt call sharing.nfs.query | jq to find the id number of the share to disable. To disable the share, run midclt call sharing.nfs.update <id> '{ "enabled": false }'. Toggle to true to re-enable.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Generally speaking, NFS clients may not like you ripping out the export from under them. This solution sounds somewhat backwards.
 
Last edited:
Top