Replace old cache drive with new one


9 posts in this topic Last Reply

Recommended Posts

I've read the wiki on replacing a cache drive but am not sure I understand what is being asked and why it is necessary.

 

I have a 2TB spinning disk for cache formatted with BTRFS. It is in the system and running fine.  I also installed a new 2TB SSD M.2 drive that I want to move everything from cache over to.  I have VM, docker, mysql, etc on the cache drive.

 

I was planning on stopping VM, dockers, and the array.  

format the new drive

copy everything from the old drive to the new drive

assigning the new drive as cache

starting everything back up.

 

The wiki talks about using mover to move things, or adding the new drive to the cache pool and having balancer do things.  I assume the default setting for a cache pool is to mirror the data across both disks?

 

I'd prefer doing this the "recommended way" but have concerns.  I really don't want to screw it up and have to rebuild everything from scratch.

 

thanks,

david

Link to post
Posted (edited)

the balancing finished.  I then stopped all dockers, stopped the array.  Changed the cache to only have the new drive and restarted the array.

 

It is now doing a balancing again.  Is this expected?

 

I can see the data mounted.

Edited by lovingHDTV
Link to post
Posted (edited)

OK I guess I really screwed things up.

 

exactly what I didn't want to do.

 

Here is what cache is saying now.  The second balance happened, but btrfs is still running keeping me from stopping the array.

 

image.thumb.png.bde154656e1dfcf14aa12c163ae74be2.png

 

It also now says single instead of Raid1.  I can't show a picture of the main page because I can't stop the array.  But I have cache pool set to 2 slots, and the first slot is this drive, and the second is set to no device.

 

How do I recover?  The system is running, but I see a lot of these in the log file:

 

For clarity sake, the old cache drive is sdf.

Jan 5 15:23:58 tower kernel: BTRFS info (device sdf1): relocating block group 4975807692800 flags data
Jan 5 15:24:14 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:15 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:15 tower kernel: BTRFS info (device sdf1): relocating block group 4973660209152 flags data
Jan 5 15:24:31 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:32 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:32 tower kernel: BTRFS info (device sdf1): relocating block group 4971512725504 flags data
Jan 5 15:24:48 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:48 tower kernel: BTRFS info (device sdf1): found 8 extents
Jan 5 15:24:49 tower kernel: BTRFS info (device sdf1): relocating block group 4969365241856 flags data

 

thanks

david

tower-diagnostics-20210105-1525.zip

Edited by lovingHDTV
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.