joshstrange Posted August 28, 2017 Share Posted August 28, 2017 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). Quote Link to comment
JorgeB Posted August 28, 2017 Share Posted August 28, 2017 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). Quote Link to comment
joshstrange Posted August 28, 2017 Author Share Posted August 28, 2017 @johnnie.black I tried creating a dummy file (with dd) and copying a file and I got: cp: cannot create regular file 'XXX': No space left on device Both times. Quote Link to comment
JorgeB Posted August 28, 2017 Share Posted August 28, 2017 Post your diagnostics. Quote Link to comment
joshstrange Posted August 28, 2017 Author Share Posted August 28, 2017 @johnnie.black Here you go tower-diagnostics-20170828-1027.zip Quote Link to comment
joshstrange Posted August 28, 2017 Author Share Posted August 28, 2017 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. Quote Link to comment
JorgeB Posted August 28, 2017 Share Posted August 28, 2017 Filesystem is not full but it's fully allocated, see here: 1 Quote Link to comment
joshstrange Posted August 28, 2017 Author Share Posted August 28, 2017 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? Quote Link to comment
JorgeB Posted August 28, 2017 Share Posted August 28, 2017 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: Quote 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. 1 Quote Link to comment
joshstrange Posted August 28, 2017 Author Share Posted August 28, 2017 Thank you @johnnie.black! Quote Link to comment
JorgeB Posted August 28, 2017 Share Posted August 28, 2017 (edited) 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 August 28, 2017 by johnnie.black 1 Quote Link to comment
Recommended Posts
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.