Removing a PBS directory?

guerby

Active Member
Nov 22, 2020
86
18
28
51
Hi,

On a test PBS 2.0.4 server on a dedicated disk (sdb, unused otherwise) I first created a directory "datastorage1" on sdb via administration/storage/directory/create directory, unchecking "Add as datastore" (since I did not want to create one immediately).

Then I changed my mind and wanted to name the directory "testdatastorage1", so I wiped the disk (wipefs -a /dev/sdb) and restarted but the old one remained in the UI in the directory listing.

When I rebooted the PBS server it took a long time to boot. After checking the logs it was trying/waiting to mount the old directory (with UUID) and failed.

I could not find in the UI nor in proxmox-backup-manager a way to remove the old directory so I did it at the systemctl level:

Code:
systemctl status mnt-datastore-datastore1.mount
systemctl disable mnt-datastore-datastore1.mount
rm /etc/systemd/system/mnt-datastore-datastore1.mount

Then boot was normal and UI too.

Did I miss a "proper" way to remove a directory once created? (UI or command line)
 
Last edited:
In my case I unchecked "Add as datastore" when creating the directory so there was no datastore in the UI.
Ah, I see. Seems you cannot remove the generated mount units on the GUI, so doing it on the CLI is the only way.
 
  • Like
Reactions: guerby