Btrfs

Btrfs is a new copy on write (CoW) filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Jointly developed at Oracle, Red Hat, Fujitsu, Intel, SUSE, STRATO and many others, Btrfs is licensed under the GPL and open for contribution from anyone.

Reasons to Use Btrfs
Ext4 is safe and stable and can handle large filesystems with extents, but why switch? While it's true that btrfs is still considered experimental and unstable, the time is nearing when btrfs will become the default filesystem (instead of ext4). Some Linux distributions have begun to switch to it with their current release. It has a number of advanced features in common with zfs, which is what made the zfs filesystem popular with BSD distributions and NAS devices.


 * Copy on Write and snapshotting - Make incremental backups painless even from a "hot" filesystem or VM.
 * File level checksums - Metadata for each file includes a checksum that can be used to detect and repair errors.
 * Transparent compression - Files may be compressed and decompressed on the fly, which speeds up read performance.
 * Autodefrag - The filesystems may be tuned by a background thread while they are being used.
 * Sub volumes - Filesystems can share a single pool of space instead of being put into their own partitions.
 * RAID - Btrfs does its own raid implementations so lvm or mdadm are not required in order to have RAID.
 * Partitions (optional) - While it can be given partitions to work with, btrfs has the potential to use raw devices.
 * Data Deduplication (upcoming) - There is limited data deduplication support, however deduplication will eventually become a standard feature in btrfs.

Down the road, new clustered filesystems will readily take advantage of btrfs with its copy on write and other advanced features for their object stores. ceph is one such example of a clustered filesystem that looks very promising, and it knows how to take advantage of btrfs.

Kernel
You need to activate the following kernel option:

Software
The package contains the utilities necessary to work with the btrfs filesystem.

Creation
To create an btrfs filesystem on the partition:

In the example above, replace  with the partition and   with the disk number that is to be formatted.

requires 280 megs or more.

Mount
You can mount the filesystems in several ways:
 * mount - Manual mount.
 * fstab - Automatic mount at boot time.
 * removable media - Automatic mount at demand.
 * AutoFS - Automatic mount on access.
 * Btrfs system root - Use the filesystem as a collection of volumes including one as a system root

Compression
Btrfs supports transparent compression using the zlib and lzo algorithms.

Is possible to compress specific files using the file system attributes.

The compress mount option set the default behavior to compress all the newly created files.

In order to re-compress the whole file system, run the following command:

Depending on the CPU and Disk capabilities, using lzo compression could improve the overall throughput.