Re: snapshot space use
Original Message Subject: Re: snapshot space use From: Piotr Szymaniak szar...@grubelek.pl To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2015年04月09日 17:02 On Thu, Apr 09, 2015 at 08:45:21AM +0800, Qu Wenruo wrote: *snip* NOTE: quota is not so stable and has some problem, but should give you enough info. Those are related to actually using quota or can also hit you when you want to use it just for things like this snapshot space use? Using quota has more problems. Like exceeding quota make you unable to delete any file(like a deadlock). Your use case, just showing how much space you used, may still hit some unusual problem like inaccurate number or even minus number, with performance drop. But overall, it should be OK and meets your need. Thanks, Qu Piotr Szymaniak. -- 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
Re: snapshot space use
On Thu, Apr 09, 2015 at 08:45:21AM +0800, Qu Wenruo wrote: *snip* NOTE: quota is not so stable and has some problem, but should give you enough info. Those are related to actually using quota or can also hit you when you want to use it just for things like this snapshot space use? Piotr Szymaniak. -- - Oo, jesteś bystrzejszy, niż się wydaje. Przechodziłeś jakieś szkolenie antyterrorystyczne? - W pewnym sensie tak. Byłem żonaty. -- Nelson DeMille, The Lion's Game signature.asc Description: Digital signature
snapshot space use
# zfs list -t snapshot NAMEUSED AVAIL REFER MOUNTPOINT hetz0/be0-mail@2015-03-10 2.88G - 387G - hetz0/be0-mail@2015-03-11 1.12G - 388G - hetz0/be0-mail@2015-03-12 1.11G - 388G - hetz0/be0-mail@2015-03-13 1.19G - 388G - hetz0/be0-mail@2015-03-14 1.02G - 388G - hetz0/be0-mail@2015-03-15 989M - 386G - Is there any way to do something similar to the above ZFS command? It's handy to know which snapshots are taking up the most space, especially when multiple subvols are being snapshotted. -- My Main Blog http://etbe.coker.com.au/ My Documents Bloghttp://doc.coker.com.au/ -- 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
Re: snapshot space use
Hi, You can use btrfs quota feature to do it. Like this: # btrfs quota enable MNT_POINT # btrfs quota rescan -w MNT_POINT # btrfs qgroup show -prce MNT_POINT qgroupid rferexclmax_rfer max_excl parent child -- - 0/5 2248704 12288 00--- --- 0/2565509120 3272704 00--- --- rfer is all the space the subvolume takes. excl is the exclusive space the subvolume takes. You can also refer to 'btrfs-quota'(8) and 'btrfs-qgroup'(8), Also the following wiki can help: https://btrfs.wiki.kernel.org/index.php/Quota_support NOTE: quota is not so stable and has some problem, but should give you enough info. Thanks, Qu # zfs list -t snapshot NAMEUSED AVAIL REFER MOUNTPOINT hetz0/be0-mail@2015-03-10 2.88G - 387G - hetz0/be0-mail@2015-03-11 1.12G - 388G - hetz0/be0-mail@2015-03-12 1.11G - 388G - hetz0/be0-mail@2015-03-13 1.19G - 388G - hetz0/be0-mail@2015-03-14 1.02G - 388G - hetz0/be0-mail@2015-03-15 989M - 386G - Is there any way to do something similar to the above ZFS command? It's handy to know which snapshots are taking up the most space, especially when multiple subvols are being snapshotted. -- 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