Sam Wildig Posted March 27, 2018 Share Posted March 27, 2018 Hi, Sorry if this has already been answered somewhere but I'm still a little confused about cache: prefer. I've got my VM share set as prefer so that all the VM's are stored on the cache drives, is this data still protected on the main array as well? Looking at the array drives I can't see the data anywhere. If it's not is there anyway to have functionality similar to this? So the cache drives hold the data for fast transfer but in the case of cache failure it will fall back to reading the data from the main array? Thanks in advance, Sam Quote Link to comment
John_M Posted March 27, 2018 Share Posted March 27, 2018 Here's an explanation of the Use cache disk options (turn on Help to see it for yourself): Specify whether new files and directories written on the share can be written onto the Cache disk/pool if present. No prohibits new files and subdirectories from being written onto the Cache disk/pool. Yes indicates that all new files and subdirectories should be written to the Cache disk/pool, provided enough free space exists on the Cache disk/pool. If there is insufficient space on the Cache disk/pool, then new files and directories are created on the array. When the mover is invoked, files and subdirectories are transferred off the Cache disk/pool and onto the array. Only indicates that all new files and subdirectories must be writen to the Cache disk/pool. If there is insufficient free space on the Cache disk/pool, create operations will fail with out of space status. Prefer indicates that all new files and subdirectories should be written to the Cache disk/pool, provided enough free space exists on the Cache disk/pool. If there is insufficient space on the Cache disk/pool, then new files and directories are created on the array. When the mover is invoked, files and subdirectories are transferred off the array and onto Cache disk/pool. Quote Link to comment
John_M Posted March 27, 2018 Share Posted March 27, 2018 For some time only the first three options were available, Prefer being added more recently. IMO Prefer makes Only obsolete and I don't use the latter any more. Quote Link to comment
Sam Wildig Posted March 27, 2018 Author Share Posted March 27, 2018 Thanks for you reply, I'm currently using prefer. I looks like the data is being stored only on the cache drives with the overflow going to the array. I read in the FAQ. Quote Also, if the Cache drive fails, the same share folders on the data drives will still continue working. So shouldn't this mean the data will be stored on both the cache and on the data drives at all times? Quote Link to comment
trurl Posted March 27, 2018 Share Posted March 27, 2018 3 hours ago, Sam Wildig said: in the case of cache failure The way to get redundancy for cache is with a btrfs cache pool. See FAQ for unRAID V6 linked in my sig for more about cache pools. That same section also has a more detailed explanation of the "Use cache" options. If you can't see my sig, go to the upper right of this forum page, click on the dropdown next to your name and go to Account Settings and turn on View signatures. 18 minutes ago, John_M said: For some time only the first three options were available, Prefer being added more recently. IMO Prefer makes Only obsolete and I don't use the latter any more. Since cache-only doesn't move, but user shares always read from all disks, cache-only does have some differences from prefer that can be used to your advantage. See that same section of the FAQ I mentioned above. Quote Link to comment
trurl Posted March 27, 2018 Share Posted March 27, 2018 2 minutes ago, Sam Wildig said: So shouldn't this mean the data will be stored on both the cache and on the data drives at all times? I see you already found that FAQ while I was replying. Don't know where you get the idea that it is storing in both places though. User share settings control where unRAID writes new files. Some of those settings will also get files moved cache to array (yes) or array to cache (prefer) when mover is invoked either manually or on schedule. The files are not stored in both, just written once and then maybe moved later.. Quote Link to comment
Sam Wildig Posted March 27, 2018 Author Share Posted March 27, 2018 As I quoted in the last post, the FAQ (here) states the " the same share folders on the data drives will still continue working". This sounded like the data would be in both locations? I'm wanting to store my VM images on the cache but also for them to be protected against drive failure. Adding protection to the cache pool seems unnecessary with the protected array sitting behind it and doing so its going to double the number of drives dedicated to overhead. What would be the best way to mirror the VM images from the cache to the array? Or is there a better approach to all of this? Thanks again. Quote Link to comment
trurl Posted March 27, 2018 Share Posted March 27, 2018 3 minutes ago, Sam Wildig said: As I quoted in the last post, the FAQ (here) states the " the same share folders on the data drives will still continue working". This sounded like the data would be in both locations? User shares are just the top level folders on cache and array disks with the same name. While the folders may exist on multiple disks, the files in those folders won't. So, a share could have some files on one disk and other files on another disk, but since they are in the same user share folder, they will appear at the same "virtual" location when you access the user share. Allowing folders to distribute their files to multiple disks (spanning) is the main purpose of user shares. Quote Link to comment
John_M Posted March 27, 2018 Share Posted March 27, 2018 5 hours ago, Sam Wildig said: I'm wanting to store my VM images on the cache but also for them to be protected against drive failure. The best way to do that is to use a RAID 1 cache pool. A less good way is to backup your VM images periodically to the array. I say less good because the RAID 1 cache pool method provides continuous protection whereas the backup method does not and it also requires that you stop your VMs periodically while the backing up is in progress. You should have a good backup strategy anyway, for all your valued data. Quote Link to comment
blumpy Posted April 1, 2018 Share Posted April 1, 2018 When a User Share is set to preferred what criteria does Mover use to select the files it will move into the cache? In other words, if I have 10TB on the array but 500gb of ssd what files is Mover moving into the cache? Is it move the most recently read and written files? Is it doing it alphabetically? First level? until it's full? Quote Link to comment
trurl Posted April 1, 2018 Share Posted April 1, 2018 2 hours ago, blumpy said: until it's full? this^ It is just going to assume you want it all moved and there isn't any specific order as far as I know. 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.