On Thu, Feb 27, 2014 at 02:16:07AM +0200, Marcus Sundman wrote: > On 25.02.2014 22:30, Josef Bacik wrote: > >On 02/25/2014 03:27 PM, Marcus Sundman wrote: > >>On 25.02.2014 22:19, Hugo Mills wrote: > >>>On Tue, Feb 25, 2014 at 01:05:51PM -0500, Jim Salter wrote: > >>>>370GB of 410GB used isn't really "fine", it's over 90% usage. > >>>> > >>>>That said, I'd be interested to know why btrfs fi show > >>>>/dev/sda3 shows 412.54G used, but btrfs fi df /home shows 379G > >>>>used... > >>>This is an FAQ... > >>> > >>>btrfs fi show tells you how much is allocated out of the > >>>available pool on each disk. btrfs fi df then shows how much of > >>>that allocated space (in each category) is used. > >>What is the difference between the "used 371.11GB" and the "used > >>412.54GB" displayed by "btrfs fi show"? > >> > >>>The problem here is also in the FAQ: the metadata is close to > >>>full -- typically something like 500-750 MiB of headroom is > >>>needed in metadata. The FS can't allocate more metadata because > >>>it's allocated everything already (total=used in btrfs fi show), > >>>so the solution is to do a filtered balance: > >>> > >>>btrfs balance start -dusage=5 /mountpoint > >>Of course that was the first thing I tried, and it didn't help *at* > >>*all*: > >> > >The -dusage=<number> is a means to an end, so if that doesn't work try > >a larger number, up to 100. Really once you pass 50 and it's not > >working then it's time to just do a balance. The next thing is to use > >compression (too late for this option really) or add another disk. > > So it relocates some chunks. What will that do? Does it mean I can > now use the remaining 45 GB? Or will it run out of "disk space" > again after using a gig or two? What it's done is moved some of the data around. One effect of this process is that when a balance operation balances a chunk, it deallocates that space. Therefore you should now see that the "used" value for the device in btrfs fi show is lower than the "total" value. Also, the "total" value for data in btrfs fi df should now be lower than it was before. This means that the next time the FS needs some metadata space (probably real soon now, because it was running out of it earlier), it now has uncommitted space to allocate to metadata. > If it's the allocated metadata space that is the problem then how > can I pre-allocate more of it so it won't run out of it? It's possible that when filling up the remaining 45 GiB of space the metadata will need to expand again, and you will need to run a balance to do the same job again. Unless you have lots and lots of small files or small fragments (or lots more snapshots than you've been making to date), I'd say it's probably unlikely, though. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Well, sir, the floor is yours. But remember, the --- roof is ours!
Attachment:
signature.asc
Description: Digital signature
