October 3, 20205 yr Hi all, just a general question about btrfs pools. I recently wanted to remove an SSD from my raid1 pool, so I unassigned it and then restarted the array. To my suprise, instead of the pool starting up in some degraded mode, it instead seemed to begin a mandatory rebalance with the unassigned SSD to switch them to "single" operation, after which I assume it will remove it. According to this article, that seems to be normal for removing a device. So my question is, for a raid1 with two devices, to a raid1 with 1 (degraded, but still the same), why does a rebalance have to occur - If I were to simply remove the SSD physically, it would keep working, so why does it need to rebalance if the drive is instead not removed? I'm running 6.9.0-beta29, but about to downgrade to beta25 because of the vfio drive passthrough issues. Edited October 3, 20205 yr by Alexstrasza
October 4, 20205 yr Author I've found the original command-line run by UnRaid: Oct 4 01:45:47 Sector5 emhttpd: shcmd (41): /sbin/btrfs balance start -f -dconvert=single -mconvert=single /mnt/cache && /sbin/btrfs balance start -f -dconvert=single,soft -mconvert=single,soft /mnt/cache && /sbin/btrfs device delete /dev/nvme0n1p1 /mnt/cache & That would seem to match up with what I've observed: Convert to single (striped?) mode Convert again? Then finally copy the data off the SSD I want to delete. So I'm still confused as to why UnRaid chooses to do steps 1 & 2 rather than skipping to step 3.
October 4, 20205 yr Community Expert 10 hours ago, Alexstrasza said: why does a rebalance have to occur To make the pool not degraded. 5 hours ago, Alexstrasza said: Convert to single (striped?) mode Convert again? These are only one operation, balance is what converts the pools to single mode.
October 4, 20205 yr Author 9 hours ago, JorgeB said: To make the pool not degraded. But can't this be done after the remove operation, to save time waiting for the rebalance across the "removed" SSD? 9 hours ago, JorgeB said: These are only one operation, balance is what converts the pools to single mode. I get that, but I don't understand why the command line calls it twice, the second time with "dconvert=single,soft" instead.
October 5, 20205 yr Community Expert 15 hours ago, Alexstrasza said: But can't this be done after the remove operation, to save time waiting for the rebalance across the "removed" SSD? No, balance is what "removes" the member pool. 15 hours ago, Alexstrasza said: I get that, but I don't understand why the command line calls it twice, the second time with "dconvert=single,soft" instead. LT most likely did that because some times a balance leaves some old profile chunks unconverted, note that the "soft" balance will only balance those chunks, if there are any, it won't re-balance what is already balanced.
Archived
This topic is now archived and is closed to further replies.