BTRFS pool took over a month to add a small disk!


Recommended Posts

BTRFS pool that has a mix of 1tb and 4tb spinners. 

I recently added a 3rd 4tb disk, and it took over a month to finish!  While it was happening, the process made the pool almost useless, and the docker accessing it constantly crashed and restarted due to the rebuild.  So I stopped all reading/writing to the pool for a few hours (thinking it would speed it up), but the speed of the maintenance seemed to have stayed the same.  The pool has only around 10tb total useable space...it would have only taken me a couple days to move the data off, distroy and remake the pool with the added disk, and move the data back...but a couple months for the designed rebuild process?  WTF?!?!  (And yes, there was tb's of unused space in the pool before the addition of the new 4tb drive)

 

This isn't the first time i have had BTRFS pools be painfully slow to rebuild, add or remove a disk (in fact, i have done the move, distroy, move back for more critical data pools cuz it's much faster then waiting for the balance to work as designed)

So im wondering if its something i am doing wrong or just how slow BTRFS rebuilds are?  

I have a BTRFS pool that has a mix of 1tb and 4tb spinners.  I recently added a 3rd 4tb disk, and it took over a month to finish!  While it was happening, the process made the pool almost useless, and the docker accessing it constantly crashed and restarted.  I stopped all reading/writing to the pool for a few hours (thinking it would speed it up), but the speed of the maintenance seemed to have stayed the same.  The pool is only 10tb total useable space...it would have taken me a couple days to move the data off, distroy and remake the pool with the added disk, and move the data back...but a couple months for the designed rebuild process?  WTF?!?!  (And yes, there was tb's of unused space in the pool before the addition of the new 4tb drive)

This isn't the first time i have had BTRFS pools be painfully slow to rebuild, add or remove a disk!  So im wondering if its something i am doing wrong or just how slow BTRFS rebuilds are?  

Link to comment
  • 2 weeks later...
On 3/25/2024 at 1:05 PM, JorgeB said:

When you add a disk the pool makes a complete balance, i.e., it will re-write all the pool data, that can take a long time, depending on the amount of data and disk speed.

 

 

Yes...thats what i said.  Does over a month make sense for a small pool?  again, moving all the data off and back on would have taken a couple days at most...

Link to comment
On 4/3/2024 at 3:15 AM, JorgeB said:

Depends on what you consider small and also the disks used, e.g., SMR disks will be much slower for example.

Well in the OP, i mentioned their size; 1tb and 4tb...small in today's standards.  It doesn't make sense that a disk add takes 3 months and a backup format from scratch would be less then 3 days....make it make sense is all im trying to figure out.

Link to comment
  • 3 weeks later...
On 4/10/2024 at 1:57 AM, JorgeB said:

I agree that 3 months is a lot for that, assuming no SMR disks, If it happens again grab the diagnostics during the process, to see if there's something visible there.

I keep hearing SMR disks being an issue (and realizing this, i have replaced all of them from the array).  If they are in this pool, is that the reason for the ungodly slow balances?  Is there any way to speed this up (whilst still using those disks)?  I am pretty sure there is a couple SMR disks in this pool.
SMR is on my radar now; being careful not to buy new disks with that annoying "feature".  But this pool is made up of random disks, pulled out of decommissioned workstations etc...by design.

 

Edited by miicar
Link to comment
5 minutes ago, miicar said:

If they are in this pool, is that the reason for the ungodly slow balances?

They can be.

 

5 minutes ago, miicar said:

Is there any way to speed this up (whilst still using those disks)?

There's no way to speed up SMR disks, they are just slower for most write operations, sometimes many times slower then the same thing on CMR.

 

 

Link to comment

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.