Removing a PBS directory?

guerby

Active Member
Nov 22, 2020
80
11
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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!