Tuesday, November 4, 2008

Btrfs - A Better File System for Linux


Btrfs (B-tree FS or usually pronounced "Better FS") is a copy-on-write file system for Linux announced by Oracle in 2007. Its developers expect it to replace the ext3 file system while removing a number of its limitations, particularly with respect to file size, total file system size and filesystem check duration; it is also expected to implement modern filesystem features not supported by ext3, like writable snapshots, snapshots of snapshots, builtin RAID support, and subvolumes. In addition, Btrfs claims a "focus on fault tolerance, repair and easy administration."

The Operating System
At the heart of every operating system is the file system that provides read/write access to data. Since 2001, Ext3 has been the mainstay of Linux file systems, but a better file system may be in the works.

Btrfs is currently under development in an effort led by Oracle with the support of Intel, Red Hat, HP and IBM. Btrfs could become the engine that brings next-generation file system capabilities to Linux.

The GOAL
The main goal is to let Linux scale for the storage that will be available. Scaling is not just about addressing the storage, but also means being able to administer and to manage it with a clean interface that lets people see what's being used and makes it more reliable. Although hard drives are getting bigger, the error rates on those drives are not going down.

With the current Ext3 Linux file system, for every 4k of data there is a piece of metadata pointing to where that 4k of data is on the drive. So as files grow larger, so does the amount of metadata. It's not very efficient.

Btrfs uses something called extents, which just says that from this starting position for this number of blocks. The extents approach is more scalable and efficient than the 4k block approach of Ext3. Extents are also part of the new Ext4 file system, which is part of the upcoming 2.6.28 Linux kernel release.

Though Ext4 adds extents, but Btrfs adds a number of other features beyond that. Among those features are items like snapshots, online file consistency checks and the ability to perform fast incremental backups.

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)
  • 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

External Links:
WiKi:
http://en.wikipedia.org/wiki/Btrfs
List of File Systems: http://en.wikipedia.org/wiki/List_of_file_systems
Internet: http://www.internetnews.com/dev-news/article.php/3781676/A+Better+File+System+for+Linux.htm

1 comments:

Anonymous said...

The Btrfs Main Page Link:- http://btrfs.wiki.kernel.org/index.php/Main_Page