On 07/31/13 07:39, Tomasz Chmielewski wrote: > On Wed, 31 Jul 2013 13:13:37 +0800 > Wang Shilong <wangsl.fnst@xxxxxxxxxxxxxx> wrote: > >>> # git pull origin master >> >> Oops, i am sorry, here should: >> >> git pull origin qgroup >> >> would you please try it again > > Excellent, it works: > > # btrfs qgroup show -p /mnt/lxc2 > 0/260 154273873920 154273873920 --- > 0/261 181260288 181260288 --- > 0/262 155557888 983040 --- > 0/377 180539392 26005504 --- > 0/378 308607238144 308607238144 --- > 0/535 572407808 417832960 --- > 0/536 68085026816 68085026816 --- > 0/642 247824384 93282304 --- > 0/1276 636026880 4096 1/1 > 0/1277 38301687808 4096 1/1 > 0/1278 617164800 32768 1/1 > 0/1279 38297591808 4096 1/1 > 0/1284 38299160576 0 1/1 > 0/1285 38299160576 21364736 1/1 > 0/1286 620396544 0 1/1 > 0/1287 633090048 12722176 1/1 > 0/1293 38301687808 4096 1/1 > 0/1294 636026880 4096 1/1 > 1/1 38972137472 38972137472 --- > > > Thanks a lot! > > > Am I correct to think that I have to run quota rescan after > assigning groups? > > # btrfs qgroup assign 378 1/1 /mnt/lxc2 <<----- assigning volid 378, having 300+ GB > > # btrfs qgroup show -p /mnt/lxc2 | grep 1/1 > 0/378 308607238144 308607238144 1/1 > 0/1276 636026880 4096 1/1 > 0/1277 38301687808 4096 1/1 > 0/1278 617164800 32768 1/1 > 0/1279 38297591808 4096 1/1 > 0/1284 38299160576 0 1/1 > 0/1285 38299160576 21364736 1/1 > 0/1286 620396544 0 1/1 > 0/1287 633090048 12722176 1/1 > 0/1293 38301687808 4096 1/1 > 0/1294 636026880 4096 1/1 > 1/1 38972137472 38972137472 --- <<----- although we've added 300+ GB volume, the total numbers are unchanged > > > That can be quite a bit of IO? To avoid the rescan you can do the assignment atomically with the creation of the subvol. Basically if you lay out your future quota/subvol/snapshot when you create your filesystem, you never have to do a rescan. The commands are all there for that, but it's not really easy to do if you have a complex setup. That part needs a better documentation and more examples, and also probably a better UI. Only if you change your mind later on you probably have to rescan. -Arne > > -- 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
