Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

NILFS

From Wikipedia, the free encyclopedia
(Redirected fromNILFS2)
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
This articlemay need to be rewritten to comply with Wikipedia'squality standards.You can help. Thetalk page may contain suggestions.(September 2013)
This articlecontainspromotional content. Please helpimprove it by removingpromotional language and inappropriateexternal links, and by adding encyclopedic text written from aneutral point of view.(September 2013) (Learn how and when to remove this message)
(Learn how and when to remove this message)
NILFS
Developer(s)Nippon Telegraph and Telephone Cyber Space Laboratories
Full nameNew Implementation of a Log-structured File System
Introduced2005; 20 years ago (2005) withLinux kernel 2.6.13
Structures
File allocationB-tree
Limits
Max volume size8EiB
Max file size8EiB
Max filename length255 bytes
Features
Dates recordedatime (planned)
Date resolution64-bit on-disk timestamps
AttributesPOSIX, with plans for extended attributes
File system
permissions
POSIX, with plans for ACLs[1]
Transparent
compression
No
Transparent
encryption
No
Copy-on-writeYes
Other
Supported
operating systems
Linux kernel, (ReadOnly forNetBSD)

NILFS orNILFS2 (NewImplementation of aLog-structuredFileSystem) is alog-structured file system implementation for theLinux kernel. It was developed byNippon Telegraph and Telephone Corporation (NTT)CyberSpace Laboratories and a community from all over the world. NILFS was released under the terms of theGNU General Public License (GPL).

Design

[edit]

"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.[…]Log-structured file systems 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 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[…]."[2]

Using acopy-on-write technique known as alog-structured file system, NILFS records all data in a continuous log-like format that is only appended to, never overwritten, an approach that is designed to reduceseek times, as well as minimize the kind ofdata loss that occurs after a crash with conventional file systems. For example, data loss occurs onext3 file systems when the systemcrashes during a write operation. When the systemreboots, thejournal notes that the write did not complete, and any partial data writes are lost.

Some file systems, likeUFS-derived file systems used by theSolaris operating system andBSDs, provide asnapshot feature that prevents[citation needed] 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.[3]

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|LogiEnd2048  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# dfFilesystem           1K-blocks      Used Available Use% Mounted on/dev/sda2             70332412   8044540  62283776  12% /nilfs/dev/sda2             70332412   8044540  62283776  12% /nilfs-cp

Features

[edit]

NILFS provides continuous snapshotting. In addition to the 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.

Continuoussnapshotting is not provided by most file systems, including those supporting point-in-time snapshotting (e.g.Btrfs)

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 for making 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, referred to as NILFS2. NILFS2 implements online garbage collection to reclaim disk space while 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 theyear 2038 problem.

Current status

[edit]

Issues

[edit]

As of 2023, NILFS lacks a dedicated consistency checking utility (fsck), and thus can't recover from severe errors that cause it to fail to find a valid checkpoint.[4][5]

Supported features

[edit]
  • BasicPOSIX 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
  • BackgroundGarbage 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 thanpage size (e.g. 1KB or 2KB)
  • Online resizing (since Linux-3.x and nilfs-utils 2.1)
  • Related utilities (by contribution of Jiro SEKIBA)

Additional features

[edit]
  • Fast write and recovery times
  • Minimal damage to file data and system consistency on hardware failure
  • Internal data is processed in 64-bit wide word size
  • Can create and store huge files (8EiB)

Compatibility

[edit]

NILFS is available in variousGNU/Linux distributions likeArch Linux,[8]Debian[9] (since version 5.0),Fedora,Gentoo,[10]Linux Mint,NixOS,Ubuntu (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 onPrRescue.

It is also supported by partition-editing applications likeGParted.[11]

A separate,BSD licensed implementation, currently withread-only support, is included inNetBSD.[12]

Relative performance

[edit]

In the January 2015 presentationSD cards andfile systems forembedded systems atLinux.conf.au, it was stated:[13]

If you've got a workload that's latency sensitive, you might want to use NILFS. If you've got one that's throughput sensitive, you might want to useF2FS.

— Peter Chubb

NILFS2 works much better for the lots of small files case than F2FS or EXT4.

— Peter Chubb

License

[edit]

The NILFS2 file system utilities are made available under the GNU General 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

[edit]

The Japanese primary authors and major contributors to thenilfs-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[14]
  • Dan McGee
  • David Arendt
  • David Smid
  • dexen deVries
  • Dmitry Smirnov
  • Eric Sandeen
  • Jiro SEKIBA
  • Matteo Frigo
  • Hitoshi Mitake
  • Takashi Iwai
  • Vyacheslav Dubeyko

See also

[edit]

References

[edit]
  1. ^"NILFS Current Status".
  2. ^"BTRFS and NILFS [LWN.net]".
  3. ^"An article about NILFS". Retrieved2008-07-28.
  4. ^Corrupted NILFS2 partition (/var) - Opinions on a better FS for /var?
  5. ^Kernel archives: Can't mount nilfs - error searching super root.
  6. ^the NILFS version 1: overview
  7. ^does not verify:Re: Does nilfs2 checksum all data?; kernel 4.4.38-v7+ does not verify, too.
  8. ^"Arch Linux - nilfs-utils 2.2.9-1 (X86_64)".
  9. ^"Debian -- Details of package nilfs-tools in bullseye".
  10. ^"Sys-fs/Nilfs-utils – Gentoo Packages".
  11. ^"GParted -- Features".
  12. ^NiLFS(2) source commit
  13. ^Peter Chubb."SD cards and filesystems for embedded systems". Linux.conf.au.
  14. ^https://www.complang.tuwien.ac.at/Diplomarbeiten/rohner18.pdf[bare URL PDF]

External links

[edit]
Disk and
non-rotating
Optical disc
Flash memory andSSD
host-sidewear leveling
Distributed parallel
NAS
Specialized
Pseudo
Encrypted
Types
Features
Access control
Interfaces
Lists
Layouts
Retrieved from "https://en.wikipedia.org/w/index.php?title=NILFS&oldid=1265872217"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp