Getting Out of Space errors with Cache:Yes?!


Recommended Posts

Hello,

 

I have just built my first Unraid server. After running without cache for a few days, I quickly added a cache drive (500GB SSD) and set the Cache option to "Yes" on the shares I was using.

 

Since this is a new server I still had a couple of TBs of data to push onto it, so naturally I filled up the cache pretty quick. At that point I started getting out of disk space errors and could not copy anything else to the share, until I manually launched the mover script to clean up the cache and move its content to the array. Is this what is supposed to happen? Because that is not what the help text says. I would have expected all future writes to occur directly to the array, and only get out-of-space errors if the array itself was full.

 

If it makes any difference, I am running Unraid 6.9.0-rc2 and was using rsync -aP on the Unraid server itself. I was also targeting /mnt/user and not /mnt/cache directly.

 

I hope this is something I missed during Unraid setup, it seemed fairly self-explanatory but perhaps I am misunderstanding how the cache works in Unraid.

Link to comment

Best to not cache more than cache can hold. Running mover while still writing to the server won't help. It is impossible to move from faster cache to slower array as fast as you can write to cache. I usually recommend not caching anything until the initial data load is done since it won't really make things any faster if you fill up cache and have to move to the array anyway. And overfilling cache might even cause other problems.

10 minutes ago, Fulgurator said:

expected all future writes to occur directly to the array

Before files can overflow to the array, Unraid has to decide that it needs to choose another disk. It has no way to know in advance how large a file will become when it chooses a disk for it. Each User Share has a Minimum Free setting. If a disk has less than Minimum Free, Unraid will choose another disk. There is also a Minimum Free setting for Cache in Global Share Settings.

 

If a disk has more than Minimum Free, Unraid can choose it, and if the file won't fit the write will fail. You should set Minimum Free to larger than the largest file you expect to write.

 

  • Like 1
Link to comment

So I guess my mistake then was not setting a minimum free space on the cache, large enough to hold a "typical" file. Now that I think of it, it makes sense that Unraid cannot do anything about "growing" files. Thanks for explaining it to me.

 

I understand the cache was not super useful for the initial seeding of data, but the default behavior was somewhat surprising. Perhaps this setup (a cache with a minimum free space of zero) should be flagged by the "Common Problems" plugin, because that default config will never behave correctly if the cache is full mid-transfer.

Link to comment

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.

Guest
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.