Persistent directory mount

jester95

New Member
Apr 16, 2023
6
0
1
Where does PVE store persistent mounts for directory storage? Looking for a config file.

I'm testing a standalone instance in which the primary drive (running pve) fails and my directory storage has backup files. I'm able to reestablish LVM and zfs storage by copying the necessary items from storage.cfg.

I can run the mount command (mount /dev/sdd1 /mnt/pve/dir-wd320/) to establish the (directory) mount but its not persistent after a reboot. Here is the error I receive on the GUI.

"unable to activate storage 'dir-wd320' - directory is expected to be a mount point but is not mounted: '/mnt/pve/dir-wd320' (500)"
 
If you added the storage on a disk (node -> Disks -> Directory) via the Proxmox VE tooling, then a systemd mount unit is used.
There will be a /etc/systemd/system/mnt-pve-<NAME>.mount unit file that you need to enable.
 
  • Like
Reactions: bbgeek17
If you added the storage on a disk (node -> Disks -> Directory) via the Proxmox VE tooling, then a systemd mount unit is used.
There will be a /etc/systemd/system/mnt-pve-<NAME>.mount unit file that you need to enable.

On the original system the file shows up as 'mnt-pve-dir\x2dwd320.mount' and I tried to recreate on the recovery system however its still not appearing as an active disk in the PVE GUI.

I created the file using nano editor.

You mentioned having to enable. Am I missing that step?
 
On the original system the file shows up as 'mnt-pve-dir\x2dwd320.mount' and I tried to recreate on the recovery system however its still not appearing as an active disk in the PVE GUI.

I created the file using nano editor.

You mentioned having to enable. Am I missing that step?


So i executed the following root@z420b:/etc/systemd/system# systemctl enable 'mnt-pve-dir\x2dwd320.mount' and now the drive appears after a reboot. Does this sound like expected behavior to you?
 
Why it wasn't enabled is a good question. Do you still have the task log for when it was created? You can check it by going to your node -> Task History, then in the top right you can enable the Filter. Filter for the task type of "dircreate". If it is still there, can you post the full task log? Maybe we see there what went wrong.
 
Why it wasn't enabled is a good question. Do you still have the task log for when it was created? You can check it by going to your node -> Task History, then in the top right you can enable the Filter. Filter for the task type of "dircreate". If it is still there, can you post the full task log? Maybe we see there what went wrong.
So it was created on the original install. I'm trying to reattach (the drive) during a simulated/test recovery from a failed disk (that pve was installed on)
 
So it was created on the original install. I'm trying to reattach (the drive) during a simulated/test recovery from a failed disk (that pve was installed on)
Okay, well then yep, you need to make sure that the systemd mount unit is enabled if you still have it. :)
 

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!