btrfs-procs: docs: add warning about balance to replace failing device

Since balance is copying the old good data/metadata into a new chunk
(which can be on the same failed device), it's not a safe way to handle
failed devices.

Signed-off-by: Colin Snover <csnover@users.noreply.github.com>
[ Add an SoB and simple commit message, remove the unnecessary
  explanation, and guide the user to use `btrfs dev replace` ]
Signed-off-by: Qu Wenruo <wqu@suse.com>
This commit is contained in:
Colin Snover 2024-08-08 17:52:34 -05:00 committed by Qu Wenruo
parent d832a32d8d
commit 18dcd2d6d0
1 changed files with 10 additions and 0 deletions

View File

@ -116,3 +116,13 @@ In order to remove a device, you need to convert the profile in this case:
$ btrfs balance start -mconvert=dup -dconvert=single /mnt $ btrfs balance start -mconvert=dup -dconvert=single /mnt
$ btrfs device remove /dev/sda /mnt $ btrfs device remove /dev/sda /mnt
.. warning::
Do not run balance to convert from a profile with more redundancy to one with
less redundancy in order to remove a failing device from a filesystem.
Balance is done by reading out the good metadata/data and write them into into a
new chunk.
Thus it's possible the new chunk is written into the failing device.
Use `btrfs device replace` instead.