LXCs in Thinpool Over RAID1: When should I mkfs.ext4 ?

moxfan

Active Member
Aug 28, 2013
104
7
38
Hi,

When creating LXCs in a thinpool on LVM over RAID1, I'm not sure whether or not to lay the filesystem on
* the RAID1 array before LVM comes into play,
or
* the logical volume just before converting it to a thinpool,
or
* just leave it to Proxmox to lay the fs when creating the containers inside the thinpool and that's it - none of the previous mkfs's are needed.

The question is: Which option is the right one?
 
Last edited:
Last one. In regular usage, you do not need to run 'mkfs'. If you want a manual filesystem (not for container use), you'd have to create a thin-LV on your thinpool and then run mkfs on that (/dev/mapper/xxxxx).
 
  • Like
Reactions: moxfan
Last one. In regular usage, you do not need to run 'mkfs'. If you want a manual filesystem (not for container use), you'd have to create a thin-LV on your thinpool and then run mkfs on that (/dev/mapper/xxxxx).
Thanks, Stefan, for clarifying.

Taking that conclusion one step further, if I increase (over-allocate) an LXC's space online through the GUI to, say, 200 GB (with, say, 50GB used up) before the thinpool's space is auto extended from a starting point of, say, 75 GB upwards, will the LXC's filesystem get resized automatically as and when the extended thinpool space becomes available?
 
Last edited:
Thin-pools are, as the name suggests, thin-allocated. However, that does not mean that the container only has a part of the disk space available, it always has all of it available. Thus, the filesystem will immediately be extended to 200 GB in your example - but since most of it is unused, it will still not actually take up the disk space, until files are actually written there (and released on fstrim, IIRC). All of this happens automatically behind the scenes.
 
  • Like
Reactions: moxfan

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!