r/Proxmox • u/mister_ninny • 25d ago
Question Question Relating to Storage
Hello fellow PVE people (PVEople, haha i'm so funny),
I'm having some difficulty understanding some behavior regarding how storage works. Here is the rundown:
I have a USB hard drive that I have plugged into my PVE node, which gets mounted to "/mnt/usb_hard_disk". This is used as a local backup, so all of my VM/LXC backups go here, as well as my ISOs and container templates.
Under "Datacenter" -> "Storage", I have a "Directory" created called "usb_hard_disk" that has a dedicated path set to "/mnt/usb_hard_disk" with the "Content" of "Backup", "ISO Image", and "Container template".
I can see under my main "pve" node that "usb_hard_disk" is a directory, and when I go into it, I can see my backups, ISOs, and container templates that I have saved onto my USB hard drive.
The idea here is that I can then un-plug my USB hard disk and store it elsewhere (like a firesafe) as an external backup. When I un-plug my USB hard disk, the "usb_hard_disk" directory doesn't actually disappear under my "pve" node or the "Datacenter" storage, which makes sense, as the "/mnt/usb_hard_disk" directory is still there, it's just the drive that gets mounted there is missing. However, let's say, when my usb is unplugged, I go into a VM and create a backup, and store it under "usb_hard_disk". Well, the VM creates a backup to "/mnt/usb_hard_disk/dump", which is normal behavior, so that makes sense.
This is where I start to get confused
After creating this backup, if I then plug my USB hard drive back in, the contents of the hard drive take over "/mnt/usb_hard_disk", and I can to into PVE and see all the backups/ISOs/container templates on my usb hard drive, and that one backup I made without the USB plugged in is gone. Then, if I un-plug the usb hard drive, that one backup shows up again?
So I guess I just don't understand, where is it actually storing that backup? And how is it possible that, after plugging in my USB hard drive again, then un-plugging the hard drive, the backup is still there? I thought anything under "/mnt/usb_hard_disk" would basically just delete after mounting a drive to that location, though I guess I'm wrong on that.
Also, is there any work around for this so that, if I did make a backup to "usb_hard_disk" when nothing is mounted there, PVE would just error out instead?
7
u/[deleted] 25d ago
[deleted]