July 5, 20241 yr Hi @ll, I am pretty confused about the cache and share management for docker in unraid. At the beginning I had no cache device. I later added an SSD as cache to "improve performance". My docker path locations are: /mnt/user/system/docker/docker.img and /mnt/user/appdata/ My plugins and unraid are always telling me, my files are unprotected, but that doesn't go away when I use the mover. Fix-Common-Problems tells me: Default docker appdata location is not a cache only share. However when I looking for guides, or hints about array and cache management with docker, they either seem out of date, or complicated as hell... https://docs.unraid.net/unraid-os/manual/storage-management/ Quote Settings → Docker: disable Docker and click apply Click on Shares and change to "Yes" all User Shares with "Use cache disk:" set to "Only" or "Prefer" Where the hell do I see that option? I cant find it in 6.12.10 Or: Quote disable docker and VMs first in the settings, set both shares to PREFERED, run the mover so all existing data is moved to the cache. Check if the files are moved over to the cache and check if the shares don't exists on any array drive. I dont quite understand the concept for cache in unraid. People seem to move all data to the cache device. (I have an 11TB array and only an 500GB SSD cache). Why should I move my almost 400GB of Nextcloud files to an cache? That doesnt make sense to me. Use the mover to move it to cache and backup again to the array where it already was located? What is the most practical concept of managing large arrays with small cache pools and make use of both without making it to complicated? I seem to just have destroyed my docker environment by moving my docker.img from /mnt/user/system/docker to /mnt/cache/system/docker/docker.img when I enabled docker, all containers where gone... I am close to dumping my unraid setup and move to kubernetes or something else... edit: even this recommended guide seems a bit out of date, since there is no primary and secondary storage, but the prefer option: But it's still not self explainatory for me, because when you disable docker and check the path settings. The recommendation for both paths (docker.img and appdate) is at the cache, but he doesn't seem to change it. So what is the real best practice? Edited July 5, 20241 yr by W0nderW0lf
July 13, 20241 yr On 7/5/2024 at 3:33 PM, W0nderW0lf said: Where the hell do I see that option? I cant find it in 6.12.10 In one of the latest Unraid versions it changed slightly how shares are configured. Currently if you wanna use a cache drive combined with the array and move the data with mover to the array you have to define 2 options. In my case I have set the appdata share to be on the cache pool: I have set the primary storage as Cache and the secondary as Array and the Mover action "Array -> Cache" so if Mover starts it always will move files to the Cache pool. With this setup I see the same info as you because the files are not protected by the redundancy of the array if the cache pool only consists of 1 drive. If you have a mirrored pool with 2 or more drives the warning will go away. The reason why I have set it up this way is to be able to spin down the array disks. As an example if you use Nextcloud or Jellyfin/Plex you will always see some activity which will prevent the array disks to spin down. In my example if you switch the Mover action at the bottom of the share settings to "Cache -> Array" the unprotected files message will go away. In case of the drive failure for the single drive cache pool I have setup to backup the whole appdata folder each night. There are different ways to do this. "appdata backup" for example is a useful plugin for this. Most people have set it up this way that the appdata share housing all the docker configs and databases, sits on a fast ssd pool, single or multi drive, depends on the setup. In my case I use 20+ dockers and the size of the appdata share is 18GB. So it's not a big waste of space. On 7/5/2024 at 3:33 PM, W0nderW0lf said: Why should I move my almost 400GB of Nextcloud files to an cache? As I said, depends on your usecase, you don't have to. Nextcloud for example if only using the array will prevent disks in the array to spin down if you use it on your phone, upload pictures, sync calendar and contacts. So it's better to combine it with the cache option. In my setup all my data I upload to Nextcloud will be stored on the cache pool first and moved to the array at night. The setup for the Nextcloud share hosting all the user data looks like this: primary storage: Cache secondary: Array Mover: Cache -> Array On 7/5/2024 at 3:33 PM, W0nderW0lf said: What is the most practical concept of managing large arrays with small cache pools and make use of both without making it to complicated? Usually best practice is to have data you access on a daily basis on a fast cache pool. If it's a single ssd you need to backup the data to prevent data loss. If you have a mirrored cache pool with more than 2 drives you have an extra layer of redundancy, but keep in mind raid is no backup. Depending on your network speed in most cases putting data on the cache first and let the mover transfering it to the array at night is the way to go. In case you have large amounts of data coming in exceeding the size of the cache, put it directly on the array as primary storage without a second storage or the mover take action. On 7/5/2024 at 3:33 PM, W0nderW0lf said: I seem to just have destroyed my docker environment by moving my docker.img from /mnt/user/system/docker to /mnt/cache/system/docker/docker.img Not sure why you did that. In general the defaults are fine. docker.img in system share configs for the dockers in appdata share Short hint how docker and all the paths work in case you don't got it already. In most cases you basically have 3 paths where data is sitting. The application itself lets say Nextcloud is inside the docker.img file in the system share. In case you loss it, it's not big of a deal. You can easily recreate that file and reinstall all your dockers. The configurations for the dockers living in the appdata share. You should backup the appdata share regularly to don't loss any configurations in case of a drive failure. For both of these shares in most cases there is no need to change the defaults. The third path most of the containers use are where the userdata is in. Media files in Plex or uploads from your phone to Nextcloud for example. These paths are also shares in Unraid and can be configured as you like. Only on cache pools, on Array only or on Cache first and moved to the Array later. Depending on the amount of data coming in or used by these shares and depending on how large your pools are, you have to configure these shares. example for my Nextcloud path mappings: As you can see all the configurations from Nextcloud are mapped to the /mnt/user/appdata/nextcloud path and the user data are in the /mnt/user/nextcloud share. Don't blindly try to replicate these bindings. They differ depending on which Nextcloud docker you're using. Just as an example. On 7/5/2024 at 3:33 PM, W0nderW0lf said: The recommendation for both paths (docker.img and appdate) is at the cache, but he doesn't seem to change it. So what is the real best practice? go settings >> docker and disable the docker service make sure your deafult paths matching the defaults you see in the picture above in case you have manually moved your docker.img somewhere else, move it back to /mnt/user/system/docker/ check your system and appdata share settings, for appdata see my first picture, the system share should look like the following go to the main page of unraid and start the mover by pressing "move" and wait till it's finished. As long as it's moving filles, the button will be grayed out. optional: go to the shares page and click on compute for the system and the appdata share to check where data is siiting on. After mover is done go back to the docker settings and enable the service again
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.