[Solved] Question about Cache and insufficient space error


Recommended Posts

Hello,

 

I am running unRaid 6.6 with a Pro license. 

 

I have been getting 'Insufficient space' errors when trying to copy  files to one of my shares.  The share was set up to split any directory but had the 'cache' setting to 'Prefer'. Once I changed the 'cache' setting to 'Yes' the issue went away.

 

I am a bit confused by this.  I would have expected that when the cache was set to 'prefer', new files would automatically be copied over to the array without  giving me an error.

 

Am I doing something wrong or have I misunderstood how this works?

 

tower-diagnostics-20190408-1106.zip

Edited by Atreya
Issue clarified
Link to comment

It depends on what the Minimum Free Space setting is under Settings->Global Share Settings is set to.   Only when the free space on the cache falls below this value will the system start writing files to the array.   If Unraid starts copying a file to the cache because the free space is above the minimum specified you will subsequently get an error if it does not fit.  This is why it is recommended the the Minim Free Space value is set to be more than the largest file you are going to transfer

 

however are you sure you want the Prefer setting?    With that set the mover program will try and move file from array to cache which might easily lead to it filling up.    Setting it to Yes means that mover transfers files from cache to array (thus freeing up cache space).   Turning on the Help gives gives a more detailed description of how these settings work.

Link to comment
7 minutes ago, johnnie.black said:

Yes, see below for more info (or turn the GUI help on)

 

https://forums.unraid.net/topic/46802-faq-for-unraid-v6/?do=findComment&comment=537383

 

I read the post that you linked to, and it is consistent with my understanding.  In the original case when 'cache' was set to 'Prefer' the 'overflow' files should have been copied to the array.  Instead I got an 'Insufficient space' error.

 

Perhaps the issue is not with the 'cache usage' setting but with the 'cache minimum free space' setting? 

Link to comment
10 minutes ago, itimpi said:

It depends on what the Minimum Free Space setting is under Settings->Global Share Settings is set to.   Only when the free space on the cache falls below this value will the system start writing files to the array.   If Unraid starts copying a file to the cache because the free space is above the minimum specified you will subsequently get an error if it does not fit.  This is why it is recommended the the Minim Free Space value is set to be more than the largest file you are going to transfer

  

however are you sure you want the Prefer setting?    With that set the mover program will try and move file from array to cache which might easily lead to it filling up.    Setting it to Yes means that mover transfers files from cache to array (thus freeing up cache space).   Turning on the Help gives gives a more detailed description of how these settings work.

This explanation seems to fit with my observation.  I did not select the 'Prefer' setting, it was the default for some reason. When I set it to 'Yes'  AND ran the  'Mover' I was able to resolve the issue.

Link to comment

Strange - the only time I have seen Prefer as the default is for the system level shares such as ‘domains’, ‘system’ and ‘isos’,  not normal User Shares.  You normally WANT the files associated with the system level shares to end up on the cache for performance reasons which is why they default to Prefer.

Link to comment

Thanks everyone.  It seems that the issue was that new files were failing  to be written to the Cache  disk because there was insufficient free space on the Cache disk.  However, because the free-space on the Cache  disk was greater than the 'Minimum  free  space' setting, new files were not getting sent to the Data disk.

 

This does strike me as an area for enhancement.   It is normal to expect that  if  there is insufficient free-space on the Cache, the file should just be written to the  Data disk.

Link to comment
1 hour ago, Atreya said:

This does strike me as an area for enhancement.   It is normal to expect that  if  there is insufficient free-space on the Cache, the file should just be written to the  Data disk.

This sounds like a good idea but the implementation issues are very much non-trivial.   The problem is that at the time a file is initially created Unraid has no idea how big it would be.    Logic to let a file be partially copied; run out of space; and then somehow to be transparently redirected to another drive (all without losing any data) is very difficult.   Do not forget that one of the design principles that is fundamental to Unraid is that each disk is a self-contained file system and that as a result files cannot be split across drives.

Edited by itimpi
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.