NILFS
   HOME

TheInfoList



OR:

NILFS or NILFS2 (''New Implementation of a Log-structured File System'') is a
log-structured file system A log-structured filesystem is a file system in which data and metadata are written sequentially to a circular buffer, called a log. The design was first proposed in 1988 by John K. Ousterhout and Fred Douglis and first implemented in 1992 by ...
implementation for the
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
. It was developed by
Nippon Telegraph and Telephone Corporation , commonly known as NTT, is a Japanese telecommunications company headquartered in Tokyo, Japan. Ranked 55th in ''Fortune'' Global 500, NTT is the fourth largest telecommunications company in the world in terms of revenue, as well as the third la ...
(NTT) CyberSpace Laboratories and a community from all over the world. NILFS was released under the terms of the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general ...
(GPL).


Design

"NILFS is a log-structured file system, in that the storage medium is treated like a circular buffer and new blocks are always written to the end. €¦og-structured file systems are often used for flash media since they will naturally perform wear-leveling; €¦ILFS emphasizes snapshots. The log-structured approach is a specific form of copy-on-write behavior, so it naturally lends itself to the creation of file system snapshots. The NILFS developers talk about the creation of "continuous snapshots" which can be used to recover from user-initiated file system problems €¦" Using a
copy-on-write Copy-on-write (COW), sometimes referred to as implicit sharing or shadowing, is a resource-management technique used in computer programming to efficiently implement a "duplicate" or "copy" operation on modifiable resources. If a resource is dupl ...
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 time Higher performance in hard disk drives comes from devices which have better performance characteristics. These performance characteristics can be grouped into two categories: access time and data transfer time (or rate). Access time The ''acces ...
s, as well as minimize the kind of
data loss Data loss is an error condition in information systems in which information is destroyed by failures (like failed spindle motors or head crashes on hard drives) or neglect (like mishandling, careless handling or storage under unsuitable conditions ...
that occurs after a crash with conventional file systems. For example, data loss occurs on
ext3 ext3, or third extended filesystem, is a journaled file system that is commonly used by the Linux kernel. It used to be the default file system for many popular Linux distributions. Stephen Tweedie first revealed that he was working on ext ...
file systems when the system crashes during a write operation. When the system reboots, the
journal A journal, from the Old French ''journal'' (meaning "daily"), may refer to: *Bullet journal, a method of personal organization *Diary, a record of what happened over the course of a day or other period *Daybook, also known as a general journal, a ...
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
ave ''Alta Velocidad Española'' (''AVE'') is a service of high-speed rail in Spain operated by Renfe, the Spanish national railway company, at speeds of up to . As of December 2021, the Spanish high-speed rail network, on part of which the AVE s ...
instantaneous states of the file system without interrupting service", according to NTT Labs. 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


Features

NILFS provides continuous snapshotting. In addition to versioning capability of the entire file system, users can even restore files mistakenly overwritten or deleted at any recent time. Since NILFS can keep consistency like conventional LFS, it achieves quick recovery after system crashes. Continuous snapshotting is not provided by most file systems, including those supporting point-in-time snapshotting (e.g.
Btrfs Btrfs (pronounced as "better F S", "butter F S", "b-tree F S", or simply by spelling it out) is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (not to be confused ...
) 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. Possible uses of NILFS include versioning, tamper detection, SOX compliance logging, data loss recovery. The current major version of NILFS is version 2, which is referred to as NILFS2. NILFS2 implements online garbage collection to reclaim disk space with keeping multiple snapshots. Other NILFS features include: *
B-tree In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for ...
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 The year 2038 problem (also known as Y2038, Y2K38, or the Epochalypse) is a time formatting bug in computer systems with representing times after 03:14:07 UTC on 19 January 2038. The problem exists in systems which measure Unix time â ...
.


Current status


Supported features

* Basic
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
file system features * Snapshots ** Automatically and continuously taken ** 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 * Background
Garbage Collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
(GC) ** 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. 1 KB or 2KB) * Online resizing (since Linux-3.x and nilfs-utils 2.1) * Related utilities (by contribution of Jiro SEKIBA) **
grub2 GNU GRUB (short for GNU GRand Unified Bootloader, commonly referred to as GRUB) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Free Software Foundation's Multiboot Specification, which provides a us ...
**
util-linux is a standard package distributed by the Linux Kernel Organization for use as part of the Linux operating system. A fork, (with meaning "next generation"), was created when development stalled, but has been renamed back to , and is the offi ...
( blkid, libblkid, uuid mount) **
udisks udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices a ...
, palimpsest ** File system label (nilfs-tune)


Additional features

* Fast write and recovery times * Minimal damage to file data and system consistency on hardware failure ** 32-bit
checksum A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify data ...
s (
CRC32 A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to digital data. Blocks of data entering these systems get a short ''check value'' attached, based on ...
) on
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
and
metadata Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive metadata – the descriptive ...
for integrity assurance (per block group, in segment summary) ** 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)


