How to batch add client hosts for NFS shares?

Hello - On the ‘Edit NFS Share’ page, we can add hostnames one by one through the ‘Add’ button. However, I have many NFS shares that need to be shared with different clients. Is there a way to add them in batches? Or is there a concept of host groups, so that multiple host groups can be created to manage different clients?"

There is a command line version of the TrueNAS middleware. I don’t know how to use it, nor if host groups exist or would be better. But, I think that is your better option.

About 25 years ago on the job as a Unix SysAdmin we used to batch user adds on a NetApp. Even the MS-Windows team had us do their user adds because of command line access. (It would take a dozen or so clicks and some typing to add a single user, all prone to errors…)

1 Like

Random response more out of curiosity than anything but why are you not using SMB out of interest?

My clients are all Linux, so for better compatibility, I chose NFS

Fair enough. Personally in my experience life is much better and easier with SMB especially around access and permission management in particular in an Enterprise environment. There are some old fashioned views around SMB and Linux that don’t really exist in the modern world.

THX. Now, TrueNAS Scale provides both “TrueNAS CLI Shell” and “RESTful API”, through which we can update client hosts by executing the ‘PUT /sharing/nfs/id/{id}’ command. The RESTful API URL is ‘http://xxx.xxx.xxx.xxx/api/docs/’.