Replacing Cache Pool Devices using btrfs Replace [Solved]


Gico

Recommended Posts

Hi,

 

Can anyone help with the procedure to replace the 2 cache pool devices (hard disks) with 2 SSDs (sdab, sdak) using CLI?

I prefer using CLI (btrfs replace commands) instead of moving the data to the array and then back because I have Plex data,

so it will probably take ages.

I understand that using the GUI to do it is broken on v6.9.2.

 

Thanks.

juno-diagnostics-20211128-0938.zip

Edited by Gico
Link to comment

Thank you. Ran the replace commands but both have same error because SSDs are somewhat smaller than the current cache disks (all 4 disks are "4TB"):

ERROR: target device smaller than source device (required 4000786980352 bytes)

 

Any reasonable option to overcome this issue? btrfs resize maybe?

Or  alternatively add the 2 SSDs to the pool (through GUI?) to have 4 devices on the cache pool, then do "btrfs device delete" one by one?

 

Edited by Gico
Link to comment
14 hours ago, Gico said:

because SSDs are somewhat smaller than the current cache disks

You can't direct replace to smaller devices.

 

14 hours ago, Gico said:

Or  alternatively add the 2 SSDs to the pool (through GUI?) to have 4 devices on the cache pool, then do "btrfs device delete" one by one?

You can do that, when done the cache reset procedure is the same as the one posted in the link above.

 

P.S.: metadata profile is DUP, you should change to RAID1.

Link to comment

Metadata profile changed to RAID1.

Stopped the balancing because anyway the device delete should balance the data to the new disks.

Currently running "btrfs device delete /dev/sdm1 /mnt/cache"

but counter my expectations, there are no meaningful writes to the new devices.

Is that normal?

Running "btrfs device usage" I see the data on the two old disks decreasing 3.18Tib --> 3.17Tib --> 3.11Tib...

That's freaking me out a bit, although used space on the cache pool seems to be steady.

 

juno-diagnostics-20211129-1636.zip

Link to comment
  • Gico changed the title to Replacing Cache Pool Devices using btrfs Replace [Solved]

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.