I recently set up TrueNAS through HexOS on a new WTR MAX, and it’s running great. The only odd thing is that, during data migration, I created an NFS share and later removed it. Even after disabling the NFS service and rebooting twice, an NFS session still appears. How can I clear it? (Running ElectricEel-24.10.2.2.)
Okay, after some research with ChatGPT it seems that it was fairly easy to clear. First we looked for the usual file in which this would be stored but it was empty:
truenas_admin@NAS[~]$ sudo ls -al /var/lib/nfs/rmtab
-rw-r--r-- 1 root root 0 Jan 11 2023 /var/lib/nfs/rmtab
truenas_admin@NAS[~]$ sudo cat /var/lib/nfs/rmtab
Then we looked in another location and found it here:
truenas_admin@NAS[~]$ sudo ls -al /var/db/system/nfs/rmtab
-rw-r--r-- 1 root root 46 Jun 27 13:59 /var/db/system/nfs/rmtab
truenas_admin@NAS[~]$ sudo cat /var/db/system/nfs/rmtab
192.168.10.181:/mnt/HDDs/Downloads:0x00000015
So I proceeded to clear it as follows:
truenas_admin@NAS[~]$ midclt call service.stop "nfs"
False
truenas_admin@NAS[~]$ sudo cp /var/db/system/nfs/rmtab /var/db/system/nfs/rmtab.bak
truenas_admin@NAS[~]$ sudo truncate -s0 /var/db/system/nfs/rmtab
truenas_admin@NAS[~]$ midclt call service.start "nfs"
True
truenas_admin@NAS[~]$ midclt call nfs.get_nfs3_clients
[]
That seemed to resolve the issue for me.