btrfs-balance(8)
SYNOPSIS 概要
btrfs balance <subcommand> <args>
btrfs 平衡 <子命令> <参数>
DESCRIPTION 描述
The primary purpose of the balance feature is to spread block groups across
all devices so they match constraints defined by the respective profiles. See
mkfs.btrfs(8) section PROFILES
for more details.
The scope of the balancing process can be further tuned by use of filters that
can select the block groups to process. Balance works only on a mounted
filesystem. Extent sharing is preserved and reflinks are not broken.
Files are not defragmented nor recompressed, file extents are preserved
but the physical location on devices will change.
平衡功能的主要目的是将块组分布到所有设备上,以便它们符合各自配置文件定义的约束条件。有关更多详细信息,请参阅 mkfs.btrfs(8) 章节 PROFILES。平衡过程的范围可以通过使用可选择要处理的块组的过滤器进一步调整。平衡仅适用于已挂载的文件系统。范围共享得到保留,重链接不会被破坏。文件不会被碎片化或重新压缩,文件范围得到保留,但设备上的物理位置会发生变化。
The balance operation is cancellable by the user. The on-disk state of the
filesystem is always consistent so an unexpected interruption (e.g. system crash,
reboot) does not corrupt the filesystem. The progress of the balance operation
is temporarily stored as an internal state and will be resumed upon mount,
unless the mount option skip_balance is specified.
用户可以取消平衡操作。文件系统的磁盘状态始终保持一致,因此意外中断(例如系统崩溃、重新启动)不会损坏文件系统。平衡操作的进度将暂时存储为内部状态,并将在挂载时恢复,除非指定了挂载选项 skip_balance。
Warning 警告
Running balance without filters will take a lot of time as it basically move
data/metadata from the whole filesystem and needs to update all block
pointers.
没有过滤器的运行平衡将花费大量时间,因为它基本上会从整个文件系统移动数据/元数据,并需要更新所有块指针。
The filters can be used to perform following actions:
过滤器可用于执行以下操作:
convert block group profiles (filter convert)
转换块组配置文件(过滤器转换)make block group usage more compact (filter usage)
使块组使用更紧凑(过滤器使用)perform actions only on a given device (filters devid, drange)
仅在给定设备上执行操作(过滤器 devid、drange)
The filters can be applied to a combination of block group types (data,
metadata, system). Note that changing only the system type needs the force
option. Otherwise system gets automatically converted whenever metadata
profile is converted.
过滤器可以应用于块组类型的组合(数据、元数据、系统)。请注意,仅更改系统类型需要 force 选项。否则,每当元数据配置文件转换时,系统会自动转换。
When metadata redundancy is reduced (e.g. from RAID1 to single) the force option
is also required and it is noted in system log.
当元数据冗余减少时(例如从 RAID1 到单个),也需要 force 选项,并在系统日志中进行了记录。
Note 注意
The balance operation needs enough work space, i.e. space that is completely
unused in the filesystem, otherwise this may lead to ENOSPC reports. See
the section ENOSPC for more details.
平衡操作需要足够的工作空间,即文件系统中完全未使用的空间,否则可能导致 ENOSPC 报告。有关更多详细信息,请参阅 ENOSPC 部分。
Compatibility 兼容性
Note 注意
The balance subcommand also exists under the btrfs filesystem namespace.
This still works for backward compatibility but is deprecated and should not
be used any more.
平衡子命令也存在于 btrfs 文件系统命名空间下。这仍然适用于向后兼容性,但已被弃用,不应再使用。
Note 注意
A short syntax btrfs balance <path> works due to backward compatibility
but is deprecated and should not be used any more. Use btrfs balance start
command instead.
由于向后兼容性,短语法 btrfs balance <path> 仍然有效,但已被弃用,不应再使用。请改用 btrfs balance start 命令。
Performance implications
性能影响
Balancing operations are very IO intensive and can also be quite CPU intensive,
impacting other ongoing filesystem operations. Typically large amounts of data
are copied from one location to another, with corresponding metadata updates.
平衡操作非常依赖 IO,并且可能会相当依赖 CPU,影响其他正在进行的文件系统操作。通常会从一个位置复制大量数据到另一个位置,并进行相应的元数据更新。
Depending upon the block group layout, it can also be seek heavy. Performance
on rotational devices is noticeably worse compared to SSDs or fast arrays.
根据块组布局的不同,也可能会有较多的寻道操作。在旋转设备上的性能明显比 SSD 或快速阵列差。
SUBCOMMAND 子命令
- cancel <path> 取消 <路径>
cancels a running or paused balance, the command will block and wait until the current block group being processed completes
取消正在运行或暂停的余额,该命令将阻塞并等待当前正在处理的块组完成Since kernel 5.7 the response time of the cancellation is significantly improved, on older kernels it might take a long time until currently processed chunk is completely finished.
从内核 5.7 开始,取消的响应时间显著改善,在旧内核上,可能需要很长时间才能完全完成当前处理的块。- pause <path> 暂停 <路径>
pause running balance operation, this will store the state of the balance progress and used filters to the filesystem
暂停运行平衡操作,这将把平衡进度的状态和使用的过滤器存储到文件系统中- resume <path> 简历 <路径>
resume interrupted balance, the balance status must be stored on the filesystem from previous run, e.g. after it was paused or forcibly interrupted and mounted again with skip_balance
恢复中断的平衡,平衡状态必须在文件系统中存储自上次运行,例如在暂停或强制中断后,并使用 skip_balance 再次挂载- start [options] <path> 启动 [选项] <路径>
start the balance operation according to the specified filters, without any filters the data and metadata from the whole filesystem are moved. The process runs in the foreground.
根据指定的过滤器开始平衡操作,如果没有过滤器,则移动整个文件系统的数据和元数据。该过程在前台运行。Note 注意
The balance command without filters will basically move everything in the filesystem to a new physical location on devices (i.e. it does not affect the logical properties of file extents like offsets within files and extent sharing). The run time is potentially very long, depending on the filesystem size. To prevent starting a full balance by accident, the user is warned and has a few seconds to cancel the operation before it starts. The warning and delay can be skipped with --full-balance option.
没有过滤器的平衡命令基本上会将文件系统中的所有内容移动到设备的新物理位置(即不会影响文件范围内的偏移和范围共享等逻辑属性)。运行时间可能会非常长,取决于文件系统的大小。为了防止意外启动完整平衡,用户会收到警告,并有几秒钟的时间在操作开始之前取消操作。警告和延迟可以通过--full-balance 选项跳过。Please note that the filters must be written together with the -d, -m and -s options, because they’re optional and bare -d and -m also work and mean no filters.
请注意,过滤器必须与-d、-m 和-s 选项一起编写,因为它们是可选的,仅使用-d 和-m 也可以,表示没有过滤器。Note 注意
When the target profile for conversion filter is raid5 or raid6, there’s a safety timeout of 10 seconds to warn users about the status of the feature
当转换过滤器的目标配置文件为 raid5 或 raid6 时,存在一个安全超时时间为 10 秒,用于警告用户有关该功能状态的信息Options
- -d[<filters>] -d[<过滤器>]
act on data block groups, see section FILTERS for details about filters
对数据块组进行操作,请参阅有关过滤器的详细信息的 FILTERS 部分- -m[<filters>] -m[<过滤器>]
act on metadata chunks, see FILTERS for details about filters
作用于元数据块,有关过滤器的详细信息请参阅 FILTERS- -s[<filters>] -s[<过滤器>]
act on system chunks (requires -f), see FILTERS for details about filters.
在系统块上执行操作(需要 -f),有关过滤器详细信息,请参阅 FILTERS。
- -f
force a reduction of metadata integrity, e.g. when going from raid1 to single, or skip safety timeout when the target conversion profile is raid5 or raid6
强制减少元数据完整性,例如从 raid1 转换为单个时,或者当目标转换配置文件为 raid5 或 raid6 时跳过安全超时。
- --background|--bg
run the balance operation asynchronously in the background, uses fork(2) to start the process that calls the kernel ioctl
在后台异步运行平衡操作,使用 fork(2)启动调用内核 ioctl 的进程
- --enqueue
wait if there’s another exclusive operation running, otherwise continue
如果有另一个独占操作正在运行,则等待,否则继续- -v
(deprecated) alias for global ‘-v’ option
(已弃用)全局‘-v’选项的别名
- status [-v] <path> 状态 [-v] <路径>
Show status of running or paused balance.
显示运行或暂停平衡的状态。Options
- -v
(deprecated) alias for global -v option
(已弃用)全局 -v 选项的别名
FILTERS 过滤器
From kernel 3.3 onwards, BTRFS balance can limit its action to a subset of the
whole filesystem, and can be used to change the replication configuration (e.g.
convert data from single
to RAID1
).
从内核 3.3 开始,BTRFS 平衡可以将其操作限制在整个文件系统的子集上,并可用于更改复制配置(例如,将数据从 single
转换为 RAID1
)。
Balance can be limited to a block group profile with the following options:
平衡可以限制为具有以下选项的块组配置文件:
-d
for data block groups
-d
用于数据块组-m
for metadata block groups (also implicitly applies to -s)
元数据块组的-m
(也隐式适用于 -s)-s
for system block groups
系统块组的-s
The options have an optional parameter which means that the parameter must start
right after the option without a space (this is mandatory getopt syntax), like
-dusage=10
. Options for all block group types can be specified in one command.
选项有一个可选参数,这意味着参数必须紧跟在选项后面,不能有空格(这是强制的 getopt 语法),例如 -dusage=10
。所有块组类型的选项可以在一个命令中指定。
A filter has the following structure: filter[=params][,filter=...]
过滤器具有以下结构: filter[=params][,filter=...]
To combine multiple filters use ,
, without spaces. Example: -dconvert=raid1,soft
要组合多个过滤器,请使用 ,
,不要留空格。示例: -dconvert=raid1,soft
BTRFS can have different profiles on a single device or the same profile on
multiple device.
BTRFS 可以在单个设备上具有不同的配置文件,也可以在多个设备上具有相同的配置文件。
The main reason why you want to have different profiles for data and metadata
is to provide additional protection of the filesystem’s metadata when devices fail,
since a single sector of unrecoverable metadata will break the filesystem,
while a single sector of lost data can be trivially recovered by deleting the broken file.
您希望为数据和元数据设置不同配置文件的主要原因是在设备故障时提供对文件系统元数据的额外保护,因为一个无法恢复的元数据扇区将破坏文件系统,而一个丢失的数据扇区可以通过删除损坏的文件来轻松恢复。
Before changing profiles, make sure there is enough unallocated space on
existing drives to create new metadata block groups (for filesystems
over 50GiB, this is 1GB * (number_of_devices + 2))
.
在更改配置文件之前,请确保现有驱动器上有足够的未分配空间来创建新的元数据块组(对于超过 50GiB 的文件系统,这是 1GB * (number_of_devices + 2))
。
Default profiles on BTRFS are:
BTRFS 上的默认配置文件为:
data:
single
数据:single
- metadata: 元数据:
single devices:
dup
单个设备:dup
multiple devices:
raid1
多个设备:raid1
The available filter types are:
可用的过滤器类型为:
Filter types 过滤器类型
- profiles=<profiles> 档案=<profiles>
Balances only block groups with the given profiles. Parameters are a list of profile names separated by
|
(pipe).
仅块组与给定档案匹配。参数是由|
(竖线)分隔的档案名称列表。- usage=<percent>, usage=<range>
使用率=<percent>,使用率=<range> Balances only block groups with usage under the given percentage. The value of 0 is allowed and will clean up completely unused block groups, this should not require any new work space allocated. You may want to use usage=0 in case balance is returning ENOSPC and your filesystem is not too full.
仅块组使用率低于给定百分比的余额。允许值为 0,并将完全清除未使用的块组,这不应需要分配任何新的工作空间。如果平衡返回 ENOSPC 并且您的文件系统没有太满,您可能希望使用 usage=0。The argument may be a single value or a range. The single value
N
means at most N percent used, equivalent to..N
range syntax. Kernels prior to 4.4 accept only the single value format. The minimum range boundary is inclusive, maximum is exclusive.
参数可以是单个值或范围。单个值N
表示最多使用 N 百分比,等同于..N
范围语法。4.4 之前的内核仅接受单个值格式。最小范围边界是包含的,最大范围边界是排他的。- devid=<id>
Balances only block groups which have at least one chunk on the given device. To list devices with ids use btrfs filesystem show.
仅均衡具有给定设备上至少一个块的块组。要列出带有 ID 的设备,请使用 btrfs 文件系统显示。- drange=<range>
Balance only block groups which overlap with the given byte range on any device. Use in conjunction with
devid
to filter on a specific device. The parameter is a range specified asstart..end
.
仅均衡与任何设备上给定字节范围重叠的块组。与devid
结合使用以过滤特定设备上的内容。该参数是一个指定为start..end
的范围。- vrange=<range> vrange=<范围>
Balance only block groups which overlap with the given byte range in the filesystem’s internal virtual address space. This is the address space that most reports from btrfs in the kernel log use. The parameter is a range specified as
start..end
.
仅平衡与文件系统内部虚拟地址空间中给定字节范围重叠的块组。这是内核日志中大多数来自 btrfs 的报告使用的地址空间。该参数是一个指定为start..end
的范围。- convert=<profile> convert=<配置文件>
Convert each selected block group to the given profile name identified by parameters.
将每个选定的块组转换为由参数标识的给定配置文件名。Note 注意
Starting with kernel 4.5, the
data
chunks can be converted to/from theDUP
profile on a single device.
从内核 4.5 开始,可以在单个设备上将data
块转换为/DUP
配置文件。Note 注意
Starting with kernel 4.6, all profiles can be converted to/from
DUP
on multi-device filesystems.
从内核 4.6 开始,所有配置文件都可以在多设备文件系统上与DUP
之间进行转换。- limit=<number>, limit=<range>
限制=<数字>,限制=<范围> Process only given number of chunks, after all filters are applied. This can be used to specifically target a chunk in connection with other filters (
drange
,vrange
) or just simply limit the amount of work done by a single balance run.
在应用所有过滤器后,仅处理给定数量的块。这可以用于针对与其他过滤器(drange
,vrange
)连接的块,或者仅仅限制单个平衡运行所做的工作量。The argument may be a single value or a range. The single value
N
means at most N chunks, equivalent to..N
range syntax. Kernels prior to 4.4 accept only the single value format. The range minimum and maximum are inclusive.
参数可以是单个值或范围。单个值N
表示最多 N 个块,等同于..N
范围语法。4.4 之前的内核仅接受单个值格式。范围的最小值和最大值都包含在内。- stripes=<range> 条纹=<range>
Balance only block groups which have the given number of stripes. The parameter is a range specified as
start..end
. Makes sense for block group profiles that utilize striping, i.e. RAID0/10/5/6. The range minimum and maximum are inclusive.
仅平衡具有给定条纹数量的块组。该参数是一个范围,指定为start..end
。适用于利用条带化的块组配置文件,即 RAID0/10/5/6。范围的最小值和最大值都包含在内。- soft 软
Takes no parameters. Only has meaning when converting between profiles, or When doing convert from one profile to another and soft mode is on, chunks that already have the target profile are left untouched. This is useful e.g. when half of the filesystem was converted earlier but got cancelled.
不接受参数。仅在转换配置文件之间或在从一个配置文件转换到另一个配置文件且软模式打开时才有意义,已经具有目标配置文件的块将保持不变。例如,当文件系统的一半在之前转换但被取消时,这是有用的。The soft mode switch is (like every other filter) per-type. For example, this means that we can convert metadata chunks the “hard” way while converting data chunks selectively with soft switch.
软模式开关(像每个其他过滤器一样)是按类型的。例如,这意味着我们可以以“硬”方式转换元数据块,同时使用软开关有选择地转换数据块。
Profile names, used in profiles
and convert
are one of:
在 profiles
和 convert
中使用的配置文件名称之一为:
raid0
raid1
raid1c3
raid1c4
raid10
raid5
raid6
dup
single
The mixed data/metadata profiles can be converted in the same way, but conversion
between mixed and non-mixed is not implemented. For the constraints of the
profiles please refer to mkfs.btrfs(8) section
PROFILES.
混合数据/元数据配置文件可以以相同方式转换,但混合和非混合之间的转换尚未实现。有关配置文件的约束,请参阅 mkfs.btrfs(8) 章节 PROFILES。
ENOSPC
The way balance operates, it usually needs to temporarily create a new block
group and move the old data there, before the old block group can be removed.
For that it needs the work space, otherwise it fails for ENOSPC reasons.
This is not the same ENOSPC as if the free space is exhausted. This refers to
the space on the level of block groups, which are bigger parts of the filesystem
that contain many file extents.
平衡操作的方式通常需要临时创建一个新的块组,并将旧数据移动到那里,然后才能删除旧的块组。为此,它需要工作空间,否则会因为 ENOSPC 原因而失败。这与空闲空间耗尽时的 ENOSPC 不同。这指的是块组级别的空间,块组是文件系统的较大部分,包含许多文件范围。
The free work space can be calculated from the output of the btrfs filesystem show
command:
可以通过运行 btrfs 文件系统显示命令来计算可用的工作空间:
Label: 'BTRFS' uuid: 8a9d72cd-ead3-469d-b371-9c7203276265
Total devices 2 FS bytes used 77.03GiB
devid 1 size 53.90GiB used 51.90GiB path /dev/sdc2
devid 2 size 53.90GiB used 51.90GiB path /dev/sde1
size - used = free work space
size - used = 可用工作空间
53.90GiB - 51.90GiB = 2.00GiB
An example of a filter that does not require workspace is usage=0. This will
scan through all unused block groups of a given type and will reclaim the
space. After that it might be possible to run other filters.
不需要工作空间的过滤器示例是 usage=0。这将扫描给定类型的所有未使用的块组,并回收空间。之后可能可以运行其他过滤器。
CONVERSIONS ON MULTIPLE DEVICES
多设备上的转换
Conversion to profiles based on striping (RAID0, RAID5/6) require the work
space on each device. An interrupted balance may leave partially filled block
groups that consume the work space.
基于条带化(RAID0、RAID5/6)的配置文件转换需要每个设备上的工作空间。中断的平衡可能会留下部分填充的块组,消耗工作空间。
EXAMPLES 示例
A more comprehensive example when going from one to multiple devices, and back,
can be found in section TYPICAL USECASES of btrfs-device(8).
当从一个设备转移到多个设备,然后再转回时,可以在 btrfs-device(8) 的 TYPICAL USECASES 部分找到更全面的示例。
MAKING BLOCK GROUP LAYOUT MORE COMPACT
使块组布局更紧凑
The layout of block groups is not normally visible; most tools report only
summarized numbers of free or used space, but there are still some hints
provided.
区块组的布局通常不可见;大多数工具仅报告空闲或已使用空间的汇总数字,但仍然提供了一些提示。
Let’s use the following real life example and start with the output:
让我们使用以下真实案例,并从输出开始:
$ btrfs filesystem df /path
Data, single: total=75.81GiB, used=64.44GiB
System, RAID1: total=32.00MiB, used=20.00KiB
Metadata, RAID1: total=15.87GiB, used=8.84GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Roughly calculating for data, 75G - 64G = 11G, the used/total ratio is
about 85%. How can we can interpret that:
粗略计算数据,75G - 64G = 11G,已使用/总量比约为 85%。我们如何解释这个比例:
chunks are filled by 85% on average, i.e. the usage filter with anything smaller than 85 will likely not affect anything
平均情况下,块填充率为 85%,即使用过滤器过滤小于 85 的任何内容可能不会影响任何内容in a more realistic scenario, the space is distributed unevenly, we can assume there are completely used chunks and the remaining are partially filled
在更现实的情况下,空间分布不均匀,我们可以假设有完全使用的块和剩余的部分填充
Compacting the layout could be used on both. In the former case it would spread
data of a given chunk to the others and removing it. Here we can estimate that
roughly 850 MiB of data have to be moved (85% of a 1 GiB chunk).
布局压缩可以用于两者。在前一种情况下,它会将给定块的数据传播到其他块并将其移除。在这里,我们可以估计大约需要移动 850 MiB 的数据(1 GiB 块的 85%)。
In the latter case, targeting the partially used chunks will have to move less
data and thus will be faster. A typical filter command would look like:
在后一种情况下,针对部分使用的块进行定位将需要移动更少的数据,因此速度更快。典型的过滤命令看起来像这样:
# btrfs balance start -dusage=50 /path
Done, had to relocate 2 out of 97 chunks
$ btrfs filesystem df /path
Data, single: total=74.03GiB, used=64.43GiB
System, RAID1: total=32.00MiB, used=20.00KiB
Metadata, RAID1: total=15.87GiB, used=8.84GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
As you can see, the total amount of data is decreased by just 1 GiB, which is
an expected result. Let’s see what will happen when we increase the estimated
usage filter.
正如您所看到的,数据总量仅减少了 1 GiB,这是预期的结果。让我们看看当我们增加预估使用过滤器时会发生什么。
# btrfs balance start -dusage=85 /path
Done, had to relocate 13 out of 95 chunks
$ btrfs filesystem df /path
Data, single: total=68.03GiB, used=64.43GiB
System, RAID1: total=32.00MiB, used=20.00KiB
Metadata, RAID1: total=15.87GiB, used=8.85GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Now the used/total ratio is about 94% and we moved about 74G - 68G = 6G of
data to the remaining block groups, i.e. the 6GiB are now free of filesystem
structures, and can be reused for new data or metadata block groups.
现在已使用/总比例约为 94%,我们将大约 74G - 68G = 6G 的数据移动到剩余的块组,即这 6GiB 现在不再包含文件系统结构,可以用于新数据或元数据块组的重用。
We can do a similar exercise with the metadata block groups, but this should
not typically be necessary, unless the used/total ratio is really off. Here
the ratio is roughly 50% but the difference as an absolute number is “a few
gigabytes”, which can be considered normal for a workload with snapshots or
reflinks updated frequently.
我们可以对元数据块组执行类似的操作,但通常情况下不需要这样做,除非使用的/总量的比率真的很偏离。这里的比率大约是 50%,但绝对数字上的差异是“几千兆字节”,对于频繁更新快照或 reflinks 的工作负载来说,这可以被认为是正常的。
# btrfs balance start -musage=50 /path
Done, had to relocate 4 out of 89 chunks
$ btrfs filesystem df /path
Data, single: total=68.03GiB, used=64.43GiB
System, RAID1: total=32.00MiB, used=20.00KiB
Metadata, RAID1: total=14.87GiB, used=8.85GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Just 1 GiB decrease, which possibly means there are block groups with good
utilization. Making the metadata layout more compact would in turn require
updating more metadata structures, i.e. lots of IO. As running out of metadata
space is a more severe problem, it’s not necessary to keep the utilization
ratio too high. For the purpose of this example, let’s see the effects of
further compaction:
只有 1 GiB 的减少,这可能意味着存在利用率较高的块组。使元数据布局更紧凑将需要更新更多的元数据结构,即大量的 IO。由于元数据空间不足是一个更严重的问题,因此没有必要保持利用率过高。为了举例说明,让我们看看进一步压缩的效果:
# btrfs balance start -musage=70 /path
Done, had to relocate 13 out of 88 chunks
$ btrfs filesystem df .
Data, single: total=68.03GiB, used=64.43GiB
System, RAID1: total=32.00MiB, used=20.00KiB
Metadata, RAID1: total=11.97GiB, used=8.83GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
GETTING RID OF COMPLETELY UNUSED BLOCK GROUPS
摆脱完全未使用的块组
Normally the balance operation needs a work space, to temporarily move the
data before the old block groups gets removed. If there’s no work space, it
ends with no space left.
通常,平衡操作需要一个工作空间,在旧块组被移除之前暂时移动数据。如果没有工作空间,操作将因没有剩余空间而结束。
There’s a special case when the block groups are completely unused, possibly
left after removing lots of files or deleting snapshots. Removing empty block
groups is automatic since 3.18. The same can be achieved manually with a
notable exception that this operation does not require the work space. Thus it
can be used to reclaim unused block groups to make it available.
当块组完全未使用时,可能是在删除大量文件或快照后留下的特殊情况。自 3.18 版本以来,自动删除空块组。同样的效果也可以通过手动操作实现,但与一个显著的例外是,此操作不需要工作空间。因此,可以用它来回收未使用的块组以使其可用。
# btrfs balance start -dusage=0 /path
This should lead to decrease in the total numbers in the btrfs filesystem df output.
这应该导致 btrfs 文件系统 df 输出中总数的减少。
EXIT STATUS 退出状态
Unless indicated otherwise below, all btrfs balance subcommands
return a zero exit status if they succeed, and non zero in case of
failure.
除非下面另有说明,所有的 btrfs balance 子命令在成功时返回零退出状态,在失败时返回非零退出状态。
The pause, cancel, and resume subcommands exit with a status of
2 if they fail because a balance operation was not running.
如果暂停、取消和恢复子命令因为平衡操作未在运行而失败,则退出状态为 2。
The status subcommand exits with a status of 0 if a balance
operation is not running, 1 if the command-line usage is incorrect
or a balance operation is still running, and 2 on other errors.
状态子命令在以下情况下退出并返回状态 0:如果平衡操作未运行;返回状态 1:如果命令行用法不正确或平衡操作仍在运行;返回状态 2:其他错误。
AVAILABILITY 可用性
btrfs is part of btrfs-progs. Please refer to the documentation at
https://btrfs.readthedocs.io.
btrfs 是 btrfs-progs 的一部分。请参考 https://btrfs.readthedocs.io 上的文档。