how to remove directory

marcbe

Member
Jan 5, 2020
22
0
21
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.