[lxc-users] Btrfs gquota and container disk usage limits

Mark Constable markc at renta.net
Fri Apr 10 01:13:36 UTC 2015


On 10/04/15 08:13, Serge Hallyn wrote:
>> Looks like lxd automatically creates part of the filesystem as a subvolume
>
> FWIW, at the moment no lxd does no such thing.  Hopefully soon we'll start
> exploiting whatever advantages the native fs provides automatically.

But look at the path in my example, /var/lib/lxd/. It's obviously not the
rootfs but something in lxd seems to use btrfs for some part of the process.

>> ~ btrfs sub list / | grep lxd
>> ID 2403 gen 554661 top level 1674 path var/lib/lxd/lxc/v1/rootfs/var/lib/machines
>> ID 2407 gen 556386 top level 1674 path var/lib/lxd/lxc/v2/rootfs/var/lib/machines

>> but I'm not sure how rootfs/var/lib/machines fits into the picture, so no,
>> I never figured out how to properly set up a lxd container as a subvolume

Anyway good to hear that lxd will soon start to take advantage of btrfs so
we can use it's native gquota and hopefully see that reflected inside a
container via the common df command. This is one case where btrfs subvolume
quotas suits the situation better than typical per-user quotas in other
filesystems.


More information about the lxc-users mailing list