From 18dcd2d6d0e37c0921df4259c06f764547fd59d5 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Thu, 8 Aug 2024 17:52:34 -0500 Subject: [PATCH] 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 [ 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 --- Documentation/ch-volume-management-intro.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/ch-volume-management-intro.rst b/Documentation/ch-volume-management-intro.rst index c0ba68a7..b350a233 100644 --- a/Documentation/ch-volume-management-intro.rst +++ b/Documentation/ch-volume-management-intro.rst @@ -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 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.