3 Btrfs puts snapshots and subvolumes into the root directory of the FS. This
4 directory can only be changed by btrfsctl right now, and normal filesystem
5 operations do not work on it. The default subvolume is called 'default',
6 and you can create files and directories in mount_point/default
8 Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need
9 to compile the kernel with:
13 libcrc32c can be static as well. Once your kernel is setup, typing make in the
14 btrfs module sources will build against the running kernel. When the build is
20 The Btrfs utility programs require libuuid to build. This can be found
21 in the e2fsprogs sources, and is usually available as libuuid or
22 e2fsprogs-devel from various distros.
24 Building the utilities is just make ; make install. The programs go
25 into /usr/local/bin. The mains commands available are:
27 mkfs.btrfs: create a filesystem
29 btrfs: control program to create snapshots and subvolumes:
30 # mount a btrfs filesystem
34 btrfs subvolume create /mnt/new_subvol_name
36 # snapshot of a subvolume
37 btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default
38 btrfs subvolume snapshot /mnt/snapshot_of_default \
39 /mnt/snapshot_of_a_snapshot
41 # list of the subvolumes
43 default snapshot_of_a_snapshot snapshot_of_new_subvol
44 new_subvol_name snapshot_of_default
46 # removal of a subvolume or a snapshot
47 btrfs subvolume delete /mn/snapshot_of_a_snapshot
49 # look a the btrfs man page for further information
52 btrfsck: do a limited check of the FS extent trees.</li>
54 btrfs-debug-tree: print all of the FS metadata in text form. Example:
56 btrfs-debug-tree /dev/sda2 >& big_output_file