Preallocated qcow2? Or XFS tips?

obrienmd

Member
Oct 14, 2009
109
0
16
Is there any way to make qcow2 images preallocate space upon creation? Using new storage model, I'm storing disk images in an XFS filesystem (mounted directory), and it's getting super fragmented with these sparse/growing images!

Alternately, does anyone have any tips for formatting/mounting XFS filesystems to optimize for qcow2/virtual image usage? Unfortunately, I cannot change this filesystem type, due to a corporate policy.
 
A bit more information, which doesnt make any sense to me: On a tip from another forum, I mounted XFS volume with mount option (allocsize=1024m), which means the file system _should_ allocate in 1GB blocks. However, after just a bit of growth in one qcow2, I went from 16 extents for 8 files, to over 10,000 extents for the same number of files... And the qcow2 only grew a gig or so!

Thoughts?
 
Are there any performance advantages to qcow2 over raw? I remember trying raw once, and being very dissapointed with the performance the guest OS reported on the "block device" compared to qcow2.

Anyone have any experience with this? If raw actually has no performance disadvantage, then raw w/ a preallocation option in the weberface would be phenomenal!
 
Are there any performance advantages to qcow2 over raw? I remember trying raw once, and being very dissapointed with the performance the guest OS reported on the "block device" compared to qcow2.

raw should be faster (less overhead).

Anyone have any experience with this? If raw actually has no performance disadvantage, then raw w/ a preallocation option in the weberface would be phenomenal!

I would prefer lvm volumes if you care about performance. LVM volumes on shared storage (or DRBD) also enables live migration.
 
Great. Thanks for the help, I'm going to try all of this, Dietmar. Now I just need to talk our XFS-pushers down.
 

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!