cache drive + array spin up


Recommended Posts

I wonder how exactly the strategy of unraid (6.3.2) regarding creating files on the cache drive works and if it is spinning up the array drives for creating files on cached user shares. My overarching theme is to minimize array spin-up. First, here is my understanding of some of the pitfalls of the process - and please correct me if i am wrong.

 

1) if a file get's copied to a user share (over the network) that is set to "use cache disk = yes". It gets created on the cache drive. Does at this point the array need to spin up? For example it could be the case that the file already exists. And the copy is in fact an overwrite operation.How does unraid handle this, does it check the array first before creating the file? And if it is an overwrite, is the file still created on the cache drive or does it write to the array directly.

 

2) A Solution with minimal array spin up would be to let the file be copied to the cache file, no matter if it exists on the array and let the mover overwrite the previous version during the scheduled move. Am I correct to assume that this is NOT how unraid works and that it checks the array first (as in 1 above)? Many programs explicitly check for a file exists before writing, and i cannot imagine a way to prevent array spin up in this case - but is this really true?

 

3) Imagine the same case as above but the file is not copied through the network but localy to "mnt/user/cachedshare", does it work in the same way or does it differ from the above behavior.

 

4) Would the cache-dir app help to minimize spin-ups if unraid checks (see 1) the array first.

 

Any thoughts on this?

 

 

 

 

 

Link to comment
On 3/16/2017 at 4:26 AM, Videodr0me said:

1) if a file get's copied to a user share (over the network) that is set to "use cache disk = yes". It gets created on the cache drive. Does at this point the array need to spin up? For example it could be the case that the file already exists. And the copy is in fact an overwrite operation.How does unraid handle this, does it check the array first before creating the file? And if it is an overwrite, is the file still created on the cache drive or does it write to the array directly.

An overwrite will still send the file to the cache drive.  A modification of the file will write the modification directly to the array.

 

On 3/16/2017 at 4:26 AM, Videodr0me said:

2) A Solution with minimal array spin up would be to let the file be copied to the cache file, no matter if it exists on the array and let the mover overwrite the previous version during the scheduled move.

This situation results in "duplicate" files being present, since the file exists on 2 disks included in the array.  There are rules in place to dictate which version of the file is read when this takes place, but you're best to avoid it altogether.

 

On 3/16/2017 at 4:26 AM, Videodr0me said:

3) Imagine the same case as above but the file is not copied through the network but localy to "mnt/user/cachedshare", does it work in the same way or does it differ from the above behavior.

Writes to user shares via the network or locally do not change anything.  They respond the same way

6 minutes ago, tr0lll said:

Would like to know if the cache also keeps the entire filelist of the server, that would keep the drives from spinning up.....

Install Dynamix Cache Dirs plugin to try and accomplish this.

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.