btrfs-progs: Add more detailed package bdependency information to INSTALL file
[platform/upstream/btrfs-progs.git] / INSTALL
1 Install Instructions
2
3 Btrfs uses libcrc32c in the kernel for file and metadata checksums.  You need
4 to compile the kernel with:
5
6 CONFIG_LIBCRC32C=m
7
8 libcrc32c can be static as well.  Once your kernel is setup, typing make in the
9 btrfs module sources will build against the running kernel.  When the build is
10 complete:
11
12 modprobe libcrc32c
13 insmod btrfs.ko
14
15 The Btrfs utility programs require the following libraries/tools to build:
16
17 - libuuid (This can be found in the e2fsprogs sources, and is usually available
18   as libuuid or e2fsprogs-devel from various distros).
19 - libattr (Extended attribute library - Development files)
20 - libblkid (Block device id library - Development files)
21 - liblzo2 (LZO data compression library - Development files)
22 - libacl (Access control list library - Development files)
23 - e2fslibs (ext2/ext3/ext4 file system libraries - Development files)
24 - asciidoc (Text document format tool - For documentation)
25
26 Building the utilities is just make ; make install.  The programs go
27 into /usr/local/bin.  The mains commands available are:
28
29 mkfs.btrfs: create a filesystem
30
31 btrfs: control program to create snapshots and subvolumes:
32         # mount a btrfs filesystem
33         mount /dev/sda2 /mnt
34
35         # create a subvolume
36         btrfs subvolume create /mnt/new_subvol_name
37
38         # snapshot of a subvolume
39         btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default 
40         btrfs subvolume snapshot /mnt/snapshot_of_default \
41                 /mnt/snapshot_of_a_snapshot
42
43         # list of the subvolumes
44         ls /mnt
45         default snapshot_of_a_snapshot snapshot_of_new_subvol
46         new_subvol_name snapshot_of_default
47
48         # removal of a subvolume or a snapshot
49         btrfs subvolume delete /mn/snapshot_of_a_snapshot
50
51         # look a the btrfs man page for further information
52         man btrfs
53
54 btrfsck: do a limited check of the FS extent trees.</li>
55
56 btrfs-debug-tree: print all of the FS metadata in text form.  Example:
57
58         btrfs-debug-tree /dev/sda2 >& big_output_file
59
60
61