Coder Social home page Coder Social logo

Comments (9)

NicoHood avatar NicoHood commented on July 18, 2024 3

I recently tried the snapper quota tool:
http://snapper.io/2016/05/18/space-aware-cleanup.html

However with get-config my QGROUP setting is empty as before, even though I ran setup-quota. What is also unclear to me is the meaning of 1/0. And finally where can I set what the maximum disk usage is? Its written about 50% but where can i set this? Does 2-10 then mean: "keep maximum 10 snapshots, but if quota shows high disk usage reduce to minum 2 snapshots?

from snapper.

MurzNN avatar MurzNN commented on July 18, 2024 1

Thanks, for the info, qgroups is exactly that I want.

On Ubuntu 13.10 qgroups works well out of the box (btrfs-tools Version: 0.19+20130705-1):

# btrfs quota enable /btrfs/ 
# btrfs qgroup show /btrfs/
0/5 4698025984 8192
0/257 52432896 4096
0/263 4405821440
12288 0/264
4698025984 8192 

But this output is raw and too hard to understand. Here http://dustymabe.com/2013/09/22/btrfs-how-big-are-my-snapshots/ I can find article with script that convert this info into human-readable report:

# btrfs qgroup show /btrfs/ | /root/convert
0/5 4480M 0M
0/257 50M 0M
0/263 4201M 0M
0/264 4480M 0M

This is better, but will be good to see snapper snapshot names instead of id in it.

Can you integrate this snapshot use size report into snapper? If btrfs-tools version is not fresh, you can show warning that this is not supported.

from snapper.

aschnell avatar aschnell commented on July 18, 2024

With btrfs qgroups (quota groups) this is possible. Unfortunately qgroups are not mature yet.

from snapper.

aschnell avatar aschnell commented on July 18, 2024

The output is already better in newer versions of btrfsprogs, e.g.:

f17:~ # btrfs qgroup show /
qgroupid rfer       excl                 
-------- ----       ----                 
0/5      16384      16384                
0/257    2940633088 -20557824            
0/258    2387968    2387968              
0/259    16384      16384                
0/260    16384      16384                

I want to integrate that in snapper but for me the qgroups are not mature, e.g. see the negative number above!

from snapper.

cmlsharp avatar cmlsharp commented on July 18, 2024

Try this oneliner:

sudo btrfs subvolume list / | sed 's///\//g' | awk '{print "sed "s/"$2 " /"$2 " " $9"/" "}' | while read line; do echo -n " ${line} |";done | sed 's/|$/\n/' | sed 's/^/sudo btrfs qgroup show / |/' | source /dev/stdin | sed 's/qgroupid/qgroupid subvol/' | awk 'NF>3' | column -t

from snapper.

MurzNN avatar MurzNN commented on July 18, 2024

Good tool for human-readable btrfs snapshot size report is btrfsQuota.py placed here: https://btrfs.wiki.kernel.org/index.php/Quota_support

from snapper.

MurzNN avatar MurzNN commented on July 18, 2024

Another tool for understanding btrfs snapshot size: https://poisonpacket.wordpress.com/2015/05/26/btrfs-snapshot-size-disk-usage/

from snapper.

HalisCz avatar HalisCz commented on July 18, 2024

Is there any upgrade on this? I am using snapper on btrfs, but getting snapshot's size is impossible with snapper itself, although I am convinced that snapper should be aware of the snapshot size.

from snapper.

aschnell avatar aschnell commented on July 18, 2024

For every snapshot snapper now shows the exclusive space of the corresponding btrfs qgroup, see http://snapper.io/2018/10/04/used-space.html.

from snapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.