HOME

TheInfoList



OR:

NILFS or NILFS2 (''New Implementation of a Log-structured File System'') is a log-structured file system 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 (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 user In product development, an end user (sometimes end-user) is a person who ultimately uses or is intended to ulti ...
(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 ''acce ...
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 exten ...
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 Solaris is a proprietary Unix operating system originally developed by Sun Microsystems. After the Sun acquisition by Oracle in 2010, it was renamed Oracle Solaris. Solaris superseded the company's earlier SunOS in 1993, and became known for it ...
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 aveinstantaneous 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 inte ...
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 (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 A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described by a single entry in the page table. It is the smallest unit of data for memory management in a virtual memory operating system. Similarly, a p ...
(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 **
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 off ...
( blkid, libblkid, uuid mount) ** udisks, 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 dat ...
s ( CRC32) 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 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 The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
)


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 sides ...
, 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 ...
,
NixOS NixOS is a Linux distribution built on top of the Nix package manager. It uses declarative configuration and allows reliable system upgrades. Several official package "channels" are offered, including the current Stable release and the Unstable ...
,
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 th ...
(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 partiti ...
. 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 a ...
.


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 F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux kernel. The motive for F2FS was to build a file system that, from the start, takes into account the characteristics of NAND flas ...
, another log-structured file system implementation *
List of file systems The following lists identify, characterize, and link to more thorough information on Computer file systems. Many older operating systems support only their one "native" file system, which does not bear any name apart from the name of the operating ...
*
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) The Log-Structured File System (or LFS) is an implementation of a log-structured file system (a concept originally proposed and implemented by John Ousterhout), originally developed for BSD. It was removed from FreeBSD and OpenBSD; the NetBSD ...
*
Sprite operating system Sprite is an experimental Unix-like distributed operating system developed at the University of California, Berkeley by John Ousterhout's research group between 1984 and 1992. Its notable features include support for single system image on compute ...


References


External links

* * * * *Manjaro tutoria
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