Prevent PVE creating directory for directory type storage

kjj

New Member
Mar 15, 2024
1
0
1
I need to copy templates between two clusters with serious isolation requirements.

It seems like I should be able to mount a USB drive on a host in cluster A, create storage pointing to a directory inside the flash drive, backup the template to that storage, then drive it to the other location, plug in to cluster B and restore.

The problem I'm having is that PVE keeps creating the storage directory on the root filesystem whenever the drive is unplugged. I want the storage to be inactive/disabled/offline/whatever if it can't see that directory, not to continually re-create it on the root device.

Is there any way to do this?

/
/mnt
/mnt/thumb <- mount point of the drive (UUID is in /etc/fstab)
/mnt/thumb/data <- path of the storage entity in proxmox
/mnt/thumb/data/dump <- path of backup files
 
Hi @kjj , welcome to the forum.

The Proxmox Storage Pool infrastructure is not meant for frequently removable disks. That said, you can try to disable the storage prior to removing the USB: "man pvesm" :
--disable <boolean>
Flag to disable the storage.

You can also remove the storage pool when you are done with it. Finally, you don't need to create PVE Storage Pool object to move files around, you can do it directly.

PS additionally you can tell PVE that the Pool directory is a mountpoint (man pvesm):
--is_mountpoint <string> (default = no)
Assume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited: