Archive Index (1999-2012) | 2013-current at | About  

Linux gains lossless filesystem

Sep 30, 2005 — by LinuxDevices Staff — from the LinuxDevices Archive

An R&D affiliate of the world's largest telephone company has achieved a stable release of a new Linux filesystem said to improve reliability over conventional Linux filesystems, and offer performance advantages over Solaris's UFS filesystem. NILFS 1.0 (new implementation of a log-structured filesystem) is available now from NTT Labs (Nippon Telegraph and Telephone's Cyber Space Laboratories).

Log-structured what?

Log-structured filesystems write down all data in a continuous log-like format that is only appended to, never overwritten. The approach is said to reduce seek times, as well as minimizing the kind of data loss that occurs with conventional Linux filesystems.

For example, data loss occurs on ext3 filesystems when the system crashes during a write operation. When the system reboots, the journal notes that the write did not complete, and any partial data writes are lost.

The UFS filesystem used by Solaris provides a data “snapshot” feature that prevents such data loss, NTT Labs says, but filesystem operation must be suspended to use the feature, reducing performance. NILFS, in contrast, can “continuously and automatically [save] instantaneous states of the file system without interrupting service,” NTT Labs says.

“Checkpoint” snapshot feature

The “instantaneous states” that NILFS continously saves can actually be mounted, read-only, at the same time that the actual filesystem is mounted read-write — a capability useful for data recovery after hardware failures and other system crashes. The “listcp” (“list checkpoint”) command of an interactive NILFS “inspect” utility is first used to find the checkpoint's address, in this case “2048”:

   # inspect /dev/sda2
nilfs> listcp
1 6 Tue Jul 12 14:55:57 2005 MajorCP|LogiBegin|LogiEnd
2048 2352 Tue Jul 12 14:55:58 2005 MajorCP|LogiEnd
nilfs> quit

The checkpoint address is then used to mount the checkpoint:

   # mount -t nilfs -r -o cp=2048 /dev/sda2 /nilfs-cp
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 70332412 8044540 62283776 12% /nilfs
/dev/sda2 70332412 8044540 62283776 12% /nilfs-cp

Additional claimed features of NILFS include:

  • Fast write and recovery times
  • Minimal damage to file data and system consistency on hardware failure
  • Correctly ordered data and meta-data writes
  • File and inode blocks are managed by a B-tree structure
    • Can create and store huge files
  • Internal data are processed in 64 bit wide word size

About NTT Labs

NTT Labs is an R&D affiliate of NTT. It is chartered with improving the reliability and functionality of operating systems, DBMS (database management systems), and other middleware. It joined the OSDL (Open Source Development Labs) in February of 2004, and is helping adapt open source software for use as “the mainstay system for enterprises,” it says.

NTT is Japan's second-largest company, behind Toyota, and the world's 18th largest company, according to Fortune Magazine's 2005 Global 500. NTT has revenues over $100B per year, putting it well ahead of second-place Deutsche Telekom, world's 37th largest company, with annual revenues of $72B.

The NILFS filesystem currently supports 32-bit x86 hardware running 2.6.13-series Linux kernels. The project homepage can be found here.

This article was originally published on and has been donated to the open source community by QuinStreet Inc. Please visit for up-to-date news and articles about Linux and open source.

Comments are closed.