Jump to content
joenitro

Swap cache drive for larger one. What about files on cache?

26 posts in this topic Last Reply

Recommended Posts

Hi all,

 

Finally got my unRaid server running how I'd like it on 6.3.0-rc3 apart from one issue.

I've just upgraded my main PC from a 250gig SSD to a 500gig one. This leave me free to put it into my unRaid server  ;)

 

I already have a 120gig SSD in there as cache drive containing, for some reason, some of my appdata files but not all, along with my "system" folder and my "domains" folder.

 

What's the best way for me to "swap out" the smaller one for the larger one?

 

Is there an easy way to just move everything across to the array, either temporarily or permanently? Or should I be doing it another safer way?

 

Any help appreciated!

Share this post


Link to post

There are some instructions for old versions of unRAID here: https://lime-technology.com/wiki/index.php/Replace_A_Cache_Drive

 

But since you're running a very new version, how about this:

 

1. Stop your dockers and VMs.

2. Disable docker and VMs in Settings, and switch off array auto-start.

3. Set the shares that are present on your cache disk to "Use cache disk: Yes".

4. Run the mover.

5. Check that the cache disk is now empty.

6. Stop the array and unassign the cache disk, then power down.

7. Replace the cache disk.

8. Power up and assign the new cache disk, then start the array.

9. Format the new cache disk.

10. Change the shares that you want on your cache disk to "Use cache disk: Prefer".

11. Run the mover.

12. Check that the cache disk is no longer empty.

13. Enable docker and VMs in Settings, and switch on array auto-start if preferred.

14. Start dockers and VMs.

 

Share this post


Link to post

There are some instructions for old versions of unRAID here: https://lime-technology.com/wiki/index.php/Replace_A_Cache_Drive

 

But since you're running a very new version, how about this:

 

1. Stop your dockers and VMs.

2. Disable docker and VMs in Settings, and switch off array auto-start.

3. Set the shares that are present on your cache disk to "Use cache disk: Yes".

4. Run the mover.

5. Check that the cache disk is now empty.

6. Stop the array and unassign the cache disk, then power down.

7. Replace the cache disk.

8. Power up and assign the new cache disk, then start the array.

9. Format the new cache disk.

10. Change the shares that you want on your cache disk to "Use cache disk: Prefer".

11. Run the mover.

12. Check that the cache disk is no longer empty.

13. Enable docker and VMs in Settings, and switch on array auto-start if preferred.

14. Start dockers and VMs.

 

Wow John_M thanks so much for your reply. This might give me the confidence I need to try this tomorrow!

 

Will confirm how I get on either way in the hope that it will help other users in the future.

Share this post


Link to post

The "Use cache disk: Prefer" option is only available in unRAID 6.2 and later. It makes the mover work in reverse, moving files from the array to the cache.

 

Share this post


Link to post

Well, thanks to John_M's little guide, I'm up and running successfully. The only issue I have now is this message:

 

Your existing Docker image file needs to be recreated due to an issue from an earlier beta of unRAID 6. Failure to do so may result in your docker image suffering corruption at a later time. Please do this NOW!

 

It's working fine as it is, but I'm going to recreate my Docker image file using http://lime-technology.com/forum/index.php?topic=38323.0 just to be on the safe side.

 

Many thanks to John_M  8) 8) 8)

 

Share this post


Link to post

You're welcome. Yes, it's best to rebuild the docker image before it becomes a problem. It's a simple task as all your settings are remembered.

Share this post


Link to post

You're welcome. Yes, it's best to rebuild the docker image before it becomes a problem. It's a simple task as all your settings are remembered.

 

Yep all done and working 100%!  :)

 

What a fantastic system unRAID and the docker system is!

 

Now for my next challenge, getting openvpn-as working :-[

Share this post


Link to post

Found this thread. Very Handy. Thanks John_M.

 

I'm up to step 10 right now. Was wondering if I need to change my appdata share settings back to "Cache Only" after the Mover finishes?

Share this post


Link to post

Im in the same boat as you wgstarks how did you get on?

I went ahead and changed appdata share back to "Use cache disk: Only" as part of step 13 after the mover had finished restoring the appdata files. Figured that would be the safe thing to do, especially after FCP started sending me warnings about the setting. Also had to re-install all my dockers. Not much of a problem. Just find them in the Apps tab under Previous Apps. All the settings are already configured.

Share this post


Link to post

Just as a future reference, mover is painfully slow at doing this with regards to appdata shares, simply because mover checks every single file to see if its in use (and skips it if its not).

 

In my case, with a Plex appdata that has ~200,000 files in it, mover takes about 5 hours to move the files, whereas CA's appdata backup and restore will do the same thing in about 1 hour (Appdata backup / restore stops the docker apps in advance and then assumes (correctly) that the files aren't in use)

 

Net result is the same however...

 

Share this post


Link to post

So backup appdata, switch out the drives and then restore appdata?

How I did it.  Still have to move everything else off via mover however.  And the upshot is that you still have the contents on the original drive if you happen to have a catastrophic failure on the array in the process.

 

 

Share this post


Link to post

At least until it dies of bit rot, which it may do faster when it has the power removed for an extended period.

Share this post


Link to post

There are some instructions for old versions of unRAID here: https://lime-technology.com/wiki/index.php/Replace_A_Cache_Drive

 

