blob: e83ff6e8c8d590d6b051bf1ab162a8f0e026828d [file] [log] [blame]
Chris Mason34088782007-06-12 11:36:58 -04001Install Instructions
2
3Btrfs puts snapshots and subvolumes into the root directory of the FS. This
4directory can only be changed by btrfsctl right now, and normal filesystem
5operations do not work on it. The default subvolume is called 'default',
6and you can create files and directories in mount_point/default
7
8Btrfs uses the crypto manager interface in the kernel for file and
9metadata checksums. You need to compile the kernel with:
10
11CONFIG_CRYPTO=y
12CONFIG_CRYPTO_MANAGER=m
13CONFIG_CRYPTO_CRC32C=m
14
15cryptomanager and crc32c can be static as well. Once your kernel is
16setup, typing make in the btrfs module sources will build against the
17running kernel. When the build is complete:
18
19modprobe crc32c
20modprobe cryptomgr
21insmod btrfs.ko
22
23The Btrfs utility programs require libuuid to build. This can be found
24in the e2fsprogs sources, and is usually available as libuuid or
25e2fsprogs-devel from various distros.
26
27Building the utilities is just make ; make install. The programs go
28into /usr/local/bin. The commands available are:
29
30mkfs.btrfs: create a filesystem
31
32btrfsctl: control program to create snapshots and subvolumes:
33
34 mount /dev/sda2 /mnt
35 btrfsctl -s new_subvol_name /mnt
36 btrfsctl -s snapshot_of_default /mnt/default
37 btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name
38 btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol
39 ls /mnt
40 default snapshot_of_a_snapshot snapshot_of_new_subvol
41 new_subvol_name snapshot_of_default
42
43 Snapshots and subvolumes cannot be deleted right now, but you can
44 rm -rf all the files and directories inside them.
45
46btrfsck: do a limited check of the FS extent trees.</li>
47
48debug-tree: print all of the FS metadata in text form. Example:
49
50 debug-tree /dev/sda2 >& big_output_file
51