LXC on promox 4

Terence

New Member
Nov 27, 2016
6
0
1
45
Hi

I am new to Proxmox and noticed that the default storage for LXC containers is RAW.
I assume these are not Sparse images, is there no way to use a Qcow2 image for LXC container?
 
I don't think containers would ever support anything other than kernel-supported filesystem or block device based "disks". If there was a qcow2 kernel driver block device driver then the answer would be probably yes, but I don't remember such one existing.

If you really insist you can possibly try not-so-fast or not-so-reliable stuff like anything fuse based, for example http://ask.xmodulo.com/mount-qcow2-disk-image-linux.html. They are possibly need some fiddling since proxmox don't support them out of the box (or, possibly, at all).

Disclaimer: I haven't tried them.

I would rather try stuff like zfs (which I don't personally trust but people keep telling it's cute) or btrfs (which still doesn't feel very stable but YMMV), both can do tricks on storage like compression or deduplication, among other things.
 
the default storage is LVM-thin, which is (as the name implies ;)) sparse.
 
  • Like
Reactions: grin
Note that even raw files are sparse in that unused blocks are not actually allocated. Also note that the loopback driver will turn discards into "hole punching", which essentially means running fstrim inside a container may reduce the amount of physical space consumed by the .raw file.
 

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!