Linux-BTRFS Archive on
 help / color / Atom feed
From: Goffredo Baroncelli <>
Subject: [PATCH 2/2] btrfs: a new tool to manage a btrfs filesystem - man page
Date: Fri, 12 Feb 2010 20:01:26 +0100
Message-ID: <> (raw)

[-- Attachment #1: Type: Text/Plain, Size: 5085 bytes --]

This is the man page of the btrfs command.

diff --git a/man/Makefile b/man/Makefile
index 4e8893b..4a90b75 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -7,13 +7,16 @@ mandir = $(prefix)/man
 man8dir = $(mandir)/man8
 MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \
-	   btrfs-show.8.gz
+	   btrfs-show.8.gz btrfs.8.gz
 all: $(MANPAGES)
 	$(GZIP) -n -c > mkfs.btrfs.8.gz
+	$(GZIP) -n -c > btrfs.8.gz
 	$(GZIP) -n -c > btrfsctl.8.gz
diff --git a/man/ b/man/
new file mode 100644
index 0000000..354faf9
--- /dev/null
+++ b/man/
@@ -0,0 +1,122 @@
+.TH BTRFS 8 "" "btrfs" "btrfs"
+.\" Man page writte by Goffredo Baroncelli <> (Feb 2010)
+btrfs \- control a btrfs filesystem
+\fBbtrfs\fP \fB snapshot|\-s \fP\fI <source> [<dest>/]<name>\fP
+\fBbtrfs\fP \fB delete|\-D \fP\fI <subvolume>\fP
+\fBbtrfs\fP \fB create|\-S \fP\fI [<dest>/]<name>\fP
+\fBbtrfs\fP \fB defrag|\-d \fP\fI <file>|<dir> [<file>|<dir>...]\fP
+\fBbtrfs\fP \fB fssync|\-c \fP\fI <path> \fP
+\fBbtrfs\fP \fB resize|\-r \fP\fI [+/\-]<size>[gkm]|max <filesystem>\fP
+\fBbtrfs\fP \fB scan|\-a \fP\fI [<device> [<device>..]]\fP
+\fBbtrfs\fP \fB show|\-l \fP\fI <dev>|<label> [<dev>|<label>...]\fP
+\fBbtrfs\fP \fB balance|\-b \fP\fI <path> \fP
+\fBbtrfs\fP \fB add\-dev|\-A \fP\fI <dev> [<dev>..] <path> \fP
+\fBbtrfs\fP \fB rm\-dev|\-R \fP\fI <dev> [<dev>..] <path> \fP]
+\fBbtrfs\fP \fB help|\-\-help|\-h \fP\fI\fP
+.B btrfs
+is used to control the filesystem and the files and directories stored. It is
+the tool to create or destroy a new snapshot or a new subvolume for the
+filesystem, to defrag a file or a directory, to flush the dato to the disk,
+to resize a filesystem, to scan the devive
+\fBsnapshot|\-s\fR\fI <source> [<dest>/]<name>\fR
+Create a writeble snapshot of the subvolume \fI<source>\fR with the name
+\fI<name>\fR in the \fI<dest>\fR directory. If \fI<source>\fR is not a
+subvolume, \fBbtrfs\fR returns an error.
+\fBdelete|\-D\fR\fI <subvolume>\fR
+Delete the subvolume \fI<subvolume>\fR. If \fI<subvolume>\fR is not a
+subvolume, \fBbtrfs\fR returns an error.
+\fBcreate|\-S\fR\fI [<dest>/]<name>\fR
+Create a subvolume in \fI<dest>\fR (or in the current directory if
+\fI<dest>\fR is not passed).
+\fBdefrag|\-d\fP\fI <file>|<dir> [<file>|<dir>...]\fR
+Defragment files and/or directories.
+\fBscan|\-a\fR \fI[<device> [<device>..]]\fR
+Scan devices for a btrfs filesystem. If no devices are passed, \fBbtrfs\fR scans
+all the block devices.
+\fBfssync|\-c\fR\fI <path> \fR
+Force a sync for the filesystem identified by \fI<path>\fR.
+.\" Some wording are extracted by the resize2fs man page
+\fBresize|\-r\fR\fI [+/\-]<size>[gkm]|max <filesystem>\fR
+Resize a file system indentified by \fI<path>\fR.
+The \fI<size>\fR parameter specifies the new size of the filesystem.
+If the prefix \fI+\fR or \fI\-\fR is present the size is increased or decreased
+by the quantity \fI<size>\fR.
+If no units are specified, the unit of the \fI<size>\fR parameter is the byte.
+Optionally, the size parameter may be suffixed by one of the following the units
+designators: 'K', 'M', or 'G', kilobytes, megabytes, or gigabytes, respectively.
+If 'max' is passed, the filesystem will occupe all available space on the
+The \fBresize\fR command \fBdoes not\fR manipulate the size of underlying
+partitions.  If you wish to enlarge/reduce a filesystem, you must make sure you
+can expand/reduce the size of the partition also.
+\fBshow|\-l\fR [<dev>|<label>...]\fR
+Show the btrfs devices with some additional info. If no devices or labels are
+passed, \fBbtrfs\fR scans all the block devices.
+\fBbalance|\-b\fR \fI<path>\fR
+Balance the chunk of the filesystem identified by \fI<path>\fR
+across the devices.
+\fBadd\-dev|\-A \fR\fI <dev> [<dev>..] <path>\fR
+Add device(s) to the filesystem identified by \fI<path>\fR.
+\fBrm\-dev|\-R \fR\fI <dev> [<dev>..] <path>\fR
+Remove device(s) to the filesystem identified by \fI<path>\fR.
+\fBbtrf\fR returns a zero exist status if it succeeds. Non zero is returned in
+case of failure.
+.B btrfs
+is part of btrfs-progs. Btrfs filesystem is currently under heavy development,
+and not suitable for any uses other than benchmarking and review.
+Please refer to the btrfs wiki for
+further details.
+.BR mkfs.btrfs (8)

gpg key@ Goffredo Baroncelli (ghigo) <>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-12 19:01 Goffredo Baroncelli [this message]
2010-02-13 12:42 ` Daniel J Blueman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-BTRFS Archive on

Archives are clonable:
	git clone --mirror linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ \
	public-inbox-index linux-btrfs

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone