asbath Posted April 12 Share Posted April 12 Hello, First time poster, kind of long-time lurker. Please be gentle My question is about setting up a SSD as a cache as merged use for my docker containers and for Plex. What I'd like to do is have the docker containers running off of the cache using the "Cache= Yes" option such that the mover does its scheduled thing, but I'd also like my Plex container to use the SSD cache for transcoding as well. Is it just a matter of setting up the SSD cache in the array, then pointing the applicable Shares to use the cache? If I only want the appdata share to use the cache (i.e. only the docker containers), then that's the only share I should modify, is that correct? If for Plex I want everything stored on the SSD (not the media itself, just the Plex container and all of its associated files such as metadata and transcoding), is that automatically done when I set the appdata share to use the cache? And if I don't specify the location for transcoding in the Plex container config, I assume it will automatically use the Plex appdata folder on the cache? Or should I just point Plex transcoding to the RAM instead? In case you need to know anything about the setup: 4 HDDs in the array 2x 14TB data 1x 18TB parity 1x 18TB hot spare 32GB RAM 1TB SSD Thanks! Quote Link to comment
JonathanM Posted April 13 Share Posted April 13 This video is rather old, but covers the basic principles. "Cache yes" terminology is not used anymore because it was confusing, it's been replaced by primary and secondary along with the direction mover should act. Quote Link to comment
asbath Posted April 15 Author Share Posted April 15 @JonathanM thank you for the link. I'd already watched that video, and read through a few threads/Reddit topics to get an idea. Hence why I was still using the old terminology of "Cache yes". I've installed the SSD already and gone through some trial and error, only to screw things up, but resolve the issue with a nuke and pave method. To install the SSD drive, I stopped the array, added the SSD a new Pool called "cache", and then started the array again. All was fine and dandy at this point. I then went to the "appdata" share to see that Unraid had automatically set the "appdata" share to use Primary = cache, Secondary = array. Perfect! However, I wanted to move everything from array to cache so that it would never use the array. This is where things when awry. I set the appdata share to Mover = Array=> Cache . Then I disabled the Docker service (Settings > Docker > Enable = no), then went to the Scheduler settings to manually invoke the mover. I thought this would move the files to the cache. It didn't. At this point I wasn't sure if it had failed, or this is not what the Mover was supposed to do. So I figured, easy enough, I'll just use cp to manually bring the files over from /mnt/user/appdata/* to /mnt/cache/appdata/*. That went swimmingly. Then I started up the Docker service again, and then the crap hit the fan. I got a "Docker service failed to start" error on teh Docker tab. To keep a long story short, almost nothing I did could remmedy the "Docker service failed to start" error. What did fix the issue was to revert everything back to the pre-SSD cache state. So I backpedaled until the SSD was reformatted and then re-added to a cache pool. Docker works, containers load, everything is running from the Array (no cache). Now I have the appdata configured to Primary = cache, Secondary = array. I'm leaving it as such, and I'm going to research more into how to move things to the cache. Right now the mover is doing nothing because the cache is barely 50GB full out of the 1TB limit. I am thinking that the mover may never need to be invoked because I doubt I'd ever go about say 500GB full on the cache drive because the container that uses the mose space is Plex, and even then I don't have a gigantic library so its metadata and databases should be relatively small (i.e. less than 200GB). So am I correct in thinking that just leaving the appdata share to "Primary = cache, Secondary = array" is the equivalent of having all docker containers running strictly off the SSD? I know that only new files and folders will be run off the SSD, but I assume that in the background Unraid is silently moving files over to the cache drive? Quote Link to comment
JonathanM Posted April 15 Share Posted April 15 39 minutes ago, asbath said: So I figured, easy enough, I'll just use cp to manually bring the files over from /mnt/user/appdata/* to /mnt/cache/appdata/*. That went swimmingly. Pretty sure that didn't work like you thought it did, because those locations are the same. /mnt/user paths are the combined view of all the root paths on the array disks and the pools combined. user share and disk share should never be mixed in a file operation. Quote Link to comment
asbath Posted April 15 Author Share Posted April 15 So that is probably where I went wrong, and things went very wrong after it. When I ran the cp command, it did in fact copy over the 50GB of files. But I guess like you said, and now that I've read up more on it, they are basically the same place, just controlled by the system. I'm also reading and understanding teh cache system better. Currently I have Primary storage = cache, Secondary storage = array, Mover = Cache > Array. This to me means that the system will fill up the cache drive until it's full, then start putting things in the array after teh cache is full; meanwhile, the Mover when invoked will move data from the cache to the array. What I think I will try next is leave the Primary and Secondary storage locations as is, but se tthe Mover to Array > Cache, and manually invoke the Mover. This I believe will tell the system I want to move everything in appdata from the array to the cache. After that, I should be able to set Secondary storage = None. Quote Link to comment
JonathanM Posted April 16 Share Posted April 16 14 hours ago, asbath said: This I believe will tell the system I want to move everything in appdata from the array to the cache. Everything will only be files not in use, so to get "everything" moved you need to stop the docker and vm services in settings. You will know when the services are stopped because the docker and vm tabs will be missing from the GUI. Quote Link to comment
asbath Posted April 25 Author Share Posted April 25 On 4/16/2024 at 7:21 AM, JonathanM said: Everything will only be files not in use, so to get "everything" moved you need to stop the docker and vm services in settings. You will know when the services are stopped because the docker and vm tabs will be missing from the GUI. I did this (stopped both docker and VM services) and then ran the Mover. It seemed to move everything over; well almost everything. There seems to be about 2GB remaining in the array (vs 160GB moved to the cache), so I will leave those files alone because I assume those will just be taken care of automatically by the system. It's not broke, so I'm not going to try to fix it! Thank you very much for the pointers. It was helpful Quote Link to comment
wkellogg Posted July 13 Share Posted July 13 Thanks for the suggestions here. I've been watching many videos and reading the Unraid manual in detail for the last 30+ days. My system has been working great as a storage device but I now want to expand to it's fullest potential. Updated the guts to an updated MB, CPU, & RAM. Looking to migrate some of my Windows & Linux machines to this virtual environment. Trying to properly place pools, 'cache', etc. but hitting bottlenecks. May start a different thread but this one seemed to touch on some of my issues. Any great pointers to architecture, design, functionality documentation would be mighty helpful. Chances are I've seem them but will watch again and again until it sinks in. Thank you. Quote Link to comment
Recommended Posts
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.