btrfs(8)

SYNOPSIS 概要 

btrfs [global] <group> [<group>…] <command> [<args>]
btrfs [全局] <组> [<组>…] <命令> [<参数>]

DESCRIPTION 描述 

The btrfs utility is a toolbox for managing btrfs filesystems. There are command groups to work with subvolumes, devices, for whole filesystem or other specific actions. See section COMMANDS.
btrfs 实用工具是管理 btrfs 文件系统的工具箱。有用于处理子卷、设备、整个文件系统或其他特定操作的命令组。请参阅命令部分。

There are also standalone tools for some tasks like btrfs-convert(8) or btrfstune(8) that were separate historically and/or haven’t been merged to the main utility. See section STANDALONE TOOLS for more details.
还有一些独立工具用于某些任务,如 btrfs-convert(8) 或 btrfstune(8),这些工具在历史上是分开的,或者尚未合并到主要实用程序中。有关更多详细信息,请参阅独立工具部分。

For other topics (mount options, etc) please refer to the separate manual page btrfs(5).
对于其他主题(挂载选项等),请参阅单独的手册页 btrfs(5)。

COMMAND SYNTAX 命令语法 

Any command name can be shortened so long as the shortened form is unambiguous, however, it is recommended to use full command names in scripts. All command groups have their manual page named btrfs-<group>.
任何命令名称都可以缩短,只要缩短形式是明确的,但建议在脚本中使用完整的命令名称。所有命令组都有其手册页命名为 btrfs-<group>。

For example: it is possible to run btrfs sub snaps instead of btrfs subvolume snapshot. But btrfs file s is not allowed, because file s may be interpreted both as filesystem show and as filesystem sync.
例如:可以运行 btrfs sub snaps 而不是 btrfs subvolume snapshot。但是不允许 btrfs file s,因为 file s 可能被解释为文件系统显示和文件系统同步。

If the command name is ambiguous, the list of conflicting options is printed.
如果命令名称不明确,将打印冲突选项列表。

Sizes, both upon input and output, can be expressed in either SI or IEC-I units (see numfmt(1)) with the suffix B appended. All numbers will be formatted according to the rules of the C locale (ignoring the shell locale, see locale(7)).
输入和输出的大小可以用 SI 或 IEC-I 单位(参见 numfmt(1))表示,附加后缀 B。所有数字将根据 C 区域设置的规则进行格式化(忽略 shell 区域设置,参见 locale(7))。

For an overview of a given command use btrfs command --help or btrfs [command...] --help --full to print all available options.
对于给定命令的概述,请使用 btrfs 命令 --help 或 btrfs [command...] --help --full 打印所有可用选项。

There are global options that are passed between btrfs and the group name and affect behaviour not specific to the command, e.g. verbosity or the type of the output.
有一些全局选项在 btrfs 和组名之间传递,并影响不特定于命令的行为,例如详细程度或输出类型。

--format <format>

if supported by the command, print subcommand output in that format (text, json)
如果命令支持,以该格式打印子命令输出(文本,json)

-v|--verbose -v|--详细

increase verbosity of the subcommand
增加子命令的详细程度

-q|--quiet -q|--安静

print only errors 仅打印错误

--log <level>

set log level (default, info, verbose, debug, quiet)
设置日志级别(默认,信息,详细,调试,安静)

The remaining options are relevant only for the main tool:
剩余的选项仅适用于主工具:

--help

print condensed help for all subcommands
打印所有子命令的简明帮助

--version

print version string 打印版本字符串

COMMANDS 命令

balance 平衡

Balance btrfs filesystem chunks across single or several devices. See btrfs-balance(8) for details.
在单个或多个设备上平衡 btrfs 文件系统块。有关详细信息,请参阅 btrfs-balance(8)。

check 检查

Do off-line check on a btrfs filesystem. See btrfs-check(8) for details.
在 btrfs 文件系统上进行离线检查。有关详细信息,请参阅 btrfs-check(8)。

device 设备

Manage devices managed by btrfs, including add/delete/scan and so on. See btrfs-device(8) for details.
管理由 btrfs 管理的设备,包括添加/删除/扫描等操作。有关详细信息,请参阅 btrfs-device(8)。

filesystem 文件系统

Manage a btrfs filesystem, including label setting/sync and so on. See btrfs-filesystem(8) for details.
管理 btrfs 文件系统,包括标签设置/同步等操作。有关详细信息,请参阅 btrfs-filesystem(8)。

inspect-internal 内部检查

Debug tools for developers/hackers. See btrfs-inspect-internal(8) for details.
开发者/黑客的调试工具。有关详细信息,请参阅 btrfs-inspect-internal(8)。

property 属性

