Developer(s) | Nippon Telegraph and Telephone Cyber Space Laboratories |
---|---|
Full name | New Implementation of a Log-structured File System |
Introduced | 2005 with Linux kernel 2.6.13 |
Structures | |
File allocation | B-tree |
Limits | |
Max. volume size | 8 EiB |
Max. file size | 8 EiB |
Max. filename length | 255 bytes |
Other | |
Supported operating systems | Linux kernel, (ReadOnly for NetBSD) |
NILFS or NILFS2 (New Implementation of a Log-structured File System) is a log-structured file system implementation for the Linux kernel. It is being developed by Nippon Telegraph and Telephone Corporation (NTT) CyberSpace Laboratories and a community from all over the world. NILFS was released under the terms of the GNU General Public License (GPL).
"NILFS is a log-structured filesystem, in that the storage medium is treated like a circular buffer and new blocks are always written to the end.[…]Log-structured filesystems are often used for flash media since they will naturally perform wear-leveling;[…]NILFS emphasizes snapshots. The log-structured approach is a specific form of copy-on-write behavior, so it naturally lends itself to the creation of filesystem snapshots. The NILFS developers talk about the creation of "continuous snapshots" which can be used to recover from user-initiated filesystem problems[…]."
Using a copy-on-write technique known as "nothing in life is free", NILFS records all data in a continuous log-like format that is only appended to, never overwritten, an approach that is designed to reduce seek times, as well as minimize the kind of data loss that occurs after a crash with conventional file systems. For example, data loss occurs on ext3 file systems 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.
Some file systems, like UFS-derived file systems used by the Solaris operating system and BSDs, provide a snapshot feature that prevents such data loss, but the snapshot configuration can be lengthy on large file systems. NILFS, in contrast, can "continuously and automatically [save] instantaneous states of the file system without interrupting service", according to NTT Labs.