NILFS for Ubuntu

This page will explain how to install the NILFS kernel module and its user-land tools (including utilities and administrative tools) to Ubuntu Linux with the APT package manager.

Part of NILFS packges are available on official apt repositories (available for IntrepidIbex).

The following instructions show how to install unofficial packages from the APT repository served in this site. Though the examples below are described using standard APT tools, equivalent tools such as aptitude or GUI-based package managers are also available.

Supported Ubuntu releases

The following releases are supported.

The userland tool package is available for other releases, whereas the kernel module package depends on kernel versions. Installation against incompatible kernels (i.e. kernels with different version or ABI number) will fail. Then, you may fail to install if using an old kernel.

Kernels on backport packages (e.g. gutsy-backports) are not supported.

APT configurations to install packages from this site

The following two preparations are required before installing packages.

The URL of the apt repository is as follows,

And the component name in the apt line is ``main''. The apt lines that should be added to /etc/apt/sources.list will become as follows,

 deb http://www.nilfs.org/pub/ubuntu hardy main
 deb-src http://www.nilfs.org/pub/ubuntu hardy main

For the gutsy, replace the keyword ``hardy'' with ``gutsy''.

In order to obtain and install the gpg public key, use gpg commands and apt-key as follows,

 $ gpg --keyserver hkp://subkeys.pgp.net --recv-keys 38CC8C3FEDB80C09
 ...
 $ gpg --export -a 38CC8C3FEDB80C09 | sudo apt-key add -
 OK
 $ sudo apt-key list
 ...
 pub   1024D/EDB80C09 2008-03-21 [expires: 2011-03-21]
 uid                  NILFS Archive Automatic Signing Key 
 sub   1024g/C02671F0 2008-03-21 [expires: 2011-03-21]

Without installing the gpg public key, you will see some warnings when updating package database.

For more details on the GnuPG, please refer to http://gnupg.org/

Installing userland tools

Install nilfs2-utils package as follows,

 $ sudo apt-get update
 $ sudo apt-get install nilfs2-utils

If you install it from the official repository, specify nilfs2-tools instead of nilfs2-utils.

Installing kernel module

This can be done by installing the nilfs2-modules package whose version number matches the target kernel.

 $ sudo apt-get install nilfs2-modules
 Reading package lists...
 Building dependency tree...
 Reading state information...
 Package nilfs2-modules is a virtual package provided by:
   nilfs2-modules-2.6.24-14-xen 2.6.24-14.1
   nilfs2-modules-2.6.24-14-server 2.6.24-14.1
   nilfs2-modules-2.6.24-14-openvz 2.6.24-14.1
   nilfs2-modules-2.6.24-14-generic 2.6.24-14.1
   nilfs2-modules-2.6.24-14-386 2.6.24-14.1
   nilfs2-modules-2.6.24-13-xen 2.6.24-13.1
   nilfs2-modules-2.6.24-13-server 2.6.24-13.1
   nilfs2-modules-2.6.24-13-generic 2.6.24-13.1
   nilfs2-modules-2.6.24-13-386 2.6.24-13.1
   nilfs2-modules-2.6.24-12-xen 2.6.24-12.3
   nilfs2-modules-2.6.24-12-server 2.6.24-12.3
   nilfs2-modules-2.6.24-12-generic 2.6.24-12.3
   nilfs2-modules-2.6.24-12-386 2.6.24-12.3
 You should explicitly select one to install.
 E: Package nilfs2-modules has no installation candidate
 $ uname -r
 2.6.24-14-generic
 $ sudo apt-get install nilfs2-modules-2.6.24-14-generic
 ...

You likely want to make the APT follow kernel changes automatically. In that case, use a meta package like nilfs2-modules-<flavour> instead.

 $ sudo apt-get install nilfs2-modules-generic
 Reading package lists...
 Building dependency tree...
 Reading state information...
 The following extra packages will be installed:
   nilfs2-modules-2.6.24-14-generic
 The following NEW packages will be installed:
   nilfs2-modules-2.6.24-14-generic nilfs2-modules-generic
 0 upgraded, 2 newly installed, 0 to remove and 55 not upgraded.
 Need to get 0B/88.0kB of archives.
 After this operation, 303kB of additional disk space will be used.
 Do you want to continue [Y/n]? y
 ...

If you are using NILFS built from the original source package, uninstall it before installing the deb package. This can be performed by make uninstall,

 $ cd (working directory)/nilfs-2.0.2
 $ sudo make uninstall

You can verify which NILFS module is enabled by using modinfo command; if the installed NILFS module comes from a deb package, its installation path shall include ubuntu/fs/nilfs2 as shown in the filename: line.

 $ modinfo nilfs2
 filename:       /lib/modules/2.6.24-14-generic/ubuntu/fs/nilfs2/nilfs2.ko
 license:        GPL
 version:        2.0.2
 description:    A New Implementation of the Log-structured Filesystem (NILFS)
 author:         NTT Corp.
 srcversion:     C99C753763F9B0F7E9EDCC2
 depends:        
 vermagic:       2.6.24-14-generic SMP mod_unload 586

Updating NILFS packages

You can upgrade installed NILFS packages as usual.

 $ sudo apt-get update
 $ sudo apt-get dist-upgrade

When upgrading a kernel module in use, you should reboot the system after installation, or unmount all NILFS partitions before upgrading.