Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[7.0.1] Asking for help understanding cache and shares

Featured Replies

I'm trying to set up cache properly, but I'm having issues understanding it fully.  The documentation I find are all for 6.x.x and apparently those settings have changed for 7.x.x.

 

I have a share, "media", that I want cached.  The data is currently stored on a Synology NAS that's a workhorse, but expensive to expand.  It's also fast since it's RAID.  I have dozens of terabytes of data that I'll be copying, so I figured cache would work best. for the initial transfers.  Plus, it's a good time to learn about unRAID's cache.

 

So old shares used to say "use cache" with a boolean toggle.  That setting no longer exists in the Share Settings.  The only thing I see now are "Primary" and "Secondary" storage.  So I set it to Cache as primary storage, Array as secondary.  But when I did, I noticed it did not create the share directory in /mnt/cache and I had to do so manually.  No biggie, create it myself and fix perms/ownership.  If I copy data directly to /mnt/cache/media/filename.mp4, then it gets copied over to /mnt/user/media when I trigger the Mover.  But it's about a 50% chance that it will delete it from the cache pool after.  I'm expecting the cache to be a temporary storage for however long it takes the mover to get the data over to the array.

 

So what am I missing?  Do I have a misunderstanding on how unRAID's cache works or is there a setting elsewhere that I don't know about that would enable functionality as I imagine it?

Solved by JorgeB

  • Community Expert
1 hour ago, UtahJarhead said:

But it's about a 50% chance that it will delete it from the cache pool after. 

Not sure what you mean by this, any data on the pool for that share will be moved from there when the mover runs.

  • Author
1 hour ago, JorgeB said:

Not sure what you mean by this, any data on the pool for that share will be moved from there when the mover runs.

Except about 50% of them weren't moved.  They were copied with the cache copies left on the cache drive.  Hence my confusion.  syslog was showing that the move was finished.

 

I'm reading through your posted link above right now.  It's already cleared up some confusion, let's see what else it has in store for me.

  • Community Expert

Enable the mover logging, and if it happens again, post the diagnostics.

  • Author
26 minutes ago, JorgeB said:

Enable the mover logging, and if it happens again, post the diagnostics.

For sure!  I'll get back to you on that.

  • Author
32 minutes ago, JorgeB said:

Enable the mover logging, and if it happens again, post the diagnostics.

OK, that makes sense.  Looks like the files that do not move are all files that already exist.  If it exists in the Array and the cache, the mover will just ignore it entirely, it seems.  Good to know.

I assume it will handle it properly when being written to /mnt/user and not /mnt/cache.  I think I need to stop trying to be "smart" and just use the system as it's intended.  Leave /mnt/cache alone and write it directly to /mnt/user.

  • Community Expert

/mnt/user consists of all disks in the array and the cache pools unless you've enabled exclusive shares. /mnt/user is a merged volume.

 

If you place a file directly in /mnt/cache/media, you should be able to view it under /mnt/user/media. Same thing if you write a file to /mnt/user/media, it should also appear under /mnt/cache/media IF you have the primary storage set to your cache pool.

 

NEVER move/copy files to/from /mnt/user to /mnt/disk or /mnt/cache you can end up with overwriting a file or duplicates

 

Quote

I assume it will handle it properly when being written to /mnt/user and not /mnt/cache.

 Unraid does not care through which path the data was written to the cache, all that matters is how the share has it's mover action configured.

 

Writing data to either /mnt/user or /mnt/cache will result in the data being put on the cache pool to be later moved by mover to the array if that's what you have and it sounds like you do.

 

Somehow you ended up with duplicate files on both your array disks and the cache which results in mover not running because it doesn't move duplicate files.

 

 

Honestly, with dozens of TB of data, you're better off bypassing the cache pool altogether and just write the data directly to the array. I would suggest enabling "Reconstruct Write" (Settings > Disks image.png.34580fee716703a67995c27e3c4f9ae4.png) as this will greatly speed up data ingestion. Then when you're done, switch it back to Auto.

Edited by MowMdown

  • Author

MowMdown, yeah that jibes with what I was seeing.  I appreciate that.  They should add the text from the mover script and make it part of the documentation.  VERY clear cut.

 

image.thumb.png.8e0c7bf3bb0850f43292791f7014d657.png

 

Edited by UtahJarhead

  • Community Expert
6 hours ago, UtahJarhead said:

The documentation I find are all for 6.x.x and apparently those settings have changed for 7.x.x.

You should find the online documentation accessible via the ‘Manual’ link at the bottom of the GUI or the DOCS link at the top of each forum page is the most up-to-date.   The Unraid OS->Manual section in particular covers most features of the current Unraid release.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.