马春杰杰 Exit Reader Mode

btrfs格式磁盘如何开启目录限额?

创建限额目录

btrfs subvolume create songchengyuan-3ogg33

查看子卷

btrfs subvolume list /vol1

设置配额

btrfs qgroup limit 200G /vol1/NFSshare/mount/songchengyuan-3ogg33

查看配额:

(base) root@VPMS-Lab-NAS:/vol1/NFSshare/mount/mashibo-0beuwp# btrfs subvolume show /vol1/NFSshare/mount/songchengyuan-3ogg33
NFSshare/mount/mashibo-0beuwp
	Name: 			mashibo-0beuwp
	UUID: 			cbc128ea-d373-4647-b313-1f40ae28ecdf
	Parent UUID: 		-
	Received UUID: 		-
	Creation time: 		2025-12-25 11:51:57 +0800
	Subvolume ID: 		259
	Generation: 		135507
	Gen at creation: 	135492
	Parent ID: 		5
	Top level ID: 		5
	Flags: 			-
	Send transid: 		0
	Send time: 		2025-12-25 11:51:57 +0800
	Receive transid: 	0
	Receive time: 		-
	Snapshot(s):
	Quota group:		0/259
	  Limit referenced:	300.00GiB
	  Limit exclusive:	-
	  Usage referenced:	16.00KiB
	  Usage exclusive:	16.00KiB

修改配额:

btrfs qgroup limit 300G /vol1/NFSshare/mount/songchengyuan-3ogg33