2015-02-27 17:17:45 +00:00
|
|
|
Installation instructions
|
|
|
|
=========================
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
The Btrfs utility programs require the following libraries/tools to build:
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
- libuuid - provided by util-linux, e2fsprogs/e2fslibs or libuuid
|
2021-02-17 12:46:49 +00:00
|
|
|
- libblkid - block device id library
|
2015-02-27 17:17:45 +00:00
|
|
|
- liblzo2 - LZO data compression library
|
|
|
|
- zlib - ZLIB data compression library
|
2017-11-14 14:24:39 +00:00
|
|
|
- libzstd - ZSTD data compression library version >= 1.0.0
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
For the btrfs-convert utility:
|
2014-05-31 06:24:46 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
- e2fsprogs - ext2/ext3/ext4 file system libraries, or called e2fslibs
|
2017-12-04 12:14:00 +00:00
|
|
|
- libreiserfscore - reiserfs file system library version >= 3.6.27
|
2014-05-31 01:05:10 +00:00
|
|
|
|
2020-12-25 19:15:11 +00:00
|
|
|
Optionally, the checksums based on cryptographic hashes can be implemented by
|
2020-04-06 19:02:56 +00:00
|
|
|
external libraries. Builtin implementations are provided in case the library
|
|
|
|
dependencies are not desired.
|
|
|
|
|
2023-03-01 16:02:26 +00:00
|
|
|
- libgcrypt >= 1.8.0
|
|
|
|
- libsodium >= 1.0.4
|
|
|
|
- libkcapi >= 1.0.0
|
2023-11-15 18:02:15 +00:00
|
|
|
- Botan >= 2.19.0
|
2023-11-16 13:54:03 +00:00
|
|
|
- OpenSSL >= 3.2.0
|
2020-04-06 19:02:56 +00:00
|
|
|
|
2021-10-05 14:43:02 +00:00
|
|
|
Optionally, multipath device detection requires libudev and running udev
|
|
|
|
daemon, as it's the only source of the path information. Static build has a
|
|
|
|
fallback and does not need static version of libudev.
|
|
|
|
|
|
|
|
- libudev
|
|
|
|
|
2021-05-12 11:09:21 +00:00
|
|
|
For zoned device support, the system headers installed in /usr/include/linux
|
|
|
|
must be 5.10 or newer.
|
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
Generating documentation:
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2022-05-12 11:45:51 +00:00
|
|
|
- sphinx
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
Please note that the package names may differ according to the distribution.
|
Update/clean up btrfs help and man page V2
Hi all,
enclose you can find a patch which improves the help of the btrfs commands,
updates the INSTALL file and the btrfs (command) man page.
Regarding the help of the btrfs command:
- moved the "subvolume set-default" command in the "subvolume" commands group
- removed a wrong new line
- small tweak on the basis of Andreas suggestion
Regarding the btrfs command man page:
- renaming the command "device balance" in "filesystem balance" (thanks to
Andreas Phillipp to highlight that)
- adding the entry "subvolume find-new"
- document the switches of the command "filesystem defrag"
- document the <devid> facility of the command "filesystem resize"
- small tweak on the basis of Andreas suggestion
Regarding the INSTALL file, which was very old, I removed the reference of the
old btrfsctl utility and changed the examples using the btrfs command.
I removed the old (and now wrong) statement about the inability to delete a
subvolume/snapshot
Chris, you can pull the patch from the branch "help_cleanup" of the following
repository.
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
(or you can browse the changes at
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git/?p=btrfs-
progs-unstable-all.git;a=summary)
The patch is very simple: only updates the man page, the INSTALL file and
moves/updates some lines in the help of btrfs command. Comments are welcome.
Regards
G.Baroncelli
INSTALL | 29 ++++++++++++++++++++---------
btrfs.c | 24 ++++++++++++------------
man/btrfs.8.in | 45 +++++++++++++++++++++++++--------------------
3 files changed, 57 insertions(+), 41 deletions(-)
all the block devices.
.TP
@@ -138,21 +143,21 @@ can expand the partition before enlarging the filesystem
and shrink the
partition after reducing the size of the filesystem.
.TP
-\fBfilesystem show\fR [<uuid>|<label>]\fR
-Show the btrfs filesystem with some additional info. If no UUID or label is
-passed, \fBbtrfs\fR show info of all the btrfs filesystem.
+\fBfilesystem show\fR [<device>|<uuid>|<label>]\fR
+Show the btrfs filesystem with some additional info. If no argument is
+passed, \fBbtrfs\fR shows info of all the btrfs filesystems.
.TP
-\fBdevice balance\fR \fI<path>\fR
+\fBfilesystem balance\fR \fI<path>\fR
Balance the chunks of the filesystem identified by \fI<path>\fR
across the devices.
.TP
-\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice add\fR\fI <device> [<device>...] <path>\fR
Add device(s) to the filesystem identified by \fI<path>\fR.
.TP
-\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice delete\fR\fI <device> [<device>...] <path>\fR
Remove device(s) from a filesystem identified by \fI<path>\fR.
.PP
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-05 17:47:45 +00:00
|
|
|
|
2024-05-31 15:46:29 +00:00
|
|
|
Optionally, for testsuite utility fsstress:
|
|
|
|
|
|
|
|
- libaio
|
|
|
|
- liburing
|
|
|
|
|
2015-09-07 09:46:32 +00:00
|
|
|
|
|
|
|
Building from sources
|
|
|
|
---------------------
|
|
|
|
|
2015-06-21 23:39:27 +00:00
|
|
|
To build from git sources you need to generate the configure script using the
|
|
|
|
autotools:
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
$ ./autogen.sh
|
Update/clean up btrfs help and man page V2
Hi all,
enclose you can find a patch which improves the help of the btrfs commands,
updates the INSTALL file and the btrfs (command) man page.
Regarding the help of the btrfs command:
- moved the "subvolume set-default" command in the "subvolume" commands group
- removed a wrong new line
- small tweak on the basis of Andreas suggestion
Regarding the btrfs command man page:
- renaming the command "device balance" in "filesystem balance" (thanks to
Andreas Phillipp to highlight that)
- adding the entry "subvolume find-new"
- document the switches of the command "filesystem defrag"
- document the <devid> facility of the command "filesystem resize"
- small tweak on the basis of Andreas suggestion
Regarding the INSTALL file, which was very old, I removed the reference of the
old btrfsctl utility and changed the examples using the btrfs command.
I removed the old (and now wrong) statement about the inability to delete a
subvolume/snapshot
Chris, you can pull the patch from the branch "help_cleanup" of the following
repository.
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
(or you can browse the changes at
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git/?p=btrfs-
progs-unstable-all.git;a=summary)
The patch is very simple: only updates the man page, the INSTALL file and
moves/updates some lines in the help of btrfs command. Comments are welcome.
Regards
G.Baroncelli
INSTALL | 29 ++++++++++++++++++++---------
btrfs.c | 24 ++++++++++++------------
man/btrfs.8.in | 45 +++++++++++++++++++++++++--------------------
3 files changed, 57 insertions(+), 41 deletions(-)
all the block devices.
.TP
@@ -138,21 +143,21 @@ can expand the partition before enlarging the filesystem
and shrink the
partition after reducing the size of the filesystem.
.TP
-\fBfilesystem show\fR [<uuid>|<label>]\fR
-Show the btrfs filesystem with some additional info. If no UUID or label is
-passed, \fBbtrfs\fR show info of all the btrfs filesystem.
+\fBfilesystem show\fR [<device>|<uuid>|<label>]\fR
+Show the btrfs filesystem with some additional info. If no argument is
+passed, \fBbtrfs\fR shows info of all the btrfs filesystems.
.TP
-\fBdevice balance\fR \fI<path>\fR
+\fBfilesystem balance\fR \fI<path>\fR
Balance the chunks of the filesystem identified by \fI<path>\fR
across the devices.
.TP
-\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice add\fR\fI <device> [<device>...] <path>\fR
Add device(s) to the filesystem identified by \fI<path>\fR.
.TP
-\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice delete\fR\fI <device> [<device>...] <path>\fR
Remove device(s) from a filesystem identified by \fI<path>\fR.
.PP
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-05 17:47:45 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
To build from the released tarballs:
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
$ ./configure
|
|
|
|
$ make
|
|
|
|
$ make install
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2017-12-18 08:31:25 +00:00
|
|
|
To install the libbtrfsutil Python bindings:
|
|
|
|
|
|
|
|
$ make install_python
|
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
You may disable building some parts like documentation, btrfs-convert or
|
|
|
|
backtrace support. See ./configure --help for more.
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
Specific CFLAGS or LDFLAGS should be set like
|
2007-06-12 15:39:09 +00:00
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
$ CFLAGS=... LDFLAGS=... ./configure --prefix=/usr
|
Update/clean up btrfs help and man page V2
Hi all,
enclose you can find a patch which improves the help of the btrfs commands,
updates the INSTALL file and the btrfs (command) man page.
Regarding the help of the btrfs command:
- moved the "subvolume set-default" command in the "subvolume" commands group
- removed a wrong new line
- small tweak on the basis of Andreas suggestion
Regarding the btrfs command man page:
- renaming the command "device balance" in "filesystem balance" (thanks to
Andreas Phillipp to highlight that)
- adding the entry "subvolume find-new"
- document the switches of the command "filesystem defrag"
- document the <devid> facility of the command "filesystem resize"
- small tweak on the basis of Andreas suggestion
Regarding the INSTALL file, which was very old, I removed the reference of the
old btrfsctl utility and changed the examples using the btrfs command.
I removed the old (and now wrong) statement about the inability to delete a
subvolume/snapshot
Chris, you can pull the patch from the branch "help_cleanup" of the following
repository.
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
(or you can browse the changes at
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git/?p=btrfs-
progs-unstable-all.git;a=summary)
The patch is very simple: only updates the man page, the INSTALL file and
moves/updates some lines in the help of btrfs command. Comments are welcome.
Regards
G.Baroncelli
INSTALL | 29 ++++++++++++++++++++---------
btrfs.c | 24 ++++++++++++------------
man/btrfs.8.in | 45 +++++++++++++++++++++++++--------------------
3 files changed, 57 insertions(+), 41 deletions(-)
all the block devices.
.TP
@@ -138,21 +143,21 @@ can expand the partition before enlarging the filesystem
and shrink the
partition after reducing the size of the filesystem.
.TP
-\fBfilesystem show\fR [<uuid>|<label>]\fR
-Show the btrfs filesystem with some additional info. If no UUID or label is
-passed, \fBbtrfs\fR show info of all the btrfs filesystem.
+\fBfilesystem show\fR [<device>|<uuid>|<label>]\fR
+Show the btrfs filesystem with some additional info. If no argument is
+passed, \fBbtrfs\fR shows info of all the btrfs filesystems.
.TP
-\fBdevice balance\fR \fI<path>\fR
+\fBfilesystem balance\fR \fI<path>\fR
Balance the chunks of the filesystem identified by \fI<path>\fR
across the devices.
.TP
-\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice add\fR\fI <device> [<device>...] <path>\fR
Add device(s) to the filesystem identified by \fI<path>\fR.
.TP
-\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice delete\fR\fI <device> [<device>...] <path>\fR
Remove device(s) from a filesystem identified by \fI<path>\fR.
.PP
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-05 17:47:45 +00:00
|
|
|
|
2015-08-31 16:36:16 +00:00
|
|
|
and not as arguments to make. You can specify additional flags to build via
|
|
|
|
variables EXTRA_CFLAGS and EXTRA_LDFLAGS that get appended to the predefined
|
2016-11-10 17:31:53 +00:00
|
|
|
values of the respective variables. There are further build tuning options
|
|
|
|
documented in the Makefile.
|
2015-08-31 16:36:16 +00:00
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
$ make EXTRA_CFLAGS=-ggdb3
|
Update/clean up btrfs help and man page V2
Hi all,
enclose you can find a patch which improves the help of the btrfs commands,
updates the INSTALL file and the btrfs (command) man page.
Regarding the help of the btrfs command:
- moved the "subvolume set-default" command in the "subvolume" commands group
- removed a wrong new line
- small tweak on the basis of Andreas suggestion
Regarding the btrfs command man page:
- renaming the command "device balance" in "filesystem balance" (thanks to
Andreas Phillipp to highlight that)
- adding the entry "subvolume find-new"
- document the switches of the command "filesystem defrag"
- document the <devid> facility of the command "filesystem resize"
- small tweak on the basis of Andreas suggestion
Regarding the INSTALL file, which was very old, I removed the reference of the
old btrfsctl utility and changed the examples using the btrfs command.
I removed the old (and now wrong) statement about the inability to delete a
subvolume/snapshot
Chris, you can pull the patch from the branch "help_cleanup" of the following
repository.
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
(or you can browse the changes at
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git/?p=btrfs-
progs-unstable-all.git;a=summary)
The patch is very simple: only updates the man page, the INSTALL file and
moves/updates some lines in the help of btrfs command. Comments are welcome.
Regards
G.Baroncelli
INSTALL | 29 ++++++++++++++++++++---------
btrfs.c | 24 ++++++++++++------------
man/btrfs.8.in | 45 +++++++++++++++++++++++++--------------------
3 files changed, 57 insertions(+), 41 deletions(-)
all the block devices.
.TP
@@ -138,21 +143,21 @@ can expand the partition before enlarging the filesystem
and shrink the
partition after reducing the size of the filesystem.
.TP
-\fBfilesystem show\fR [<uuid>|<label>]\fR
-Show the btrfs filesystem with some additional info. If no UUID or label is
-passed, \fBbtrfs\fR show info of all the btrfs filesystem.
+\fBfilesystem show\fR [<device>|<uuid>|<label>]\fR
+Show the btrfs filesystem with some additional info. If no argument is
+passed, \fBbtrfs\fR shows info of all the btrfs filesystems.
.TP
-\fBdevice balance\fR \fI<path>\fR
+\fBfilesystem balance\fR \fI<path>\fR
Balance the chunks of the filesystem identified by \fI<path>\fR
across the devices.
.TP
-\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice add\fR\fI <device> [<device>...] <path>\fR
Add device(s) to the filesystem identified by \fI<path>\fR.
.TP
-\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice delete\fR\fI <device> [<device>...] <path>\fR
Remove device(s) from a filesystem identified by \fI<path>\fR.
.PP
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2010-12-05 17:47:45 +00:00
|
|
|
|
2015-09-07 09:46:32 +00:00
|
|
|
The build utilizes autotools, dependencies for generating the configure
|
|
|
|
scripts are:
|
|
|
|
|
2018-11-26 16:47:22 +00:00
|
|
|
* autoconf, autoheader
|
2015-09-07 09:46:32 +00:00
|
|
|
* automake, aclocal
|
|
|
|
* pkg-config
|
|
|
|
|
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
Statically built binaries
|
|
|
|
-------------------------
|
2015-09-07 09:46:32 +00:00
|
|
|
|
|
|
|
The makefiles are ready to let you build static binaries of the utilities. This
|
|
|
|
may be handy in rescue environments. Your system has to provide static version
|
|
|
|
of the libraries.
|
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
$ make static
|
|
|
|
$ make btrfs.static
|
|
|
|
$ make btrfs-convert.static
|
2015-09-07 09:46:32 +00:00
|
|
|
|
2016-11-10 17:31:53 +00:00
|
|
|
The resulting binaries have the '.static' suffix, the intermediate object
|
2015-09-07 09:46:32 +00:00
|
|
|
files do not conflict with the normal (dynamic) build.
|
|
|
|
|
2023-08-26 00:33:33 +00:00
|
|
|
There are pre-built static binaries for download available at the latest
|
|
|
|
release (under Assets), https://github.com/kdave/btrfs-progs/releases .
|
|
|
|
|
2015-09-07 09:46:32 +00:00
|
|
|
|
2019-07-02 16:33:24 +00:00
|
|
|
All-in-one binary (busybox style)
|
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
Since version 5.2 it's possible to build a single binary that can act as other
|
|
|
|
standalone tools, based on the file name:
|
|
|
|
|
|
|
|
$ make btrfs.box
|
|
|
|
$ mv btrfs.box btrfs
|
|
|
|
$ ln -s btrfs mkfs.btrfs
|
|
|
|
|
|
|
|
The list of built-ins can be obtained by
|
|
|
|
|
|
|
|
$ btrfs help --box
|
|
|
|
|
|
|
|
The basic set will always contain: mkfs.btrfs, btrfs-image, btrfs-convert.
|
|
|
|
|
|
|
|
|
2021-03-10 20:35:51 +00:00
|
|
|
32bit build on 64bit host
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
The combination of 32bit build on 64bit host could work but depends on the
|
|
|
|
libraries that must provide the 32bit versions, or even 32bit static versions.
|
|
|
|
This is fairly uncommon on contemporary distributions and building 32bit
|
|
|
|
versions on a 32bit host is recommended.
|
|
|
|
|
|
|
|
|
2015-02-27 17:17:45 +00:00
|
|
|
References:
|
2022-10-06 15:52:25 +00:00
|
|
|
* https://btrfs.readthedocs.io
|
2023-06-01 18:46:06 +00:00
|
|
|
* https://btrfs.wiki.kernel.org (outdated)
|