Hi
Even though there are relevant questions on that matter and after reading a lot of them I ve made my personal guide, I came across this need yesterday and trying to follow back my guide, noticed that there are some gaps that needec to be completed.
So my initial guide with an example goes
Unmount directory in Proxmox VE (PVE)
1 Login to PVE terminal directly or via SSH or via web gui -> Shell
2 Make sure the directory we want to unmount is not being used
3 Find the name of the directory, here we use “testfolder” as example
Locate the storage you want to remove from Data->storage and first edit it and unselect enable and remove it afterwards.
(else do it from cli with the command systemctl disable mnt-pve-testfolder.mount you ll notice below)
From there you will also be able to see the directory it is mounted on by the path option
4 Find the mounting service (I didn t use this ls -ahlp /etc/systemd/system)
systemctl list-units "*.mount"
We should see the mounting service from the results, here we will see following text as one of the results
mnt-pve-testfolder.mount . This service after removal shouldn t exist.
You can remove it with
systemctl disable mnt-pve-testfolder.mount
or it will be removed automatically after rebooting the server.
5 Unmount the directory
umount -R /mnt/pve/testfolder (for recursive in case you have mounted something inside that directory)
6 Check “/proc/mounts” file, delete/remove related lines, e.g. lines contain “testfolder”
nano /proc/mounts
When done, use Ctrl + X, Y, Enter key to Save and Exit nano
7 Remove the mount service for that folder
rm /etc/systemd/system/mnt-pve/testfolder.mount
To force remove/delete the file we can use following command (Usually it should not be the case)
rm -f /etc/systemd/system/mnt-pve/testfolder.mount
In step 5 I get a /mnt/pve/testfolder not mounted, but if i navigate to the path /mnt/pve/ I can see the directory testfolder
Shouldn't proxmox delete it by itself? (Depends if it has been created from gui or cli?)
Should I manually delete it with rm -r /mnt/pve/testfolder ?
In step 7 there is no mnt-pve inside the /etc/systemd/system/ so I can t find the /mnt-pve/testfolder.mount
why is that?
Thank you.
/mnt/pve
Even though there are relevant questions on that matter and after reading a lot of them I ve made my personal guide, I came across this need yesterday and trying to follow back my guide, noticed that there are some gaps that needec to be completed.
So my initial guide with an example goes
Unmount directory in Proxmox VE (PVE)
1 Login to PVE terminal directly or via SSH or via web gui -> Shell
2 Make sure the directory we want to unmount is not being used
3 Find the name of the directory, here we use “testfolder” as example
Locate the storage you want to remove from Data->storage and first edit it and unselect enable and remove it afterwards.
(else do it from cli with the command systemctl disable mnt-pve-testfolder.mount you ll notice below)
From there you will also be able to see the directory it is mounted on by the path option
4 Find the mounting service (I didn t use this ls -ahlp /etc/systemd/system)
systemctl list-units "*.mount"
We should see the mounting service from the results, here we will see following text as one of the results
mnt-pve-testfolder.mount . This service after removal shouldn t exist.
You can remove it with
systemctl disable mnt-pve-testfolder.mount
or it will be removed automatically after rebooting the server.
5 Unmount the directory
umount -R /mnt/pve/testfolder (for recursive in case you have mounted something inside that directory)
6 Check “/proc/mounts” file, delete/remove related lines, e.g. lines contain “testfolder”
nano /proc/mounts
When done, use Ctrl + X, Y, Enter key to Save and Exit nano
7 Remove the mount service for that folder
rm /etc/systemd/system/mnt-pve/testfolder.mount
To force remove/delete the file we can use following command (Usually it should not be the case)
rm -f /etc/systemd/system/mnt-pve/testfolder.mount
In step 5 I get a /mnt/pve/testfolder not mounted, but if i navigate to the path /mnt/pve/ I can see the directory testfolder
Shouldn't proxmox delete it by itself? (Depends if it has been created from gui or cli?)
Should I manually delete it with rm -r /mnt/pve/testfolder ?
In step 7 there is no mnt-pve inside the /etc/systemd/system/ so I can t find the /mnt-pve/testfolder.mount
why is that?
Thank you.
/mnt/pve
Last edited: