Diff for "btrfs"


Differences between revisions 24 and 25
Revision 24 as of 2010-06-24 12:34:59
Size: 4458
Editor: 142
Comment:
Revision 25 as of 2010-06-27 12:16:18
Size: 4559
Editor: wnpgmb1309w-ad05-252-194
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
COW and check sums are data integrity features. Btrfs uses Rodeh's btrees which are COW friendly.

C
heck sums are data integrity features.
Line 124: Line 126:
== Ubuntu 9.04 Jaunty ==
TBD
= How to Validate Filesystem Integrity =

= How to Improve Filesystem Performance =

What is btrfs?

The B tree file system is a “copy-on-write (COW)” check-summed file system with multi-device support and writable snapshots.

A snapshot is a frozen image of the file system at a point in time. This feature facilitates system rollback and instant backup when combined with supporting software.

Btrfs uses Rodeh's btrees which are COW friendly.

Check sums are data integrity features.

Multi-device support is part of the subvolume structure btrfs uses to grow a file system.

“A short history of btrfs” (LWN.NET July 22, 2009) by Valerie Aurora (formerly Henson) is available at http://lwn.net/Articles/342892/

More Information on btrfs is available at https://btrfs.wiki.kernel.org/index.php/Main_Page and http://en.wikipedia.org/wiki/Btrfs

Features:

  • Extent based file storage (2^64 max file size)
  • Space efficient packing of small files
  • Space efficient indexed directories
  • Dynamic inode allocation
  • Writable snapshots
  • Subvolumes (separate internal filesystem roots)
  • Object level mirroring and striping
  • Checksums on data and metadata (multiple algorithms available)
  • Compression
  • Integrated multiple device support, with several raid algorithms
  • Online filesystem check
  • Very fast offline filesystem check
  • Efficient incremental backup and FS mirroring
  • Online filesystem defragmentation

How to install

Ubuntu 10.10 Maverick

Obtain the latest alternative install cd from http://cdimage.ubuntu.com/

Do a regular installation except use manual partitioning to create:

  • a ext2 or ext3 partition of about 512 to 1024 MB for /boot
  • a btrfs partition for /
  • a linux swap partition about 2.5 times your memory

Ubuntu 8.10 Intrepid

PPA deb packages

https://launchpad.net/~brcha/+archive/ppa

Lines for sources.list.d:

deb http://ppa.launchpad.net/brcha/ppa/ubuntu intrepid main
deb-src http://ppa.launchpad.net/brcha/ppa/ubuntu intrepid main

Add the GPG key:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 17f547c39c5c4071e254d0a7313d312748a22a95

Download module source and btrfs tools:

sudo apt-get install btrfs btrfs-progs module-assistant

Build and install kernel module:

sudo module-assistant auto-install btrfs
sudo modprobe btrfs

Compile from Source

NOT ACTUALLY WORKING YET

btrfs wiki getting started page

Kernel Module Dependencies

8.10 Kernel 2.6.27-9-generic

  • CONFIG_LIBCRC32C=m
  • CONFIG_ZLIB_INFLATE=y
  • CONFIG_ZLIB_DEFLATE=m
  • build-essential: make, compiler, etc
  • linux-headers-2.6.27-9-generic: latest kernel headers

sudo apt-get install build-essential linux-headers-2.6.27-9-generic

Patch: http://permalink.gmane.org/gmane.comp.file-systems.btrfs/2562

Download, patch and compile code:

wget http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/btrfs-0.17.tar.bz2
tar -jxvf btrfs-0.17.tar.bz2
cd btrfs-0.17
#apply patch
make

Currently btrfs does not work with kernel 2.6.27

Ensure modules are up and running, and insert btrfs module into kernel.

sudo modprobe libcrc32c zlib_inflate zlib_deflate
sudo insmod btrfs.ko

btrfs progs dependencies

sudo apt-get install e2fsprogs uuid-dev

wget http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/btrfs-progs-0.17.tar.bz2
tar -jxvf btrfs-progs-0.17.tar.bz2
make

btrfs-progs compile fine

How to Validate Filesystem Integrity

How to Improve Filesystem Performance

How to use

  • How to format disk as btrfs
  • How to grow/shrink file system
  • How to create snapshots
  • How to access snapshots
  • How to convert ext2/3(/4?) partitions to btrfs
  • How to create an image of a btrfs file system
  • How to restore from an image of a btrfs file system
  • How to recover from a failed device
  • How to add another device to file system

btrfs wiki documentation category

Troubleshooting

Alternatives

  • Tux3?
  • ZFS over Fuse?
  • Hammer FS (DragonFly BSD)

Links

btrfs (last edited 2013-07-03 18:13:17 by localhost)