(SOLVED) - One question about upgrading cache drive


JP

Recommended Posts

I found this youtube video that I thought was pretty good about how to upgrade your cache drive.  However, the one thing I don't understand is why you have to invoke MOVER to move your data from the cache drive to the array and then back again.  I don't typically have MOVER enabled.  Wouldn't it be just as easy to manually copy and paste or move the data yourself to the array and then back again?  Is MOVER doing anything special that requires you to leverage MOVER to transfer your data and back again versus you manually doing so?  In my case I only have my docker.img and an apps folder in the root of my cache drive.  It seems simple enough to just move those two things and then copy them back on my own.  Confused.

 

 

 

Edited by JP
SOLVED
Link to comment
56 minutes ago, JP said:

I found this youtube video that I thought was pretty good about how to upgrade your cache drive.  However, the one thing I don't understand is why you have to invoke MOVER to move your data from the cache drive to the array and then back again.  I don't typically have MOVER enabled.  Wouldn't it be just as easy to manually copy and paste or move the data yourself to the array and then back again?  Is MOVER doing anything special that requires you to leverage MOVER to transfer your data and back again versus you manually doing so?  In my case I only have my docker.img and an apps folder in the root of my cache drive.  It seems simple enough to just move those two things and then copy them back on my own.  Confused.

The reason to recommend using the Mover is that it is fail-safe.

Users may not have sufficient understanding of how Unraid share, array and cache work and thus make mistakes that can potentially cause data loss.

 

If you know what you are doing, you can copy / move data manually.

Personally I have always done it manually but then I am pretty OCD when it comes to backup so I can afford to make mistakes.

  • Like 1
Link to comment
4 hours ago, testdasi said:

The reason to recommend using the Mover is that it is fail-safe.

Users may not have sufficient understanding of how Unraid share, array and cache work and thus make mistakes that can potentially cause data loss.

 

Thanks.  Sadly, I'm probably definitely in the category of "not have sufficient understanding of how Unraid share, array and cache work."  And now I'm more confused than ever because as I look at my setup I don't see how MOVER could help move this data at all.  My setup is very simple, a few dockers, no VM, and no MOVER.  Let me explain.

 

Below is a list of my shares:

image.thumb.png.73a0620f8a92c35df3d7938b8543ab44.png

 

 

The data on my cache drive looks like this:

image.png.9278926da090ec5f7c0991df40956be6.png

 

 

The "For Picture Frame" folder can be disregarded.  The appdata share now has me completely confused because when I look at what data that corresponds to from the unraid menu it appears to be nothing but an older folder for an application that has since been deleted.  I originally thought the appdata share might correspond to the apps folder on the cache drive, but that doesn't appear to be the case.  Ultimately, I know I'm supposed to change any of the user shares I have on the cache to YES for USE CACHE, but from what I'm seeing is the appdata share doesn't corresponded to the data in the apps folder so it wouldn't even be moved.  Additionally, my docker.img file is sitting on the root of the cache drive as well so I guess that wouldn't get moved either.  Does this make sense?

 

So I'm starting to think the only option for me is to *not* use MOVER and instead move everything to the array manually and then back to the new cache drive.  I don't want to screw this up, but to me that seems like the more logical option.  Is it?

Link to comment
6 hours ago, JP said:

In my case I only have my docker.img and an apps folder in the root of my cache drive.  It seems simple enough to just move those two things and then copy them back on my own.  Confused

The Mover is typically used to move data from shares for which you have write caching enabled from the the cache disk to the array during non-busy times on the array.  Typically, this would be in the middle of the night and you want it to do so unattended.  Sure, you could do it manually at any time if you know what you are doing and what data on the cache drive is cached share writes and what data belongs "permanently" on the cache drive.

 

There is really no point in caching share writes unless your cache disk is an SSD and you frequently write large amounts of data to the array.

 

From your prior posts, it appears your appdata share is on the array and not on the cache drive/pool.  Is there a reason for that?  Is your cache drive/pool an SSD?

 

In some cases, Mover can also be used in the cache drive replacement process or in moving certain shares (such as appdata, domains, etc.) from the array to the cache drive or vice versa.

Edited by Hoopster
Link to comment
1 hour ago, Hoopster said:

From your prior posts, it appears your appdata share is on the array and not on the cache drive/pool.  Is there a reason for that?  Is your cache drive/pool an SSD?

I think I installed a docker some time ago and it (or I) inadvertently had the docker create the share on the array.  Regardless, I just deleted it since I was pretty confident it was serving no purpose.  Now my user shares look like this:

 

image.thumb.png.04595ce366437ce100dfbdeabad6db9e.png  

 

Note that none of the shares are on the cache so I don't see how I could follow the instructions found here:  https://wiki.unraid.net/Replace_A_Cache_Drive

 

Specifically, I don't see that steps 3 and 4 apply to me.  Since I don't have any user shares on the cache drive then I am forced to move the apps folder containing my docker files and the docker.img file manually and then move it all back to the cache drive once the new drive has been installed and formatted.  Basically, invoking MOVER based on those instructions wouldn't do anything.  Does this sound right?

Link to comment
3 hours ago, johnnie.black said:

If you current cache if btrfs (and it was on the last diags you posted) and you can connect the new device while keeping the old one connected you can do an online replacement, see here, but see the notes, especially the bold parts.

 

 

 

 

