Proxmox: How to Remove directory

Use Proxmox UI (Recommend way)

  • Go to Node > Directory
  • select the directory to delete
  • Click More > Destroy
  • Confirm

If recommended way, It did not work. It shows errors like "Task Fail: Not A Valid Block Device

try to use cmd (God Mode)

Note: The directory mount file can be found in /etc/systemd/system (I test on Proxmox 8)

  • find your directory mount, In My Case is name data2) so command should be
root@pve:~# ls -al /etc/systemd/system | grep data2
-rw-r--r--  1 root root  212 Nov  9 22:55 mnt-pve-data2.mount
  • if your want to list you can use this command
root@pve:~# ls -al /etc/systemd/system | grep 'pve.*\.mount$'
-rw-r--r--  1 root root  212 Nov  9 22:55 mnt-pve-data2.mount
  • the content of the file mnt-pve-data2.mount should be like this
root@pve:~# cat /etc/systemd/system/mnt-pve-data2.mount
[Install]
WantedBy=multi-user.target

[Mount]
Options=defaults
Type=ext4
What=/dev/disk/by-uuid/8e3fa4c8-dbee-4da5-bf06-7cb1f47fe708
Where=/mnt/pve/data2

[Unit]
Description=Mount storage 'data2' under /mnt/pve
  • Remove the mount file with the command
rm /etc/systemd/system/mnt-pve-data2.mount
  • After executing the remove command, check the Proxmox UI. The directory should be gone from UI.


Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts sent to your email.