But since you're running a very new version, how about this:

 

1. Stop your dockers and VMs.

2. Disable docker and VMs in Settings, and switch off array auto-start.

3. Set the shares that are present on your cache disk to "Use cache disk: Yes".

4. Run the mover.

5. Check that the cache disk is now empty.

6. Stop the array and unassign the cache disk, then power down.

7. Replace the cache disk.

8. Power up and assign the new cache disk, then start the array.

9. Format the new cache disk.

10. Change the shares that you want on your cache disk to "Use cache disk: Prefer".

11. Run the mover.

12. Check that the cache disk is no longer empty.

13. Enable docker and VMs in Settings, and switch on array auto-start if preferred.

14. Start dockers and VMs.

 

I took your excellent work above, merged it with the old wiki procedure and johnnie.black's version, and added it to the wiki, as a 6.2 section.

 

  Replace A Cache Drive

 

I'd really appreciate it if all those who wrote up or performed the procedure could carefully review the wiki page.  I'm very sure it can be improved!  I wrote it up before seeing Squid's comments, or wgstark's comments about re-installing Dockers, so I know more notes need to be added.

Share this post


Link to post

I took your excellent work above, merged it with the old wiki procedure and johnnie.black's version, and added it to the wiki, as a 6.2 section.

 

  Replace A Cache Drive

 

I'd really appreciate it if all those who wrote up or performed the procedure could carefully review the wiki page.  I'm very sure it can be improved!  I wrote it up before seeing Squid's comments, or wgstark's comments about re-installing Dockers, so I know more notes need to be added.

 

I'll let Squid comment on using CA Backup to do this. I do imagine that's a little simpler than this procedure, but I had already completed my swap when he posted.

 

Step 7: It's not always necessary to power down. If your hardware supports hotswapping you can just stop the array and add/exchange disks.

 

Step 11: I had a bit of confusion with this instruction and very nearly set all shares that I wanted to use the cache to "Prefer". Perhaps add a note that this only applies to share that were previously "Cache Only".

Share this post


Link to post

I'll let Squid comment on using CA Backup to do this. I do imagine that's a little simpler than this procedure, but I had already completed my swap when he posted.

 

I wrote the instructions on the basis that they use only functions already built into unRAID. They are easy for a beginner to follow and nothing needs to be downloaded or installed. I've tested the procedure and it does work but it isn't necessarily the fastest method. There are several ways to achieve a goal and they all have pros and cons.

 

Step 7: It's not always necessary to power down. If your hardware supports hotswapping you can just stop the array and add/exchange disks.

 

The OP wanted to physically replace his cache disk. It's safer to power down and I'm still not convinced that unRAID completely supports hot-swapping. Some people have reported success, others failure. So my general advice would be to power down. If advanced users find they don't need this step then so much the better but there's nothing to be gained by confusing beginners.

 

Share this post


Link to post

I finally got around to this, and updated the Replace A Cache Drive page, with the suggestions and Squid's method (removed).

 

I decided against mentioning hot-swap. I added the Appdata method as a variation of the Mover method, but since I don't have Appdata, I don't have the plugin and can't test the instructions.  Hopefully someone will, and let me know of any improvements needed. (removed)

Share this post


Link to post

What if you want to swap out 2 old small ssd's with 1 new larger one?

 

I'm swapping out 2x100GB now, and settled for 1x250GB.

 

Can I just do the folloing:

1. power down

2. disconnect old drive nr.1

3. insert new drive

3. power up

4. set up new disk as cache only

5. power down

6. disconnect old disk nr.2

7. power up

8. done?

 

 

Share this post


Link to post

...

4. set up new disk as cache only

...

johnnie.black already gave you the link but I thought I would comment on this one part of your idea. User shares can be cache-only, but a cache-only disk is not possible and doesn't even make any sense.

Share this post


Link to post

Thanks!

 

...And of course.

I ment set it up as a cache disk.

 

It's not much data at the moment. Just a small VM and some docker/Appdata files.

 

My main VM is going back on cache (ssd) when the new disk is up.

Share this post


Link to post

Just to follow up, I first did the procedure for removing a cache pool disk.

Disconnected that disk and inserted the new larger disk.

Then did the replace cache disk procedure, and disconnected the last of the old cachepool discs.

 

Works like a charm.

Share this post


Link to post

I've tried to follow this, and my new cache drive is up and working. Although I've set all of my shares to use cache "yes" except for appdata, and I've hit the mover and it isn't moving that folder back to the cache drive. The appdata share is set to use cache only. And ideas other than just a giant copy? Can someone tell me what the preferred settings for each of my shares should be? I do have VMs and Dockers on here. I just am not quite sure why saying cache disk only on appdata would not move that share to /mnt/cache/appdata

 

Thanks in advance

Capture.JPG

Edited by mikedpitt420

Share this post


Link to post
I've tried to follow this, and my new cache drive is up and working. Although I've set all of my shares to use cache "yes" except for appdata, and I've hit the mover and it isn't moving that folder back to the cache drive. The appdata share is set to use cache only. And ideas other than just a giant copy?
Set use cache to be prefer then run mover with all your apps stopped

Sent from my SM-T560NU using Tapatalk

Share this post


Link to post

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.