I appreciate it Johnnie, but I’m still surprised and how complicated this seems to have gotten when it seems to me this is pretty simple. Here is what I thought I might do:

 

1.  Shut down all dockers

2.  Disable docker

3.  I don’t have VM, MOVER, or any shares on the cache drive so nothing to do there.

4.  Copy the two folders I have and the doccker.img file from the cache (everything) safely somewhere to the array.

5.  Once complete, shut down the server, remove my current cache drive and replace it with the new one.

6.  Turn on the server, assign the new cache drive and check off the box to format it.

7.  Once complete, move the two folders and docker.img file from the array to the new cache drive.

8.  Enable docker. 
9.  Turn all dockers back on. 


Wouldn’t this work perfectly?  I can’t figure out why it shouldn’t be as simple as this?
 

Link to comment
13 hours ago, johnnie.black said:

It will work, depending on how you copy it you might need to be re-created, but that's easy to do, in fact probably best to just do that instead of copying it, only copy the other folders.

Thanks for this.  The light bulb went off a little bit because now I see where MOVER might help if it is able to easily move the docker.img file to the array and back for you.  

 

And I mostly understand what they are saying to recreate the docker.img file.  I guess it sort of goes like this:

 

1.  Disable Docker

2.  Switch to the Advanced View and check off the box to Delete Docker.img and delete it.

3.  Power down server and replace cache drive with new one.

4.  Power up server, assign new cache drive, and format it.

5.  Enable docker, which should recreate the docker.img file in the same location if I didn't change the path....correct?

6.  Then it says in Squid's directions, to re-add the templates.  Are the templates the Docker Containers themselves with all my port mappings and volume mappings?  Will all those still be there and I simply need to enable the docker containers as I normally would to have them run?  This is the part that sort of concerns me because I wouldn't want to have to re-create all this from scratch again.   

Link to comment
3 minutes ago, JP said:

Then it says in Squid's directions, to re-add the templates.  Are the templates the Docker Containers themselves with all my port mappings and volume mappings?  Will all those still be there and I simply need to enable the docker containers as I normally would to have them run?  This is the part that sort of concerns me because I wouldn't want to have to re-create all this from scratch again.   

Just use the Previous Apps feature on the Apps page and it will reinstall your dockers with all the settings they had before.

Link to comment
18 hours ago, trurl said:

Just use the Previous Apps feature on the Apps page and it will reinstall your dockers with all the settings they had before.

 

Thanks for the help.  Sadly, I would have screwed this up had not thought to ask all these questions.  If there is one thing I've learned before upgrading items like this is to be sure you know exactly what you are doing, before you do it.  I've made some small assumptions in the past and they've bitten me.

 

So with this in mind, I think I understand exactly what I need to do now to upgrade my cache drive and return everything to the same state it is now.  Please let me know if anything here seems out of place:

 

1.  Shut down all dockers
2.  Disable docker

3.  Click on the Advanced slider, select the option to delete docker.img and delete docker.img.
3.  I don’t have VM, MOVER, or any shares on the cache drive so nothing to do there.
4.  Copy the two folders I have from the cache (basically everything on the cache) somewhere to the array via Midnight Commander.

5.  Once complete, shut down the server, remove my current cache drive and replace it with the new one.
6.  Turn on the server, assign the new cache drive and check off the box to format it.  Start the array.
7.  Once the format is complete, move the two folders I saved on the array to the new cache drive.  

8.  Re-enable docker and have docker.img rebuilt in the same location with the same settings and size (they should have been saved...correct?).  I should just have to click APPLY and DONE.

9.  Go to PREVIOUS APPS under APPS and install all the same docker apps you had before.  Little work should be done here since all the previous settings are saved here as well.

10.  Start all the same dockers again that I was using before.

 

These steps should return me to the exact same state I had before, only now my cache drive is upgraded to something much bigger (120 GB --> 500 GB).  Does this sound accurate?  

Edited by JP
Typo
Link to comment
  • 1 year later...

I finally got around to doing this and so far everything seems to have gone ok.  I'm at step 6. in my list where I need to format the newly installed cache drive.  However, there was no check box available for me to format it.  I think the problem is that I was using this drive in another PC and it was already an NTFS disk.  I did a little research and installed the UNASSIGNED DEVICES PLUS plugin because I thought I might need DESTRUCTIVE MODE enabled, but having that enabled still does not reflect a way to format the drive in Unassigned Devices so it can be used as a cache drive.

 

Any guidance here?  Should I possibly remove both of the partitions listed under the drive?  Again, I don't need any of the data on this drive.  I'm just looking to set it up as a cache drive and then have it rebuild the docker.img on it as I had on my previous cache drive.761060665_2021_06_11-0004.thumb.jpg.97c82e9aa87c1dac5c94ab6d09038d36.jpg

Link to comment
24 minutes ago, John_M said:

You need to assign the SSD to the Cache slot, per step 6 of your own instructions. It is currently unassigned.

 

Thanks John.  I actually did that, but I still didn't see an option to format the drive.  I needed to start the array.  Once I did that the option to format the drive came available.

 

This all seems to have worked, which is awesome.  The Previous Apps option and having your settings retained was so nice.  Thanks again.    

Link to comment
  • JP changed the title to (SOLVED) - One question about upgrading cache drive

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.