bcachefs Command Examples

Manage bcachefs filesystems/devices. Some subcommands such as device have their own usage documentation. More information: https://bcachefs-docs.readthedocs.io/en/latest/index.html.

sudo bcachefs format {{path/to/partition}}

sudo bcachefs mount {{path/to/partition}} {{path/to/mountpoint}}

sudo bcachefs format --label=ssd.ssd1 {{path/to/ssd/partition}} --label=hdd.hdd1 {{path/to/hdd/partition}} --replicas=1 --foreground_target=ssd --promote_target=ssd --background_target=hdd

sudo bcachefs mount {{path/to/partition1}}:{{path/to/partition2}} {{path/to/mountpoint}}

bcachefs fs usage --human-readable {{path/to/mountpoint}}

sudo bcachefs set-fs-option --metadata_replicas={{2}} --data_replicas={{2}} {{path/to/partition}}

sudo bcachefs data rereplicate {{path/to/mountpoint}}

bcachefs