removing NFS with pvesm seems broken

tnf

New Member
Jan 19, 2026
1
0
1
When playing around with NFS mounts, I added a mount with
pvesm add nfs mymount --path /mnt/pve/mymount --server 10.9.8.7 --export /srv
Then I changed my mind, and wanted to put my export to a different path, so I tried
pvesm remove mymount
This ended me up with a stale mount, as the NFS remained mounted according to /proc/mounts even though the configuration was removed.
So I was unable to create a new pvesm add nfs command as the path was "already existing", and removing the path did not work, because it was "occupied" as the NFS mount was still active in a half-alive way.
I had to umount /mnt/pve/mymount manually, and delete the existing path, in order to start over the configuration.

It seems to me, that pvesm remove is not doing a complete job?
 
When you run the pvesm add nfs command, it does two things. It mounts the NFS export and adds the storage definition to PVE.

When you run the pvesm remove command, it is only removes the storage definition from PVE. It does not unmount the NFS export.

If you run df -h, you will see the NFS export still mounted.

You might find this helpful: https://askubuntu.com/questions/292043/how-to-unmount-nfs-when-server-is-gone