path: root/man
diff options
authorStefan Behrens <>2012-05-07 14:00:20 +0200
committerDavid Sterba <>2013-01-31 13:47:26 +0100
commit7e08a9116d9d692e0e298197de55b6b5505373bf (patch)
tree14c8e690382a882a699ba48dfb3dc0672d5d6bce /man
parent5b8826ddfd1c4fcdcfe9f78fd80cfeeac9de1b21 (diff)
Btrfs-progs: add support for device replace procedure
This is the user mode part of the device replace patch series. The command group "btrfs replace" is added with three commands: - btrfs replace start srcdev|srcdevid targetdev [-Bfr] mount_point - btrfs replace status mount_point [-1] - btrfs replace cancel mount_point Signed-off-by: Stefan Behrens <>
Diffstat (limited to 'man')
1 files changed, 54 insertions, 0 deletions
diff --git a/man/ b/man/
index 460592eb..5f017f8a 100644
--- a/man/
+++ b/man/
@@ -39,6 +39,12 @@ btrfs \- control a btrfs filesystem
\fBbtrfs\fP \fBdevice delete\fP\fI <device> [<device>...] <path> \fP
+\fBbtrfs\fP \fBreplace start\fP \fI[-Bfr] <srcdev>|<devid> <targetdev> <path>\fP
+\fBbtrfs\fP \fBreplace status\fP \fI[-1] <path>\fP
+\fBbtrfs\fP \fBreplace cancel\fP \fI<path>\fP
\fBbtrfs\fP \fBscrub start\fP [-Bdqru] {\fI<path>\fP|\fI<device>\fP}
\fBbtrfs\fP \fBscrub cancel\fP {\fI<path>\fP|\fI<device>\fP}
@@ -282,6 +288,54 @@ Finally, if \fB--all-devices\fP is passed, all the devices under /dev are
+\fBreplace start\fR \fI[-Bfr] <srcdev>|<devid> <targetdev> <path>\fR
+Replace device of a btrfs filesystem.
+On a live filesystem, duplicate the data to the target device which
+is currently stored on the source device. If the source device is not
+available anymore, or if the \fB-r\fR option is set, the data is built
+only using the RAID redundancy mechanisms. After completion of the
+operation, the source device is removed from the filesystem.
+If the \fIsrcdev\fR is a numerical value, it is assumed to be the device id
+of the filesystem which is mounted at mount_point, otherwise is is
+the path to the source device. If the source device is disconnected,
+from the system, you have to use the \fIdevid\fR parameter format.
+The targetdev needs to be same size or larger than the \fIsrcdev\fR.
+.B -r
+only read from \fIsrcdev\fR if no other zero-defect mirror exists (enable
+this if your drive has lots of read errors, the access would be very slow)
+.B -f
+force using and overwriting \fItargetdev\fR even if it looks like
+containing a valid btrfs filesystem. A valid filesystem is
+assumed if a btrfs superblock is found which contains a
+correct checksum. Devices which are currently mounted are
+never allowed to be used as the \fItargetdev\fR
+.B -B
+do not background
+\fBreplace status\fR \fI[-1] <path>\fR
+Print status and progress information of a running device replace operation.
+.B -1
+print once instead of print continously until the replace
+operation finishes (or is canceled)
+\fBreplace cancel\fR \fI<path>\fR
+Cancel a running device replace operation.
\fBscrub start\fP [-Bdqru] {\fI<path>\fP|\fI<device>\fP}
Start a scrub on all devices of the filesystem identified by \fI<path>\fR or on
a single \fI<device>\fR. Without options, scrub is started as a background