commands.sh

btrfs device

linux

Manage devices in a btrfs filesystem.

More info →

Options (7)

boolean

Add one or more devices to a btrfs filesystem

Example: sudo btrfs {{[d|device]}} {{[a|add]}} {{path/to/block_device1 path/to/block_device2 ...}} {{path/to/btrfs_filesystem}}
boolean

Add one or more devices to a btrfs filesystem

Example: sudo btrfs {{[d|device]}} {{[a|add]}} {{path/to/block_device1 path/to/block_device2 ...}} {{path/to/btrfs_filesystem}}
boolean

Remove a device from a btrfs filesystem

Example: sudo btrfs {{[d|device]}} {{[rem|remove]}} {{path/to/device1|device_id1 path/to/device2|device_id2 ...}}
boolean

Display error statistics

Example: sudo btrfs {{[d|device]}} {{[st|stats]}} {{path/to/btrfs_filesystem}}
boolean

Scan all disks and inform the kernel of all detected btrfs filesystems

Example: sudo btrfs {{[d|device]}} {{[sc|scan]}} {{[-d|--all-devices]}}
-d, --all-devicesboolean

Scan all disks and inform the kernel of all detected btrfs filesystems

Example: sudo btrfs {{[d|device]}} {{[sc|scan]}} {{[-d|--all-devices]}}
boolean

Display detailed per-disk allocation statistics

Example: sudo btrfs {{[d|device]}} {{[u|usage]}} {{path/to/btrfs_filesystem}}

Examples (5)

Add one or more devices to a btrfs filesystem

sudo btrfs [d|device] [a|add] path/to/block_device1 path/to/block_device2 ... path/to/btrfs_filesystem

Remove a device from a btrfs filesystem

sudo btrfs [d|device] [rem|remove] path/to/device1|device_id1 path/to/device2|device_id2 ...

Display error statistics

sudo btrfs [d|device] [st|stats] path/to/btrfs_filesystem

Scan all disks and inform the kernel of all detected btrfs filesystems

sudo btrfs [d|device] [sc|scan] [-d|--all-devices]

Display detailed per-disk allocation statistics

sudo btrfs [d|device] [u|usage] path/to/btrfs_filesystem
made by @shridhargupta | data from tldr-pages