Compressed ROM filesystem
0. Contents
This is the documentation of cromfs-1.0.0.
1. Purpose
Cromfs is a compressed read-only filesystem for Linux. Cromfs is intended
for permanently archiving gigabytes of big files that have lots of redundancy.
In terms of compression it is much similar to
7-zip files, except that practical
realtime access can be provided for the whole archive contents; the user
does not need to launch a program to decompress a single file, nor does
he need to wait while the system decompresses 500 files from a 1000-file
archive to get him the 1 file he wanted to open.
The creation of cromfs was inspired
from
Squashfs
and
Cramfs.
2. Overview
- Data, inodes and directories are stored compressed
- Duplicate inodes, files and even duplicate file portions are detected and stored only once
- Especially suitable for gigabyte-class archives of
thousands of nearly-identical megabyte-class files.
- Files are stored in solid blocks, meaning that parts of different
files are compressed together for effective compression
- All inode types recognized by Linux are supported. This includes
also the fifo, devices and symlinks.
- The LZMA compression is used.
In the general case, LZMA compresses better than gzip and bzip2.
- As with usual filesystems, the files on a cromfs volume can be accessed
in arbitrary order; the waits to open a specific file are small, despite
the files being semisolidly archived.
3. Limitations
- Filesystems are write-once, read-only. It is not possible to append
to a previously-created filesystem, nor it is to mount it read-write.
- Max filesize: 2^64 bytes (16777216 TB), but 256 TB with default settings.
- Max number of files in a directory: 2^30 (smaller if filenames are longer, but still more than 100000 in almost all cases)
- Max number of inodes (all files, dirs etc combined): 2^60, but depends on file sizes
- Max filesystem size: 2^64 bytes (16777216 TB)
- There are no "." and ".." entries in directories.
- mkcromfs is slow. You must be patient.
- The cromfs-driver has a large memory footprint.
It is aimed for desktop and server environments, but not embedded.
- Ownerships are not saved.
Development status: Pre-beta. The Cromfs project has been created
very recently and it hasn't been yet tested extensively. There is no
warranty against data loss or anything else, so use at your own risk.
4. Comparing to other filesystems
This is all very biased, hypothetical, and by no means
a scientific study, but here goes:
Feature |
Cromfs |
Cramfs |
Squashfs (3.0) |
Compression unit |
adjustable (1 MB default) |
4 kB |
adjustable (64 kB max) |
Files are compressed |
together (up to block limit) |
individually |
individually |
Maximum file size |
16 EB |
16 MB |
16 EB |
Duplicate whole file detection |
Yes |
No (but hardlinks are detected) |
Yes |
Near-identical file detection |
Yes (identical blocks) |
No |
No |
Compression method |
LZMA |
gzip |
gzip |
Ownerships |
not saved
| saved (but gid truncated to 8 bits)
| saved
|
Endianess-safety |
works on little-endian only |
safe, but not exchangeable |
safe |
Kernelspace/userspace |
user (fuse) |
kernel |
kernel |
5. Getting started
- Install the development requirements: make, gnu-c++, fuse and openssl-dev
- Compile: Command "make" to build "cromfs-driver" and "util/mkcromfs"
- Create a sample filesystem:
$ util/mkcromfs . sample.cromfs
- Mount the sample filesystem:
$ mkdir sample
$ ./cromfs-driver sample.cromfs sample &
- Observe the sample filesystem:
$ cd sample
$ ls -al
- Unmounting the filesystem:
$ cd ..
$ fusermount -u sample
or, type "fg" and press ctrl-c to terminate the driver.
6. Copying
7. Requirements
- GNU make and gcc-c++ are required to recompile the source code.
- The openssl development library is required for MD5 calculation.
- The filesystem works under the Fuse
user-space filesystem framework. You need to install both the Fuse kernel
module and the userspace programs before mounting Cromfs volumes.
8. Downloading
Generated from
progdesc.php (last updated: Wed, 10 May 2006 23:30:01 +0300)
with docmaker.php (last updated: Sun, 12 Jun 2005 06:08:02 +0300)
at Wed, 10 May 2006 23:40:13 +0300