On 2017-05-11 12:17, Robert Mader wrote:
Hello everyone,
I just wanted to ask a short question as I couldn't find a clear answer
anywhere on the net, yet:
Is it currently possible to reserve space for a BTRFS subvolume?
Currently, there is no way to do this directly right now. However, you
_can_ do this with regular quotas as implemented by qgroups, you just
set each subvolume to have a quota equal to the size of the volume minus
the amount of space you want reserved to other subvolumes. While
inconvenient, this will produce behavior functionally identical to
setting reserved space on data sets in ZFS without setting quotas, as
long as you don't add or remove subvolumes.
Following example: I have two subvolumes, one for root and one for home
I'd like to reserve 2GB of space for my root volume so even if my home
volume fills up, it can never starve my root subvolume.
But I don't want to set a fixed limit on my home partition, I want both
subvolumes to be able to grow and shrink dynamically.
I use that functionality a lot on ZFS-based systems like FreeNAS. In the
the web-interface of FreeNAS one can easily configure things like that.
If I get it right, qgroups actually already create things like a global
reserve. Therefor the functionality seems to be there. Is there a way to
use it, just like the limit functionality? Or is it planed?
I'm not certain about this myself, but you may be thinking of the
GlobalReserve area in the metadata, which actually has nothing to do
with how qgroups work, and is instead used to allow things to keep
working to a limited degree when the filesystem is full.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html