← 返回命令列表

Linux command

bcachefs 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Format

sudo bcachefs format [path/to/partition]

Mount

sudo bcachefs mount [path/to/partition] [path/to/mountpoint]

Example

sudo bcachefs format -l ssd.ssd1 [path/to/ssd] -l hdd.hdd1 [path/to/hdd] --replicas 1 --foreground_target ssd --promote_target ssd --background_target hdd

Example

sudo bcachefs mount [path/to/partition1]:[path/to/partition2] [path/to/mountpoint]

Example

bcachefs fs usage -h [path/to/mountpoint]

Example

sudo bcachefs set-fs-option --metadata_replicas [2] --data_replicas [2] [path/to/partition]

Example

sudo bcachefs data rereplicate [path/to/mountpoint]

Example

bcachefs subvolume snapshot [path/to/directory] [path/to/snapshot]

说明

bcachefs is a next-generation copy-on-write filesystem for Linux that combines features of btrfs and ZFS with the performance characteristics of bcache. It provides checksumming, compression, encryption, snapshots, and multi-device support. The filesystem supports tiered storage with automatic data movement between fast (SSD) and slow (HDD) devices, making it suitable for hybrid storage configurations.

FAQ

What is the bcachefs command used for?

bcachefs is a next-generation copy-on-write filesystem for Linux that combines features of btrfs and ZFS with the performance characteristics of bcache. It provides checksumming, compression, encryption, snapshots, and multi-device support. The filesystem supports tiered storage with automatic data movement between fast (SSD) and slow (HDD) devices, making it suitable for hybrid storage configurations.

How do I run a basic bcachefs example?

Run `sudo bcachefs format [path/to/partition]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more bcachefs examples?

This page includes 8 examples for bcachefs, plus related commands for nearby Linux tasks.