LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

btrfs-device

Manage devices in a btrfs filesystem

TLDR

Add devices
$ sudo btrfs device add /dev/sdb /dev/sdc path/to/filesystem
copy
Remove devices
$ sudo btrfs device remove /dev/sdb path/to/filesystem
copy
Show error statistics
$ sudo btrfs device stats path/to/filesystem
copy
Scan all disks
$ sudo btrfs device scan --all-devices
copy
Show usage per device
$ sudo btrfs device usage path/to/filesystem
copy

SYNOPSIS

btrfs device command [OPTIONS] [device|path]

DESCRIPTION

btrfs device manages devices in a btrfs filesystem. It can add or remove devices, display statistics, and scan for btrfs filesystems. This enables dynamic resizing and RAID configuration changes.

PARAMETERS

add

Add one or more devices to the filesystem
remove
Remove a device from the filesystem
delete
Alias for remove
stats
Show device error statistics
scan
Scan devices for btrfs filesystems
usage
Show detailed per-device allocation statistics
ready
Check if a device is ready
-d, --all-devices
Scan all devices for btrfs filesystems

INSTALL

sudo apt install btrfs-progs
copy
sudo dnf install btrfs-progs
copy
sudo pacman -S btrfs-progs
copy
sudo apk add btrfs-progs
copy
brew install btrfs-progs
copy
nix profile install nixpkgs#btrfs-progs
copy

CAVEATS

Removing a device requires enough space on remaining devices to hold relocated data. The filesystem must be mounted to add or remove devices. Adding devices does not automatically balance data.

HISTORY

btrfs device is part of the btrfs-progs package for managing btrfs filesystems on Linux.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid