Linux command
btrfs 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Create
sudo btrfs subvolume create path/to/subvolume
List
sudo btrfs subvolume list path/to/mount
Example
sudo btrfs filesystem df path/to/mount
Example
sudo btrfs quota enable path/to/subvolume
Example
sudo btrfs qgroup show path/to/subvolume
说明
btrfs is the primary management tool for Btrfs (B-tree filesystem), a modern copy-on-write Linux filesystem with built-in support for snapshots, subvolumes, transparent compression, online resizing, multi-device pools, checksumming, and RAID0/1/10/5/6. The command dispatches to subcommand groups (subvolume, filesystem, device, balance, scrub, send, receive, quota, qgroup, inspect-internal, ...) that map directly to filesystem operations. Most subcommands operate on a mounted Btrfs path. The kernel does the heavy lifting; the btrfs binary issues IOCTLs to invoke balance, scrub, snapshot, defrag, and other operations. The send / receive pair enables efficient incremental replication of snapshots to remote hosts or backup volumes.
参数
- subvolume (su)
- Manage subvolumes and snapshots
- filesystem (fi)
- Manage filesystem properties
- device (dev)
- Manage devices in the filesystem
- balance (bal)
- Balance data across devices
- scrub (sc)
- Verify data integrity
- quota (qu)
- Enable/disable quota support
- qgroup (qg)
- Manage quota groups
FAQ
What is the btrfs command used for?
btrfs is the primary management tool for Btrfs (B-tree filesystem), a modern copy-on-write Linux filesystem with built-in support for snapshots, subvolumes, transparent compression, online resizing, multi-device pools, checksumming, and RAID0/1/10/5/6. The command dispatches to subcommand groups (subvolume, filesystem, device, balance, scrub, send, receive, quota, qgroup, inspect-internal, ...) that map directly to filesystem operations. Most subcommands operate on a mounted Btrfs path. The kernel does the heavy lifting; the btrfs binary issues IOCTLs to invoke balance, scrub, snapshot, defrag, and other operations. The send / receive pair enables efficient incremental replication of snapshots to remote hosts or backup volumes.
How do I run a basic btrfs example?
Run `sudo btrfs subvolume create path/to/subvolume` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does subvolume (su) do in btrfs?
Manage subvolumes and snapshots