← 返回命令列表

Linux command

btrfs-device 命令

安全

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

常用示例

Add

sudo btrfs device add /dev/sdb /dev/sdc path/to/filesystem

Remove

sudo btrfs device remove /dev/sdb path/to/filesystem

Example

sudo btrfs device stats path/to/filesystem

Scan

sudo btrfs device scan --all-devices

Example

sudo btrfs device usage path/to/filesystem

说明

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.

参数

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

FAQ

What is the btrfs-device command used for?

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.

How do I run a basic btrfs-device example?

Run `sudo btrfs device add /dev/sdb /dev/sdc path/to/filesystem` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does add do in btrfs-device?

Add one or more devices to the filesystem