Re: Qgroups are not applied when snapshotting a subvol?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





At 03/26/2017 06:03 AM, Moritz Sichert wrote:
Hi,

I tried to configure qgroups on a btrfs filesystem but was really surprised that when you snapshot a subvolume, the snapshot will not be assigned to the qgroup the subvolume was in.

As an example consider the small terminal session in the attachment: I create a subvol A, assign it to qgroup 1/1 and set a limit of 5M on that qgroup. Then I write a file into A and eventually get "disk quota exceeded". Then I create a snapshot of A and call it B. B will not be assigned to 1/1 and writing a file into B confirms that no limits at all are imposed for B.

I feel like I must be missing something here. Considering that creating a snapshot does not require root privileges this would mean that any user can just circumvent any quota and therefore make them useless.

Is there a way to enforce quotas even when a user creates snapshots?


Yes, there is always method to attach the subvolume/snapshot to specified higher level qgroup.

Just use "btrfs subvolume snapshot -i 1/1".

Thanks,
Qu


Moritz




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux