2021-02-03 11:48:27 +00:00
|
|
|
# btrfs device
|
|
|
|
|
|
|
|
> Manage devices in a btrfs filesystem.
|
2022-11-15 11:50:15 +00:00
|
|
|
> More information: <https://btrfs.readthedocs.io/en/latest/btrfs-device.html>.
|
2021-02-03 11:48:27 +00:00
|
|
|
|
|
|
|
- Add one or more devices to a btrfs filesystem:
|
|
|
|
|
|
|
|
`sudo btrfs device add {{path/to/block_device1}} [{{path/to/block_device2}}] {{path/to/btrfs_filesystem}}`
|
|
|
|
|
|
|
|
- Remove a device from a btrfs filesystem:
|
|
|
|
|
|
|
|
`sudo btrfs device remove {{path/to/device|device_id}} [{{...}}]`
|
|
|
|
|
|
|
|
- Display error statistics:
|
|
|
|
|
|
|
|
`sudo btrfs device stats {{path/to/btrfs_filesystem}}`
|
|
|
|
|
|
|
|
- Scan all disks and inform the kernel of all detected btrfs filesystems:
|
|
|
|
|
|
|
|
`sudo btrfs device scan --all-devices`
|
|
|
|
|
|
|
|
- Display detailed per-disk allocation statistics:
|
|
|
|
|
|
|
|
`sudo btrfs device usage {{path/to/btrfs_filesystem}}`
|