Jump to content

Cache Drive 100 Use% but only "Used" is 103G/233G

11 posts in this topic Last Reply

Recommended Posts

It's a 250GB SSD using btrfs, here is the "df -h" output

Filesystem                 Size  Used Avail Use% Mounted on
/dev/sdb1                  233G  103G     0 100% /mnt/cache

Last night I was able to delete a few files on the drive and it jumped back to "40%-ish" use and but this morning I couldn't even get that to work. Is there something that causes df not to report the right usage? Only thing I can add out is I just moved my plex config folder to the cache drive and it has a billion little files in there (Trying to run du on the plex folder takes hours).

Share this post

Link to post

Never seen it on a cache device, but it does happen sometimes on array devices, on those cases it was fixed by copying a large file locally from another disk, e.g., use cp or midnight commander and copy a large file from any disk to the cache device (if you copy from a user share use /mnt/user0).

Share this post

Link to post

Crap, I just noticed the /var/log mount is full and so nothing is writing to it anymore. I cleared out space but in the past I've had to restart before logging resumes so I'm going to do that now.

Share this post

Link to post

Ok, I have run:

btrfs balance start -dusage=5 /mnt/cache

And that completed with the message:


Done, had to relocate 38 out of 236 chunks

For the following values:


Data, single: total=196.87GiB, used=98.62GiB
System, single: total=4.00MiB, used=48.00KiB
Metadata, single: total=2.01GiB, used=861.39MiB
GlobalReserve, single: total=157.81MiB, used=0.00B

Which value do I need to watch to know when to re-run that?

Share this post

Link to post
15 minutes ago, joshstrange said:

Data, single: total=196.87GiB


This is the one to watch, when it's getting close to the device size you should run a balance, this is how it was:


Data, single: total=231.87GiB, used=101.35GiB

You can see it best on btrfs fs show:



Label: none  uuid: 93e1b729-262a-4f89-a3c3-1279794de80f
    Total devices 1 FS bytes used 102.20GiB
    devid    1 size 232.89GiB used 232.89GiB path /dev/sdb1


size is total device size, used is allocated space.

Share this post

Link to post

Also, when all space is allocated the first balance should be run with -dusage=5 or it can fail, but now you can run it with an higher value to recover most allocated space, e.g.:


btrfs balance start -dusage=75 /mnt/cache
Edited by johnnie.black

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.