Compatibility

NILFS is available in various GNU/Linux distributions like
Arch Linux Arch Linux () is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is a minimal base system, ...
,
Debian Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of De ...
(since version 5.0),
Fedora A fedora () is a hat with a soft brim and indented crown.Kilgour, Ruth Edwards (1958). ''A Pageant of Hats Ancient and Modern''. R. M. McBride Company. It is typically creased lengthwise down the crown and "pinched" near the front on both side ...
, Gentoo,
Linux Mint Linux Mint is a community-driven Linux distribution based on Ubuntu (which is in turn based on Debian), bundled with a variety of free and open-source applications. It can provide full out-of-the-box multimedia support for those who choose to i ...
, NixOS,
Ubuntu Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All ...
(since version 9.10), etc. To use it, users typically need to install the nilfs-utils or nilfs-tools package. A boot-cd with NILFS is also available o
PrRescue
It is also supported by partition-editing application like
GParted GParted (acronym of GNOME Partition Editor) is a GTK front-end to GNU Parted and an official GNOME partition-editing application (alongside Disks). GParted is used for creating, deleting, resizing, moving, checking, and copying disk partitio ...
. A separate, BSD licensed implementation, currently with read-only support, is included in
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is ava ...
.


Relative performance

In the January 2015 presentation '' SD cards and
file systems In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
for
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded ...
s'' at Linux.conf.au, it was stated:


License

The NILFS2 file system utilities are made available under the GNU Public License version 2, with the exception of the lib/nilfs libraries and their header files, which are made available under the GNU Lesser General Public License Version 2.1.


Developers

The Japanese primary authors and major contributors to the nilfs-utils who worked or are working at labs of NTT Corporation are: * Ryusuke Konishi (Primary maintainer, 02/2008–Present) * Koji Sato * Naruhiko Kamimura * Seiji Kihara * Yoshiji Amagai * Hisashi Hifumi and * Satoshi Moriai. Other major contributors are: * Andreas Rohner https://www.complang.tuwien.ac.at/Diplomarbeiten/rohner18.pdf * Dan McGee * David Arendt * David Smid * dexen deVries * Dmitry Smirnov * Eric Sandeen * Jiro SEKIBA * Matteo Frigo * Hitoshi Mitake * Takashi Iwai * Vyacheslav Dubeyko


See also

* ZFS *
Btrfs Btrfs (pronounced as "better F S", "butter F S", "b-tree F S", or simply by spelling it out) is a computer storage format that combines a file system based on the copy-on-write (COW) principle with a logical volume manager (not to be confused ...
* F2FS, another log-structured file system implementation * List of file systems *
Comparison of file systems The following tables compare general and technical information for a number of file systems. General information Limits Metadata Features File capabilities Block capabilities Note that in addition to the below table, blo ...
* Log-structured File System (BSD) * Sprite operating system


References


External links

* * * * *Manjaro tutoria
NILFS:_A_filesystem_designed_to_minimize_the_likelyhood_[sic
/nowiki>_of_data_loss_.html" ;"title="ic">NILFS: A filesystem designed to minimize the likelyhood [sic
/nowiki> of data loss ">ic">NILFS: A filesystem designed to minimize the likelyhood [sic
/nowiki> of data loss {{DEFAULTSORT:Nilfs Disk file systems File systems supported by the Linux kernel Persistence