summaryrefslogtreecommitdiff
path: root/Documentation/btrfs-device.txt
blob: 20d7bcd7ec8ba9f9038d3cd50c6b1f0f15b717ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
btrfs-device(8)
===============

NAME
----
btrfs-device - control btrfs devices

SYNOPSIS
--------
'btrfs device' <subcommand> <args>

DESCRIPTION
-----------
'btrfs device' is used to control the btrfs devices, since btrfs can be used
across several devices, 'btrfs device' is used for multiple device management.

SUBCOMMAND
----------
'add' [-Kf] <dev> [<dev>...] <path>::
Add device(s) to the filesystem identified by <path>.
+
If applicable, a whole device discard (TRIM) operation is performed.
+
`Options`
+
-K|--nodiscard::::
do not perform discard by default
-f|--force::::
force overwrite of existing filesystem on the given disk(s)

'delete' <dev> [<dev>...] <path>::
Remove device(s) from a filesystem identified by <path>.

'scan' [(--all-devices|-d)|<device> [<device>...]]::
Scan devices for a btrfs filesystem.
+
If one or more devices are passed, these are scanned for a btrfs filesystem. 
If no devices are passed, btrfs uses block devices containing btrfs
filesystem as listed by blkid.
Finally, if '--all-devices' or '-d' is passed, all the devices under /dev are 
scanned.

'disk-usage' [-b] <path> [<path>..]::
Show which chunks are in a device.
+
If '-b' is given, byte will be set as unit.

'ready' <device>::
Check device to see if it has all of it's devices in cache for mounting.

'stats' [-z] <path>|<device>::
Read and print the device IO stats for all devices of the filesystem
identified by <path> or for a single <device>.
+
`Options`
+
-z::::
Reset stats to zero after reading them.

EXIT STATUS
-----------
'btrfs device' returns a zero exist status if it succeeds. Non zero is
returned in case of failure.

AVAILABILITY
------------
'btrfs' is part of btrfs-progs. Btrfs filesystem is currently under heavy
development,
and not suitable for any uses other than benchmarking and review.
Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
further details.

SEE ALSO
--------
`mkfs.btrfs`(8),