INSTALL 1.6 KB

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