Remove Unused NFS

To remove or delete an unused NFS export entry that you no longer need, you can follow these steps:

Identify the Export Entry

First, identify the export entry you want to remove by running exportfs -v with sudo:

sudo exportfs -v

This command will list all the NFS exports currently configured on your system.

Remove the Export Entry

To remove an NFS export entry, you use the exportfs command with the -u option followed by the path of the export. Here’s the general syntax:

sudo exportfs -u [options] export_path

For example, if you see an export like /mnt/nfs_share *(rw,fsid=0,sync,no_subtree_check) that you want to remove, you would use:

sudo exportfs -u /mnt/nfs_share

Restart NFS Service

Restart NFS Service: After removing the export entry, restart the NFS server to apply changes:

sudo systemctl restart nfs-server

Verify Removal

After running the exportfs -u command, you can verify that the export entry has been removed by running exportfs -v again:

sudo exportfs -v

The entry you removed should no longer appear in the list of NFS exports.

Additional Notes

By following these steps, you can effectively remove an unused NFS export entry from your system using exportfs on Ubuntu or any Linux distribution that supports NFS.


Revision #2
Created 11 December 2024 02:01:37 by Ahmad
Updated 11 December 2024 02:07:24 by Ahmad