What is the correct way or is it even possible?
Backup / Restore is not an option, as we're talking about 300 vm's.
如果您的存储支持丢弃,您可以在您的 vm 磁盘上启用丢弃并执行 fstrim。
或者你可以备份/恢复
(请注意,默认情况下原始格式也是精简配置的,只需执行“du -sh myfile.raw”即可查看实际空间使用情况)
How to set Thick Provisioning?if your storage support discard, you could enable discard on the your vm disk and do an fstrim.
or you can backup/restore
(Note that raw format is thin provisionned too by default, just do a "du -sh myfile.raw" to see the real space usage)
But #3 spirit said: "Note that raw format is thin provisionned too by default", I need disable thin provisionuse RAW files
Recreate the RAW file as thick provisioned with dd after creating it or convert it via qemu-img manually (google is your friend). There is no way to do this in PVE itself except with thick LVM and ZFS without the 'sparse' check mark.But #3 spirit said: "Note that raw format is thin provisionned too by default", I need disable thin provision
Thin provision option affects the refreservation property. Discard/fstrim will still work without it.Yea I wondered about that as well, the "Thin Provision" Option in Datacenter -> Storage -> ZFS is kinda confusing, as in both cases (not enabled, enabled) it is thin-provisioned. ZFS Reservation just wont let you create any new disks if reserveration is full. Might be cool, mentioning or even changing the term in the Datacenter -> Storage -> ZFS Definition?Note that the ZFS storageThin provisionoption affects therefreservationproperty. Discard/fstrimwill still work without it.
I'm guessing for LVM-Thin it behaves similar to this: https://forum.proxmox.com/threads/v...fter-migrating-it-to-lvm-thin-storage.142070/
This distinction is irrelevant for PVE or any other virtualization platform that does not use files for its storage, as @aaron already wrote.What happens if someone imports a thick provisioned vmdk via importer into a thin-provisioned storage (like ZFS or ceph) will the imported disk still be thick or can it become thin somehow? (I will test if no one knows) - havent tried yet.
I would ALWAYS recommend to run trim/discard inside of the guest to really free up actually free space. This is not so common knowledge as VMware does not really support this in VMDK files and at least at the time of my last test needs offline time to compact the file. Files are so bad for VMs, a lot of performance and space saving potential is just wasted on file-based systems. Even LVM-thin and RBD are not really that good with respect to thin provisioning, as their allocation units are just to darn huge and need further optimization. The allocation units are in the MBs and not 8KB or 16KB depending on your PVE generation in ZFS.On RBD, you would need to do a trim/discard after the import, as, IIRC, on RBD, zeros will be written initially.
We use essential cookies to make this site work, and optional cookies to enhance your experience.