testdasi Posted November 12, 2017 Share Posted November 12, 2017 My understanding from the help text is that balance is only required for multi-disk cache. However, I read some other threads on the forum that (I think) suggest that balance should be run periodically in addition to trim, as a generic recommendation. It appears to solve problem of having a false error of running out of space when there are still plenty of free space available. Quote Link to comment
itimpi Posted November 13, 2017 Share Posted November 13, 2017 If you only have a single drive in the cache then XFS is likely to be more stable and performance file system to use. If you use XFS then balance operations are not applicable. Quote Link to comment
testdasi Posted November 13, 2017 Author Share Posted November 13, 2017 5 hours ago, itimpi said: If you only have a single drive in the cache then XFS is likely to be more stable and performance file system to use. If you use XFS then balance operations are not applicable. I used btrfs, remnant from the time when I wanted RAID1 for cache. So for btrfs, do I still have to balance if only 1 disk? Quote Link to comment
JorgeB Posted November 13, 2017 Share Posted November 13, 2017 It's a good idea to run a weekly balance, at least until we get to kernel 4.14, which is expected to fix this issue, it doesn't need to be a full balance, something like this: btrfs balance start -dusage=75 /mnt/cache Quote Link to comment
bbbilly05 Posted November 13, 2017 Share Posted November 13, 2017 I take it we just do this manually - this command isn't baked into the scheduler > SSD TRIM function? Not a big deal, took less than 5 minutes. This is the first time I'd done balance since building my machine over six weeks ago - reported relocating 64 out of 105 chunks. B. Quote Link to comment
JorgeB Posted November 13, 2017 Share Posted November 13, 2017 35 minutes ago, bbbilly05 said: I take it we just do this manually You can use the user scripts plugin to schedule it. 1 Quote Link to comment
bbbilly05 Posted November 13, 2017 Share Posted November 13, 2017 Great - thank you @johnnie.black. That plug in makes it easy. Much appreciated. Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 (edited) On 11/13/2017 at 10:26 AM, johnnie.black said: You can use the user scripts plugin to schedule it. I'm just running my first balance - it looks like I should have been doing frequently as so far it's balanced 24 out of 27 considered (469 in total). I'm going to setup a script job as suggested - what commands do you recommend for a weekly job? Has the only impact been the loss of space on my cache pool as a result of not balancing, or have I had a speed impact? I'm guessing there's been a potential speed impact as I believe unRAID alternates which cache drive it reads from, so if a file only exists on one, I will have been a 'bit' slower?? Should I also setup a regular scrub job? Edited November 24, 2017 by DZMM Quote Link to comment
JorgeB Posted November 24, 2017 Share Posted November 24, 2017 1 minute ago, DZMM said: what commands do you recommend for a weekly job? btrfs balance start -dusage=75 /mnt/cache 2 minutes ago, DZMM said: Has the only impact been the loss of space on my cache pool as a result of not balancing, or have I had a speed impact? It doesn't cause loss of space, it can cause ENOSPC errors if the file system gets to be fully allocated. It does have a speed impact since there's currently a bug where most or all allocated but free space is not trimmed. 4 minutes ago, DZMM said: Should I also setup a regular scrub job? If all is working well it's not really needed, but running say a monthly scrub can be good practice. 1 Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 7 minutes ago, johnnie.black said: btrfs balance start -dusage=75 /mnt/cache Thanks - setup weekly job. Is this in a FAQ somewhere as I haven't come across this before? 8 minutes ago, johnnie.black said: It doesn't cause loss of space, it can cause ENOSPC errors if the file system gets to be fully allocated. I run mover automatically at 80%, so I don't think my cache has ever been full luckily 9 minutes ago, johnnie.black said: If all is working well it's not really needed, but running say a monthly scrub can be good practice. Will do this. I''m guessing the code is: btrfs scrub start I've been doing this manually now and then (not balancing though!), so no errors but will do a job so can forget about this. Quote Link to comment
JorgeB Posted November 24, 2017 Share Posted November 24, 2017 2 minutes ago, DZMM said: Thanks - setup weekly job. Is this in a FAQ somewhere as I haven't come across this before? No, this is supposed to be fixed on kernel 4.14, if it's not I'll add a FAQ entry. 1 Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 Thanks - was I right with btrfs scrub start Quote Link to comment
JorgeB Posted November 24, 2017 Share Posted November 24, 2017 22 minutes ago, DZMM said: Thanks - was I right with btrfs scrub start btrfs scrub start /mnt/cache 1 Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 36 minutes ago, johnnie.black said: btrfs scrub start /mnt/cache thanks Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 ok balance over. Should I be concerned by: No balance found on '/mnt/cache' or is that ok? Quote Link to comment
JorgeB Posted November 24, 2017 Share Posted November 24, 2017 ok balance over. Should I be concerned by: No balance found on '/mnt/cache' or is that ok?That's normal, it just means that there's no balance running at the moment. Quote Link to comment
DZMM Posted November 24, 2017 Share Posted November 24, 2017 6 minutes ago, johnnie.black said: That's normal, it just means that there's no balance running at the moment. Thanks - the wording could be a bit better! Quote Link to comment
Lignumaqua Posted October 11, 2018 Share Posted October 11, 2018 On 11/13/2017 at 3:32 AM, johnnie.black said: It's a good idea to run a weekly balance, at least until we get to kernel 4.14, which is expected to fix this issue, it doesn't need to be a full balance, something like this: btrfs balance start -dusage=75 /mnt/cache Resurrecting an old thread because I'm interested as to whether this issue has gone away now we are on kernel 4.18.10? I just ran balance and it did return a lot of space to my cache drive. Could that have been lingering since before the kernel change? I've never run balance before, so perhaps it's built up over the last year or so. Just wondering if I need to add balance to my maintenance schedule with V6.6.1 and kernel 4.18.10? Quote Link to comment
JorgeB Posted October 11, 2018 Share Posted October 11, 2018 1 minute ago, Lignumaqua said: I just ran balance and it did return a lot of space to my cache drive. Could that have been lingering since before the kernel change? I've never run balance before, so perhaps it's built up over the last year or so. If you never ran one it's good to run it on the newer kernel, and anyone coming from an earlier kernel, IIRC <4.16 should run a balance, after that there's no need to run regular balance to avoid the out of space errors, though it won't hurt to run one once in a while as regular maintenance. 1 Quote Link to comment
Lignumaqua Posted October 11, 2018 Share Posted October 11, 2018 Thank you, that’s very helpful. Quote Link to comment
DZMM Posted October 11, 2018 Share Posted October 11, 2018 I just thought - I have 3 ssds in a 2nd 'pool' using ud. Should I be balancing these as well? Quote Link to comment
JorgeB Posted October 11, 2018 Share Posted October 11, 2018 3 hours ago, DZMM said: I just thought - I have 3 ssds in a 2nd 'pool' using ud. Should I be balancing these as well? Like mentioned above with newer kernels no need for regular balances. 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.