btrfs-progs: alias btrfs device delete to btrfs device remove
[btrfs-progs-unstable/devel.git] / Documentation / btrfs-replace.asciidoc
blob774d8506338a1f509d192182a689f86d36a8ef0e
1 btrfs-replace(8)
2 ===============
4 NAME
5 ----
6 btrfs-replace - replace devices managed by btrfs with other device.
8 SYNOPSIS
9 --------
10 *btrfs replace* <subcommand> <args>
12 DESCRIPTION
13 -----------
14 *btrfs replace* is used to replace btrfs managed devices with other device.
16 NOTE: this is not currently supported for RAID5/6 profiles and must use the
17 device add/delete workaround.
18 It is recommended to see `btrfs-device`(8) for more details about btrfs device
19 management.
21 SUBCOMMAND
22 ----------
23 *cancel* <mount_point>::
24 Cancel a running device replace operation.
26 *start* [-Bfr] <srcdev>|<devid> <targetdev> <path>::
27 Replace device of a btrfs filesystem.
29 On a live filesystem, duplicate the data to the target device which
30 is currently stored on the source device.
31 If the source device is not available anymore, or if the -r option is set,
32 the data is built only using the RAID redundancy mechanisms.
33 After completion of the operation, the source device is removed from the
34 filesystem.
35 If the <srcdev> is a numerical value, it is assumed to be the device id
36 of the filesystem which is mounted at <path>, otherwise is is
37 the path to the source device. If the source device is disconnected,
38 from the system, you have to use the devid parameter format.
39 The <targetdev> needs to be same size or larger than the <srcdev>.
41 `Options`
43 -r::::
44 only read from <srcdev> if no other zero-defect mirror exists.
45 (enable this if your drive has lots of read errors, the access would be very
46 slow)
47 -f::::
48 force using and overwriting <targetdev> even if it looks like
49 containing a valid btrfs filesystem.
51 A valid filesystem is assumed if a btrfs superblock is found which contains a
52 correct checksum. Devices which are currently mounted are
53 never allowed to be used as the <targetdev>.
55 -B::::
56 no background replace.
58 *status* [-1] <mount_point>::
59 Print status and progress information of a running device replace operation.
61 `Options`
63 -1::::
64 print once instead of print continuously until the replace
65 operation finishes (or is canceled)
67 EXIT STATUS
68 -----------
69 *btrfs replace* returns a zero exit status if it succeeds. Non zero is
70 returned in case of failure.
72 AVAILABILITY
73 ------------
74 *btrfs* is part of btrfs-progs.
75 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
76 further details.
78 SEE ALSO
79 --------
80 `mkfs.btrfs`(8),
81 `btrfs-device`(8),