NILFS - A New Implementation of the Log-structured File System for Linux
========================================================================

What is NILFS?
--------------

NILFS is a new implementation of the log-structured file system for the
Linux 2.6 operating system.  The conventional features of log-structured
file systems (LFS) are a high write performance and faster recovery
time.  In addition, LFS prevents data write operations from overwriting
the disk blocks, thereby minimizing damage to file data and system
consistency on hardware failure.  Furthermore, the LFS writes data and
meta-data in the correct order which helps ensure consistency in the
entire file system.  LFS can instantaneously create a file system
snapshot and check the file system speedy.  We implemented ``NILFS''
using modern technology: For example, the file and inode blocks are
managed by a B-tree structure, internal data are processed in 64 bit
wide word size.  The B-tree structure enables ``NILFS'' to create and
store huge files.  

NILFS will be freely-distributable Open Source software, will be
released under the GNU GPL.

Prerequisites
-------------

Make sure you have all the following installed:

- Linux 2.6.10~2.6.17
  The kernel should be used on the build machine, and it should be
  compiled from the source.  The source tree which was used to build 
  the kernel is also required.
- GCC
- GNU Make
- GNU Binutils
- Development install of the uuid library (e.g., e2fsprogs-devel or
  uuid-dev)
- the proc kernel module
- the CRC32c kernel library module

This program was tested on some i386-architecture machines (e.g.,
Pentium-3 or Pentium-4 with Hyper Threading Technology).  It may cause
problems on other architectures.

Installation
------------

1. Get the source package for NILFS

2. Compile and install the kernel module

   % cd fs
   % make
   # make install
   (you should run "make reinstall" if you have already installed)

   The file "/lib/modules/`uname -r`/kernel/nilfs/nilfs.ko" may be
   created.

3. Compile and install the format program

   % cd newfs
   % make
   # make install

   The file "/sbin/mkfs.nilfs" may be created.

4. Format a disk partition for a new NILFS file system, and mount it

   e.g.
   # mkfs -t nilfs /dev/sda2
   # mkdir /nilfs
   # mount -t nilfs /dev/sda2 /nilfs

5. The inspect program and how to mount your checkpoint

   The 'inspect' subdirectory contains a program to examine internal of
   the filesystem instance.  You can install the program by executing
   "make; make install" (administrative privilege is required).

   The inspect requires a device name as an argument.  You can get the
   block numbers of the checkpoints of the NILFS file system by typing
   "listcp" to the command prompt of the program.  The block numbers can
   be used to mount the checkpoint of your file system.  The file system
   will be mount as read-only file system, and you can use the read-only
   checkpoint and the read-write file system simultaneously.

   # 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
   # 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

Good luck!

-- The NILFS Development Team, NTT Laboratories

Copyright (C) 2005, 2006 Nippon Telegraph and Telephone Corporation.

README,v 1.22 2006/07/14 05:34:49 ryusuke Exp
