Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root:/btrfs/client1# btrfs qgroup create 1/101999 .
- root:/btrfs/client1# btrfs qgroup assign 0/268 1/101999 .
- root:/btrfs/client1# btrfs qgroup assign 0/270 1/101999 .
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(270|268)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 93466624 196608 0 1/101999
- 0/270 93466624 196608 0 1/101999
- 1/101999 0 0 0 ---
- root:/btrfs/client1# btrfs qgroup limit -e 300M $DIR1
- root:/btrfs/client1# btrfs qgroup limit -e 300M $DIR2
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(270|268)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 93466624 196608 314572800 1/101999
- 0/270 93466624 196608 314572800 1/101999
- 1/101999 0 0 0 ---
- root:/btrfs/client1# GROUP1="1/101999"
- root:/btrfs/client1# btrfs qgroup limit -e 500M $GROUP1 .
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(300|302)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 93466624 196608 314572800 1/101999
- 0/270 93466624 196608 314572800 1/101999
- 1/101999 0 0 524288000 ---
- root:/btrfs/client1# btrfs quota rescan ../
- quota rescan started
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(300|302)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 93466624 196608 314572800 1/101999
- 0/270 93466624 196608 314572800 1/101999
- 1/101999 93761536 393216 524288000 ---
- root:/btrfs/client1# dd if=/dev/zero of=$DIR1/opt/test bs=1M count=290
- 290+0 records in
- 290+0 records out
- 304087040 bytes (304 MB) copied, 0.991111 s, 307 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=2
- 2+0 records in
- 2+0 records out
- 2097152 bytes (2.1 MB) copied, 0.00430366 s, 487 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=20
- 20+0 records in
- 20+0 records out
- 20971520 bytes (21 MB) copied, 0.0695916 s, 301 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=200
- 200+0 records in
- 200+0 records out
- 209715200 bytes (210 MB) copied, 0.715864 s, 293 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=220
- dd: error writing ‘/btrfs/subvolumes/718d4e15c46ae147650107af8fa4962202152f4450eb5a8bf28316d61da184e5/opt/test’: Disk quota exceeded
- 210+0 records in
- 209+0 records out
- 219545600 bytes (220 MB) copied, 0.733752 s, 299 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=200
- dd: error writing ‘/btrfs/subvolumes/718d4e15c46ae147650107af8fa4962202152f4450eb5a8bf28316d61da184e5/opt/test’: Disk quota exceeded
- 39+0 records in
- 38+0 records out
- 40370176 bytes (40 MB) copied, 0.0818708 s, 493 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=20
- 20+0 records in
- 20+0 records out
- 20971520 bytes (21 MB) copied, 0.0565837 s, 371 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=200
- 200+0 records in
- 200+0 records out
- 209715200 bytes (210 MB) copied, 0.688529 s, 305 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=20
- 20+0 records in
- 20+0 records out
- 20971520 bytes (21 MB) copied, 0.0691545 s, 303 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=200
- 200+0 records in
- 200+0 records out
- 209715200 bytes (210 MB) copied, 0.707441 s, 296 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=200
- 200+0 records in
- 200+0 records out
- 209715200 bytes (210 MB) copied, 0.696815 s, 301 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=290
- 290+0 records in
- 290+0 records out
- 304087040 bytes (304 MB) copied, 1.00837 s, 302 MB/s
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=290
- 290+0 records in
- 290+0 records out
- 304087040 bytes (304 MB) copied, 0.999728 s, 304 MB/s
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(300|302)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 397553664 304316416 314572800 1/101999
- 0/270 397553664 304316416 314572800 1/101999
- 1/101999 701968384 608632832 524288000 ---
- root:/btrfs/client1# dd if=/dev/zero of=$DIR2/opt/test bs=1M count=20
- dd: failed to open ‘/btrfs/subvolumes/718d4e15c46ae147650107af8fa4962202152f4450eb5a8bf28316d61da184e5/opt/test’: Disk quota exceeded
- root:/btrfs/client1# rm -f $DIR2/opt/test
- rm: cannot remove ‘/btrfs/subvolumes/718d4e15c46ae147650107af8fa4962202152f4450eb5a8bf28316d61da184e5/opt/test’: Disk quota exceeded
- root:/btrfs/client1# btrfs qgroup show -pe .. | egrep '0/(300|302)|1/101999|excl|^--'
- qgroupid rfer excl max_excl parent
- -------- ---- ---- -------- ------
- 0/268 397553664 304316416 314572800 1/101999
- 0/270 397553664 304316416 314572800 1/101999
- 1/101999 701968384 608632832 524288000 ---
- root:/btrfs/client1# rm -f $DIR2/opt/test
- rm: cannot remove ‘/btrfs/subvolumes/718d4e15c46ae147650107af8fa4962202152f4450eb5a8bf28316d61da184e5/opt/test’: Disk quota exceeded
RAW Paste Data