LVM Storage on SAN, new VM and Disk show data from a previous deleted system/disk

talos

Renowned Member
Aug 9, 2015
82
12
73
Hi,

today created a new VM to evaluate AlmaLinux 10.1, when i try to boot it, it booted an old Ubuntu System that was deleted a few days ago. This is LVM on a FC SAN with Snapshots as Volume Chains enabled.

It makes kinda sense if lvm is allocating something in thick mode but does itself nothing with data in that range. I think this is dangerous depending on who has access to a VM, an auto provision VM may accidently boot from disk and not ISO because there is a valid signature and parition. Is this expected with storage on LVM?

I think this may have an affect on Backup, if there is a lot of old data. Last time i created a new VM and backed it up, that was quiete large an almost no Zeros.

I would like to see some feature to let Proxmox zero out the whole lvm range on VM creation to make sure there is no existing data.

Is this a bug or expected?


1769162453215.png
 

From this post, it looks like this is a expected behaviour of LVM. I still like the idea to have some optional zero out feature on LV creation. VM based or Cluster wide for security.
 
There is the option to wipe it on volume removal, as explained in the documentation.
Thanks your help, i enabled this feature on my lvm storage and deleted a bigger test vm, i was surprised how fast the zeroing out process is, i expected it to take some times but 512gb was done in around 15 sek. I recreated the VM and there where no remains of the old partition/data, a backup only read zeros from storage, so proxmox was successful zeroIng out the data.

Next time i create a new volume for a pv, i zero it out before doing a pvcreate, so there is no old data from my old volumes.
 
i was surprised how fast the zeroing out process is, i expected it to take some times but 512gb was done in around 15 sek.
Yes, depending on the used backend zeoring, it can be very fast. It can also be very slow, I have experienced both.

Next time i create a new volume for a pv, i zero it out before doing a pvcreate, so there is no old data from my old volumes.
You can try to create a volume with the full available storage and delete the volume afterwards. Now, it should be zeroed for all further new VMs. Best to do that for a new VM.
 
  • Like
Reactions: Johannes S