Get/set a property from/to a btrfs object. See btrfs-property(8) for details.
从/设置 btrfs 对象的属性。有关详细信息,请参阅 btrfs-property(8)。

qgroup

Manage quota group(qgroup) for btrfs filesystem. See btrfs-qgroup(8) for details.
管理 btrfs 文件系统的配额组(qgroup)。有关详细信息,请参阅 btrfs-qgroup(8)。

quota 配额

Manage quota on btrfs filesystem like enabling/rescan and etc. See btrfs-quota(8) and btrfs-qgroup(8) for details.
在 btrfs 文件系统上管理配额,如启用/重新扫描等。有关详细信息,请参阅 btrfs-quota(8) 和 btrfs-qgroup(8)。

receive 接收

Receive subvolume data from stdin/file for restore and etc. See btrfs-receive(8) for details.
从标准输入/文件接收子卷数据以进行恢复等操作。有关详细信息,请参阅 btrfs-receive(8)。

replace 替换

Replace btrfs devices. See btrfs-replace(8) for details.
替换 btrfs 设备。有关详细信息,请参阅 btrfs-replace(8)。

rescue 救援

Try to rescue damaged btrfs filesystem. See btrfs-rescue(8) for details.
尝试恢复损坏的 btrfs 文件系统。有关详细信息,请参阅 btrfs-rescue(8)。

restore 恢复

Try to restore files from a damaged btrfs filesystem. See btrfs-restore(8) for details.
尝试从损坏的 btrfs 文件系统中恢复文件。有关详细信息,请参阅 btrfs-restore(8)。

scrub 擦除

Scrub a btrfs filesystem. See btrfs-scrub(8) for details.
对 btrfs 文件系统进行清洗。有关详细信息,请参阅 btrfs-scrub(8)。

send 发送

Send subvolume data to stdout/file for backup and etc. See btrfs-send(8) for details.
将子卷数据发送到标准输出/文件以备份等。有关详细信息,请参阅 btrfs-send(8)。

subvolume 子卷

Create/delete/list/manage btrfs subvolume. See btrfs-subvolume(8) for details.
创建/删除/列出/管理 btrfs 子卷。有关详细信息,请参阅 btrfs-subvolume(8)。

STANDALONE TOOLS 独立工具 

New functionality could be provided using a standalone tool. If the functionality proves to be useful, then the standalone tool is declared obsolete and its functionality is copied to the main tool. Obsolete tools are removed after a long (years) depreciation period.
新功能可以使用独立工具提供。如果功能被证明有用,则将宣布独立工具过时,并将其功能复制到主要工具中。过时的工具在长期(数年)的折旧期后被移除。

Tools that are still in active use without an equivalent in btrfs:
仍在使用中且在 btrfs 中没有等效项的工具:

btrfs-convert

in-place conversion from ext2/3/4 filesystems to btrfs
从 ext2/3/4 文件系统就地转换为 btrfs

btrfstune

tweak some filesystem properties on a unmounted filesystem
在未挂载的文件系统上调整一些文件系统属性

btrfs-select-super

rescue tool to overwrite primary superblock from a spare copy
从备用副本覆盖主超级块的救援工具

btrfs-find-root

rescue helper to find tree roots in a filesystem
在文件系统中查找树根的救援助手

For space-constrained environments, it’s possible to build a single binary with functionality of several standalone tools. This is following the concept of busybox where the file name selects the functionality. This works for symlinks or hardlinks. The full list can be obtained by btrfs help --box.
对于空间受限的环境,可以构建一个单一的二进制文件,具有几个独立工具的功能。这遵循了 busybox 的概念,其中文件名选择功能。这适用于符号链接或硬链接。完整列表可以通过 btrfs help --box 获得。

EXIT STATUS 退出状态 

btrfs returns a zero exit status if it succeeds. Non zero is returned in case of failure.
如果 btrfs 成功,返回零退出状态。如果失败,则返回非零值。

AVAILABILITY 可用性 

btrfs is part of btrfs-progs. Please refer to the documentation at https://btrfs.readthedocs.io.
btrfs 是 btrfs-progs 的一部分。请参考 https://btrfs.readthedocs.io 上的文档。

SEE ALSO 参见 

btrfs(5), btrfs-balance(8), btrfs-check(8), btrfs-convert(8), btrfs-device(8), btrfs-filesystem(8), btrfs-inspect-internal(8), btrfs-property(8), btrfs-qgroup(8), btrfs-quota(8), btrfs-receive(8), btrfs-replace(8), btrfs-rescue(8), btrfs-restore(8), btrfs-scrub(8), btrfs-send(8), btrfs-subvolume(8), btrfstune(8), mkfs.btrfs(8)