Move share to cache drive only


andsee

Recommended Posts

I'm trying to move a few shares used by dockers and VMs to the cache SSD drive as I've noticed the parity and disk 1 drives staying spun up.

While the shares were set to 'Use cache disk: Prefer' they appear to have most of the data on the main disks. So I've switched the shares to 'Use cache disk: Only', disabled docker and shut down VMs etc and run the mover.

 

But nothing moves, the data stays on the main disks.

 

What is the easiest way to move shares onto the cache drive?

Link to comment
20 minutes ago, andsee said:

While the shares were set to 'Use cache disk: Prefer' they appear to have most of the data on the main disks. So I've switched the shares to 'Use cache disk: Only', disabled docker and shut down VMs etc and run the mover.

You were close, but you should have left them to Prefer. Probably you never tried shutting down Docker and VM SERVICES before running mover, and mover couldn't move some files because they were open.

 

Go to Settings - Docker and disable the Docker Service, Same for the VM service.

 

Set the shares you want moved to cache to cache-prefer. Go to Main - Array Operations and Move Now. When mover completes you can easily check which disks each User Share is using by using the Compute functionality on the Shares page.

 

Then you can enable docker and VM services again.

 

Of course, if you wind up filling the cache drive then mover won't be able to move everything. You should set Minimum Free for cache in Global Share Settings to prevent filling up cache and possibly causing other problems. It should be set to larger than the largest file you expect. Same for Minimum Free for each User Share.

 

Mover never moves cache-no or cache-only shares. It move cache-yes from cache to array and cache-prefer from array to cache. Here is a more detailed explanation (from the FAQ) of the nuances of the cache settings:

 

https://forums.unraid.net/topic/46802-faq-for-unraid-v6/?page=2#comment-537383

 

  • Upvote 1
Link to comment
4 hours ago, andsee said:

Thanks so much @Constructor for your fast and accurate response! Switching them all to Prefer and running the mover has sorted the issue and now all but the cache spin down 🙂

Glad to hear it, but my username isn't Constructor any more than your username is Newbie.

  • Haha 1
Link to comment
  • 1 year later...
On 10/18/2018 at 10:16 AM, trurl said:

Mover never moves cache-no or cache-only shares. It move cache-yes from cache to array and cache-prefer from array to cache. 

Alright, this thread is old, but now that I read it, I'm starting to rethink how I'm using cache. 

 

Is it really like a one way direction? No, right?

  • Cache-yes will work like a buffer for everything being added to the drives? Like first it cache, than it sends to the array, and never the other way, from array to cache?
  • Cache-prefer will send data in both ways, right? From array to cache, from cache to array.

Also, I came here looking for another thing, I wanted to create a share to access my cache drive. Is it possible? And, to be honest, should I use cache? I think I'd rather just use the flash m.2 SATA as a disk and benefit its speeds on applications, like MySQL.

 

Basically, I have a media server that very rarely is used for some data processing, hence the MySQL installed.

 

So, most of the time it's running a Windows VM, a Linux VM and dockers for deluge, plex, sonarr and radarr. I don't need flash speed for that, except maybe for my downloads, my intern is 240 down/20 up.

 

I have 6x 3TB WD Red NAS and a M.2 256GB SATA drive. 16GB of RAM running on a 2600X soon to be replaced by a 2700X.

Link to comment
11 minutes ago, mizifih said:

 

  • Cache-prefer will send data in both ways, right? From array to cache, from cache to array.

Not quite. - it is still one-way.    Cache-prefer only ever moves files from array to cache.     It is just that if there is no space left on the cache when creating a new file Unraid will let it be written to the array instead.     If space later becomes free on the cache then mover will move the file from the array to the cache

Link to comment
6 hours ago, mizifih said:

should I use cache? I think I'd rather just use the flash m.2 SATA as a disk and benefit its speeds on applications

And how do you propose to do that? Making it cache is the simplest way to do that. Most of us use cache in just this way. There is no requirement to cache any of your other user shares, and they won't be cached if you don't specifically make them cache-yes.

 

Typically, you will have appdata, domains, and system share as cache-prefer or cache-only, so they will stay on cache for your dockers and VMs to get better performance, and so those won't cause array disks to spin.

 

If you don't want anything else to use cache, don't tell it to.

Link to comment
6 hours ago, itimpi said:

Not quite. - it is still one-way.    Cache-prefer only ever moves files from array to cache.     It is just that if there is no space left on the cache when creating a new file Unraid will let it be written to the array instead.     If space later becomes free on the cache then mover will move the file from the array to the cache

So it's like buffering stuff to the cache so things can work a little faster, if cache have space available?

 

33 minutes ago, trurl said:

And how do you propose to do that? Making it cache is the simplest way to do that. Most of us use cache in just this way. There is no requirement to cache any of your other user shares, and they won't be cached if you don't specifically make them cache-yes.

 

Typically, you will have appdata, domains, and system share as cache-prefer or cache-only, so they will stay on cache for your dockers and VMs to get better performance, and so those won't cause array disks to spin.

 

If you don't want anything else to use cache, don't tell it to.

Yes, I see your point. I just have to figure out some stuff first.

Like... I mistakenly created one big ass sharing for everything and tried to organize everything inside, so... Lesson learned. I need now to create as many shares as I need, for all the different (not that many) types of applications I'll run on my server. I think I kinda got the grip.

 

So I had plex, torrent, vms and all sorts of things, the cache was being consumed super fast, it was set to move hourly and I was still getting full cache warnings. Insane.

 

I've been away from unRaid for a while, I'm still remembering stuff. I used for a few years and it worked just fine before. Just catching up.

Edited by mizifih
context
Link to comment
1 hour ago, mizifih said:

So I had plex, torrent, vms and all sorts of things, the cache was being consumed super fast, it was set to move hourly and I was still getting full cache warnings. Insane.

Mover is really intended for idle time. There is simply no way to move from cache to the slower array as fast as you can write to cache. Doesn't matter how often you schedule mover, and if mover is trying to run at the same time as things are writing to your server, it is just going to be competing for those resources.

 

Our hardware is very fast these days, but our data is also very large, so things seem to take as long as they always did.

  • Thanks 1
Link to comment
  • 1 year later...

I used "prefer" for my "transmission" download shared folder, because I want to the active files (downloading/uploading) files stay in cache. But the result is some files never used were moved from array to cache, then stay there and no longer are moving out. Based on what rules the mover move files from array to cache with setting "prefer"?

Shoud I use "Yes" for my case - to store "hot" file in cache?

Link to comment
12 minutes ago, enjoywithme said:

I used "prefer" for my "transmission" download shared folder, because I want to the active files (downloading/uploading) files stay in cache. But the result is some files never used were moved from array to cache, then stay there and no longer are moving out. Based on what rules the mover move files from array to cache with setting "prefer"?

Shoud I use "Yes" for my case - to store "hot" file in cache?


The “prefer” setting means move files from array to cache as long as there is room on the cache.   The “yes” setting means new files are initially created on the cache and then later moved to the array (as long as they are not currently in use).

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.