bcachefs-device
Manage devices in a bcachefs filesystem
TLDR
Format and add a new device to an existing filesystem
$ sudo bcachefs device add --label [group].[name] [path/to/mountpoint] [path/to/device]
Migrate data off a device to prepare for removal$ bcachefs device evacuate [path/to/device]
Permanently remove a device from a filesystem$ bcachefs device remove [path/to/device]
SYNOPSIS
bcachefs device command [options] device
DESCRIPTION
bcachefs device manages devices within a running bcachefs filesystem. It allows adding new devices to expand storage, evacuating data before removal, and permanently removing devices.
Device labels organize storage into groups (like ssd or hdd) and individual device names, enabling tiered storage configurations.
PARAMETERS
--label group.name
Assign a label to categorize the device (e.g., ssd.cache, hdd.bulk)--force
Force device removal even if it would reduce redundancy
SUBCOMMANDS
add
Add a new device to the filesystemevacuate
Move all data off a device in preparation for removalremove
Remove a device from the filesystemonline
Bring an offline device back onlineoffline
Take a device offline without removing it
CAVEATS
Removing devices may take considerable time depending on data volume. Ensure sufficient free space on remaining devices before evacuating. Device operations require the filesystem to be mounted.
