World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0002821858
Reproduction Date:

Title: Nilfs  
Author: World Heritage Encyclopedia
Language: English
Subject: JFFS, Log-structured file system, List of file systems, File systems, Boot File System
Collection: Disk File Systems, Linux Kernel-Supported File Systems, Persistence
Publisher: World Heritage Encyclopedia


Developer Nippon Telegraph and Telephone Cyber Space Laboratories
Full name New Implementation of a Log-structured File System
Introduced (Linux kernel)
File allocation B-tree
Max. file size 8 EiB
Supported operating systems Linux kernel, (ReadOnly for NetBSD)

NILFS (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 released under the terms of the GNU General Public License (GPL).


  • Important features 1
  • Current Status 2
    • Supported Features 2.1
  • Additional features 3
  • OS Compatibility 4
  • Description 5
  • Relative Performance 6
  • See also 7
  • References 8
  • External links 9

Important features

NILFS supports continuous snapshotting. In addition to versioning capability of the entire file system, users can even restore files mistakenly overwritten or destroyed just a few seconds ago. Since NILFS can keep consistency like conventional LFS, it achieves quick recovery after system crashes.

NILFS creates a number of checkpoints every few seconds or per synchronous write basis (unless there is no change). Users can select significant versions among continuously created checkpoints, and can change them into snapshots which will be preserved until they are changed back to checkpoints.

There is no limit on the number of snapshots until the volume gets full. Each snapshot is mountable as a read-only file system. It is mountable concurrently with a writable mount and other snapshots, and this feature is convenient to make consistent backups during use.

Snapshot administration is easy and quickly performable. NILFS will make snapshotting or versioning of the POSIX filesystem much familiar to you. The possible use of NILFS includes, versioning, tamper detection, SOX compliance logging, and so forth. It can serve as an alternative filesystem for Linux desktop environment, or as a basis of advanced storage appliances.

The current major version of NILFS is version 2, which is referred to as NILFS2. NILFS2 realized online garbage collection that reclaims disk space with keeping multiple snapshots.

Other NILFS features include:

  • B-tree based file and inode management.
  • Immediate recovery after system crash.
  • 64-bit data structures; support many files, large files and disks.
  • 64-bit on-disk timestamps which are free of the year 2038 problem.
  • Loadable kernel module; no recompilation of the kernel is required.

Current Status

Supported Features

  • Basic POSIX file system features
  • Snapshots
    • Automatically and continuously taken, you can retrieve past state of NILFS file system.
    • No limit on the number of snapshots until the volume gets full
    • Mountable as read-only file systems
    • Mountable concurrently with the writable mount (convenient to make consistent backups during use)
    • Quick listing
    • Easy administration
  • Background Garbage Collection
    • Can maintain multiple snapshots
    • Selectable GC Policy, which is given by a userland daemon.
  • Quick crash recovery on-mount
  • Read-ahead for meta data files as well as data files
  • Block sizes smaller than page size (e.g. 1KB or 2KB)
  • Redundant super block
  • Online resizing (since Linux-3.x and nilfs-utils 2.1)
  • Related utilities (by contribution of Jiro SEKIBA)
    • grub2
    • util-linux (blkid, libblkid, uuid mount)
    • udisks, palimpsest
    • Filesystem label (nilfs-tune)

Additional features

  • Fast write and recovery times
  • Minimal damage to file data and system consistency on hardware failure
    • 32-bit checksums (CRC32) on data and metadata for integrity assurance (per block group, in segment summary) [1]
    • Correctly ordered data and meta-data writes
    • Redundant superblock
  • Internal data is processed in 64-bit wide word size
  • Can create and store huge files (8 EiB)

OS Compatibility

Distribution Description
Debian NILFS is available in Debian 5.0 and later (lenny, squeeze, wheezy, and sid).
Ubuntu NILFS is available in Ubuntu 9.10 and later.
CentOS x86 and x86_64 for CentOS 5/6 are available on [1].
Fedora Building and installing nilfs-utils-2.1 is required in order to use NILFS in Fedora 14~16. For Fedora 15 and later, user also needs to build NILFS2 kernel module with explained steps.
openSUSE i586 and x86_64 for openSUSE and SUSE Linux Enterprise are available on openSUSE Build Service.
Gentoo NILFS is available in Gentoo Linux. A boot-cd with NILFS is available on PrRescue
Arch NILFS is available in Arch Linux.
Linux Mint NILFS is available in Linux Mint.
NixOS NILFS is available in NixOS.
  • NILFS was merged into the Linux kernel 2.6.30.[2]
  • On distributions where NILFS is available out-of-the-box, the user needs to download the nilfs-utils package, following the instructions from [2].

A separate, BSD licensed implementation, currently with read-only support, is included in NetBSD.[3]


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.[4]

The "instantaneous states" that NILFS continuously saves can actually be mounted, read-only, at the same time that the actual file system is mounted read-write — a capability useful for data recovery after hardware failures and other system crashes. The "lscp" (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

Relative Performance

In the January 2015 presentation SD cards and filesystems for embedded systems at, it was stated:[5]

See also


  1. ^ the Nilfs version 1: overview
  2. ^ Linux Kernel 2.6.30 Is Out, Includes the NILFS2 Filesystem
  3. ^ NiLFS(2) source commit
  4. ^ "An article about NILFS". Retrieved 2008-07-28. 
  5. ^ Peter Chubb. "SD cards and filesystems for embedded systems". 

External links

  • Official website
  • "An Article Describing High-level Features". Archived from the original on 2013-01-03. 
  • "World's Largest TELCO Joins Open Source Development Labs". Archived from the original on 2013-01-27. 
  • NILFS: A File System to Make SSDs Scream
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.