Manpage/btrfs

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
m (Protected "Manpage/btrfs": Counter-productive edit warring (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
(git 5.4)
 
Line 21: Line 21:
 
==COMMAND SYNTAX==
 
==COMMAND SYNTAX==
  
<p>Any command name can be shortened as far as it stays unambiguous,
+
<p>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.
+
however, it is recommended to use full command names in scripts. All command
All command groups have their manual page named <b>btrfs-<em>&lt;group&gt;</em></b>.</p>
+
groups have their manual page named <b>btrfs-<em>&lt;group&gt;</em></b>.</p>
 
<p>For example: it is possible to run <b>btrfs sub snaps</b> instead of
 
<p>For example: it is possible to run <b>btrfs sub snaps</b> instead of
 
<b>btrfs subvolume snapshot</b>.
 
<b>btrfs subvolume snapshot</b>.
Line 159: Line 159:
 
==STANDALONE TOOLS==
 
==STANDALONE TOOLS==
  
<p>There are several standalone tools to provide certain functionality. If the
+
<p>New functionality could be provided using a standalone tool. If the functionality
functionality proves to be useful, the standalone tools are declared obsolete
+
proves to be useful, then the standalone tool is declared obsolete and its
and their functionality copied to the main tool. The deprecation period is long
+
functionality is copied to the main tool. Obsolete tools are removed after a
(years) and the obsolete binaries are still provided.</p>
+
long (years) depreciation period.</p>
 
<p>Tools that are still in active use without an equivalent in <b>btrfs</b>:</p>
 
<p>Tools that are still in active use without an equivalent in <b>btrfs</b>:</p>
 
<dl>
 
<dl>
Line 200: Line 200:
 
<dd>
 
<dd>
 
<p>
 
<p>
moved to <b>btrfs inspect-internal dump-tree</b>
+
moved to <b>btrfs inspect-internal dump-tree</b>. Removed from
 +
source distribution.
 
</p>
 
</p>
  
Line 207: Line 208:
 
<dd>
 
<dd>
 
<p>
 
<p>
moved to <b>btrfs inspect-internal dump-super</b>
+
moved to <b>btrfs inspect-internal dump-super</b>, standalone
 +
removed.
 
</p>
 
</p>
  
Line 214: Line 216:
 
<dd>
 
<dd>
 
<p>
 
<p>
moved to <b>btrfs rescue zero-log</b>
+
moved to <b>btrfs rescue zero-log</b>, standalone removed.
 
</p>
 
</p>
  
 
</dl>
 
</dl>
 +
<p>For space-constrained environments, it&#8217;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 <b>btrfs help --box</b>.</p>
 
==EXIT STATUS==
 
==EXIT STATUS==
  
Line 229: Line 235:
 
==SEE ALSO==
 
==SEE ALSO==
  
<p>[[Manpage/btrfs-balance|btrfs-balance(8)]],
+
<p>[[Manpage/btrfs|btrfs(5)]],
 +
[[Manpage/btrfs-balance|btrfs-balance(8)]],
 
[[Manpage/btrfs-check|btrfs-check(8)]],
 
[[Manpage/btrfs-check|btrfs-check(8)]],
 
[[Manpage/btrfs-convert|btrfs-convert(8)]],
 
[[Manpage/btrfs-convert|btrfs-convert(8)]],

Latest revision as of 17:53, 16 January 2020

Contents

[edit] btrfs(8) manual page

Warning: this page is automatically generated from git, all edits will be lost. Current git version.


[edit] NAME

btrfs - a toolbox to manage btrfs filesystems

[edit] SYNOPSIS

btrfs <command> [<args>]

[edit] 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.

There are also standalone tools for some tasks like btrfs-convert or btrfstune that were separate historically and/or haven’t been merged to the main utility. See section STANDALONE TOOLS for more details.

For other topics (mount options, etc) please refer to the separate manual page btrfs(5).

[edit] 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>.

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.

If the command name is ambiguous, the list of conflicting options is printed.

For an overview of a given command use btrfs command --help or btrfs [command…] --help --full to print all available options.

[edit] COMMANDS

balance

Balance btrfs filesystem chunks across single or several devices.
See btrfs-balance(8) for details.

check

Do off-line check on a btrfs filesystem.
See btrfs-check(8) for details.

device

Manage devices managed by btrfs, including add/delete/scan and so on.
See btrfs-device(8) for details.

filesystem

Manage a btrfs filesystem, including label setting/sync and so on.
See btrfs-filesystem(8) for details.

inspect-internal

Debug tools for developers/hackers.
See btrfs-inspect-internal(8) for details.

property

Get/set a property from/to a btrfs object.
See btrfs-property(8) for details.

qgroup

Manage quota group(qgroup) for btrfs filesystem.
See btrfs-qgroup(8) for details.

quota

Manage quota on btrfs filesystem like enabling/rescan and etc.
See btrfs-quota(8) and btrfs-qgroup(8) for details.

receive

Receive subvolume data from stdin/file for restore and etc.
See btrfs-receive(8) for details.

replace

Replace btrfs devices.
See btrfs-replace(8) for details.

rescue

Try to rescue damaged btrfs filesystem.
See btrfs-rescue(8) for details.

restore

Try to restore files from a damaged btrfs filesystem.
See btrfs-restore(8) for details.

scrub

Scrub a btrfs filesystem.
See btrfs-scrub(8) for details.

send

Send subvolume data to stdout/file for backup and etc.
See btrfs-send(8) for details.

subvolume

Create/delete/list/manage btrfs subvolume.
See btrfs-subvolume(8) for details.

[edit] 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-convert

in-place conversion from ext2/3/4 filesystems to 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

Deprecated and obsolete tools:

btrfs-debug-tree

moved to btrfs inspect-internal dump-tree. Removed from source distribution.

btrfs-show-super

moved to btrfs inspect-internal dump-super, standalone removed.

btrfs-zero-log

moved to btrfs rescue zero-log, standalone removed.

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.

[edit] EXIT STATUS

btrfs returns a zero exit status if it succeeds. Non zero is returned in case of failure.

[edit] AVAILABILITY

btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.

[edit] 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)

Personal tools