diff options
author | Anand Jain <anand.jain@oracle.com> | 2013-09-28 01:30:05 +0800 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-16 08:23:11 -0400 |
commit | 1fdf85a3a30b139c02865bcf599fe5c461857f70 (patch) | |
tree | a79427040cb3f2fa958e1624fb9b342dee8aa671 /man/btrfs.8.in | |
parent | c31c50f3309110162f345b6b07389ff6e7e929d4 (diff) |
btrfs-progs: device add should check existing FS before adding
as of now, when 'btrfs device add' adds a device it doesn't
check if the given device contains an existing FS. This
patch will change that to check the same. which when true
add will fail, and ask user to use -f option to overwrite.
further, since now we have test_dev_for_mkfs() function
to check if a disk can be used, so this patch will also
use this function to test the given device before adding.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'man/btrfs.8.in')
-rw-r--r-- | man/btrfs.8.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/man/btrfs.8.in b/man/btrfs.8.in index b94df2e2..d86ec086 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -47,7 +47,7 @@ btrfs \- control a btrfs filesystem \fBbtrfs\fP \fB[filesystem] balance status\fP [-v] \fI<path>\fP .PP .PP -\fBbtrfs\fP \fBdevice add\fP [-K] \fI<device>\fP [\fI<device>...\fP] \fI<path>\fP +\fBbtrfs\fP \fBdevice add\fP [-Kf] \fI<device>\fP [\fI<device>...\fP] \fI<path>\fP .PP \fBbtrfs\fP \fBdevice delete\fP \fI<device>\fP [\fI<device>...\fP] \fI<path>\fP .PP @@ -383,7 +383,7 @@ be verbose .RE .TP -\fBdevice add\fR\fI [-K] <dev> \fP[\fI<dev>...\fP] \fI<path>\fR +\fBdevice add\fR\fI [-Kf] <dev> \fP[\fI<dev>...\fP] \fI<path>\fR Add device(s) to the filesystem identified by \fI<path>\fR. If applicable, a whole device discard (TRIM) operation is performed. .RS @@ -391,6 +391,8 @@ If applicable, a whole device discard (TRIM) operation is performed. \fIOptions\fR .IP "\fB-K|--nodiscard\fP" 5 do not perform discard by default +.IP "\fB-f|--force\fP" 5 +force overwrite of existing filesystem on the given disk(s) .RE .TP |