how to remove directory

marcbe

Member
Jan 5, 2020
21
0
6
Hello,

I find these directories:

1695415402564.png

They don't seem erasable.

Can someone kindly indicate a procedure that allows me to remove the directories?

Thank you
 
Hello

* first remove the datastore if there is one
* then remove the mount script
Code:
rm /etc/systemd/system/multi-user.target.wants/mnt-datastore-<datastorename>.mount
* possibly remove directory mountpoint
Code:
rmdir /mnt/datastore/<datastorename>
* possibly wipe the disks
Code:
wipefs --all /dev/<diskname>
 
Thanks Markus,

but /mnt/datastore/ is already clean with only the datastore active.

Anyway in this folder /etc/systemd/system/multi-user.target.wants/ they do not appears the datastore:

root@pve:/etc/systemd/system/multi-user.target.wants# ls -larth | grep st1
root@pve:/etc/systemd/system/multi-user.target.wants# ls -larth | grep sea
root@pve:/etc/systemd/system/multi-user.target.wants# ls -larth | grep s8i
root@pve:/etc/systemd/system/multi-user.target.wants# ls -larth | grep datastore
lrwxrwxrwx 1 root root 45 Sep 17 2021 mnt-datastore-wb500.mount -> /etc/systemd/system/mnt-datastore-wb500.mount
lrwxrwxrwx 1 root root 45 Sep 23 10:13 mnt-datastore-mx5t1.mount -> /etc/systemd/system/mnt-datastore-mx5t1.mount
root@pve:/etc/systemd/system/multi-user.target.wants#

mx5t1 is the active datastore, all othe that you can see in the image, are not present and or connect to this proxmox.
While wb500 is dead and not connected.

Can you help me to understad ? Thanks
 
I am sorry in multi-user.target.wants is only a symlink, you need to remove the mount file in /etc/systemd/system/

Code:
rm /etc/systemd/system/mnt-datastore-<datastorename>.mount

This file is for mounting a partition as a directory at /mnt/datastore/<datastorename>
If you remove the file the directory disappears in this directory list.
 

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!