On Thu, Nov 19, 2015 at 07:45:13PM +0100, Ben Tebulin wrote:
> 
> >    It's just freed up lots of space. You'll probably find that your
> > "total" value for data in btrfs fi df is close to (but not exactly) 66
> > GiB now, if you've just run a full unfiltered balance. (The difference
> > being made up of metadata).
> 
> I think i need to dive more into the details of btrfs to finally grasp
> the details here
> 
> >    There's a repo of "useful btrfs scripts" that David Sterba looks
> > after. 
> 
> Great pointer!
> I think you refer to https://github.com/kdave/btrfsmaintenance and it
> indeed looks very promising.
> 
> >> Should I pick "btrfs show" in favor to "btrfs fi df" to learn about an 
> >> impending "disk full" situation?  
> >    In the general case, you need both of them to make sense of it. 
> 
> Duh.... I'll better... ehh... try to find some backported btrfs-profs
> supporting `usage`.

   It's not massively more helpful -- you still need to understand the
relationships. It just uses slightly different language, and puts all
the information in one output instead of two.

   You start with a load of unused space -- that's the "total" for
each device in btrfs fi show. That space is allocated to specific
usages as the FS needs it. The allocated space is the "used" in btrfs
fi show for each device.

   Then we switch to looking at btrfs fi df. The "total" values are
the amount of the *allocated* space given to each type of storage.
Within those, actual stuff is stored (like your files), which is the
"used" value for each kind of storage.

   If you've ever played SimCity, the allocation process is like
zoning -- you say what kind of thing can go on the space, but it's not
actually used until something gets built on it.

   The problem you hit is when everything has been allocated, and
there's a need for more metadata space (usually), and there's lots of
unused data space. The balance operation moves some things around so
that some of the unused data allocation can be freed up, giving the FS
the ability to allocate more metadata space.

   Hugo.

> >> Will newer kernels do the balance on their own? 
> >    I think it's on the "projects" list on the wiki [..]  aware of anyone 
> > working on it.
> 
> Ok - which is another +1 for looking at David 's repo.
> 
> Thanks!
> - Ben

-- 
Hugo Mills             | 2 + 2 = 5, for sufficiently large values of 2.
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

Attachment: signature.asc
Description: Digital signature

Reply via email to