mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
87d3875d4e
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>
60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
Install Instructions
|
|
|
|
Btrfs puts snapshots and subvolumes into the root directory of the FS. This
|
|
directory can only be changed by btrfsctl right now, and normal filesystem
|
|
operations do not work on it. The default subvolume is called 'default',
|
|
and you can create files and directories in mount_point/default
|
|
|
|
Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need
|
|
to compile the kernel with:
|
|
|
|
CONFIG_LIBCRC32C=m
|
|
|
|
libcrc32c can be static as well. Once your kernel is setup, typing make in the
|
|
btrfs module sources will build against the running kernel. When the build is
|
|
complete:
|
|
|
|
modprobe libcrc32c
|
|
insmod btrfs.ko
|
|
|
|
The Btrfs utility programs require libuuid to build. This can be found
|
|
in the e2fsprogs sources, and is usually available as libuuid or
|
|
e2fsprogs-devel from various distros.
|
|
|
|
Building the utilities is just make ; make install. The programs go
|
|
into /usr/local/bin. The mains commands available are:
|
|
|
|
mkfs.btrfs: create a filesystem
|
|
|
|
btrfs: control program to create snapshots and subvolumes:
|
|
# mount a btrfs filesystem
|
|
mount /dev/sda2 /mnt
|
|
|
|
# create a subvolume
|
|
btrfs subvolume create /mnt/new_subvol_name
|
|
|
|
# snapshot of a subvolume
|
|
btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default
|
|
btrfs subvolume snapshot /mnt/snapshot_of_default \
|
|
/mnt/snapshot_of_a_snapshot
|
|
|
|
# list of the subvolumes
|
|
ls /mnt
|
|
default snapshot_of_a_snapshot snapshot_of_new_subvol
|
|
new_subvol_name snapshot_of_default
|
|
|
|
# removal of a subvolume or a snapshot
|
|
btrfs subvolume delete /mn/snapshot_of_a_snapshot
|
|
|
|
# look a the btrfs man page for further information
|
|
man btrfs
|
|
|
|
btrfsck: do a limited check of the FS extent trees.</li>
|
|
|
|
debug-tree: print all of the FS metadata in text form. Example:
|
|
|
|
debug-tree /dev/sda2 >& big_output_file
|
|
|
|
|
|
|