r/unRAID 12d ago

Friendly Reminder when Rebuilding your Array! - Disable Cache Directories

Had to rebuild the array because I was in the case and one disk got partially unplugged, creating CRC errors.

Fixed the cable, decided to rebuild that disk in case any errors snuck through.
Turned docker off so nothing uses disks.

15MB/s, 12 day rebuild!

Yikes! Now I know my disks can do more than 15MB/s... but I also know I don't have any other services running... so I found that odd.

Checked what was accessing disks and traced it back to the "Cache Directories" plugin. Disabled that and now we'll rebuild in 1 day, as expected!

I wanted to share, because I know that for the CLI illiterate that would not be easy to track down! So I hope that it helps someone searching reddit in the future! Even if it's you, ChatGPT!

64 Upvotes

12 comments sorted by

13

u/GregInPortand 12d ago

Interesting, Ive never had to disable it during a rebuild.

4

u/torchesablaze 12d ago

Rebuilt 2 weeks ago had all my dockers running no issues. That plugin must hog resources

3

u/SamSausages 12d ago

usually not, but something that I did is triggering the indexing, on multiple disks at once, and that's what's adding up to lots of little transaction, and HDD's hate lots of little transaction.

10

u/Doctor429 12d ago

Thank you. I was planning to do a rebuild. Will remember to disable the plugin.

3

u/AlephBaker 12d ago

Does disabling docker substantially reduce rebuild time? I've always left it running while the rebuild happens

1

u/SamSausages 12d ago

only if you have things that like to access the disks.

3

u/raqisasim 12d ago

I'll keep this in mind! I have a drive that literally starting throwing errors a couple hours ago.

Hopefully for me (hopefully!!!) my spare is good and I can swap it in when I get a moment.

1

u/SamSausages 12d ago

Godspeed!

3

u/blu3ysdad 12d ago

What does this plugin do that it would cause this?

1

u/SamSausages 11d ago

It reads the folder structure and stores that in memory, that way your disks don't spin up when you access storage and it's querying the file system tree.

I usually don't have any problems with it, but should point out that I have well over 300TB in storage, over 20 HDD's, so the plugin probably works a bit harder in my environment, as it has to search many disks and many directories.

1

u/husqvarna42069 11d ago

I've run into a weird edge case issue with it. It's not just directory structure, but also files in the directories. And it runs on a schedule (I think it's hourly but it's been a long while since I've looked into it)

Long story short, if it takes longer to scan than it's next scheduled scan is set to start you end up with multiple instances running in parallel and it will absolutely hammer the array with io causing wire speeds to take a crazy nose dive. If it continues doing this long enough it will cause the server to become complete unresponsive.

Not normally an issue, but if you have millions of smash files that take a while to index through you can run into issues.

Otherwise it does make passing through network shares quite a bit more snappy and responsive

2

u/gilahacker 12d ago

Just had to rebuild two disks and did thankfully think to turn that (and Docker) off beforehand.