Cloop
   HOME

TheInfoList



OR:

The compressed loop device (cloop) is a
module Module, modular and modularity may refer to the concept of modularity. They may also refer to: Computing and engineering * Modular design, the engineering discipline of designing complex devices using separately designed sub-components * Modul ...
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 ope ...
. It adds support for transparently decompressed, read-only
block devices In Unix-like operating systems, a device file or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow ...
. It is not a compressed
file system 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 ...
: cloop is mostly used as a convenient way to compress conventional file systems onto
Live CD A live CD (also live DVD, live disc, or live operating system) is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading fro ...
s. Cloop was originally written for the
Levanta Levanta (previously Linuxcare) was a company based in San Mateo, California, United States, that created products for Linux management and data virtualization. Company history Linuxcare was founded in San Francisco in 1998 by Dave Sifry, Arthur T ...
Bootable Business Card by
Rusty Russell Rusty Russell is an Australian free software programmer and advocate, known for his work on the Linux kernel's networking subsystem and the Filesystem Hierarchy Standard. Software development Russell wrote the packet filtering systems ip ...
, but is now maintained by
Klaus Knopper Klaus Knopper (born 1968 in Ingelheim) is a German electrical engineer and free software developer. Knopper is the creator of Knoppix, a well-known live CD Linux distribution. He received his degree in electrical engineering from the Kaiserslaute ...
, the author of
Knoppix KNOPPIX ( ) is an operating system based on Debian designed to be run directly from a CD / DVD (Live CD) or a USB flash drive (Live USB), one of the first live operating system distributions (just after Yggdrasil Linux). Knoppix was developed b ...
. A compression ratio of about 2.5:1 is common for software. The Knoppix cloop image, for example, is 700 MB compressed and around 1.8 GB uncompressed.


Design

cloop images contain: * A
shell script A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manip ...
(with mount commands for the image) * A header with the number of blocks and the uncompressed block size * A seek index with compressed and uncompressed block sizes in pairs *
zlib zlib ( or "zeta-lib", ) is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also a ...
-compressed data blocks, packed end-to-end The data blocks are compressed separately; this makes it possible to seek to individual blocks without having to decompress the entire image from the start, but at the cost of slightly reducing the compression ratio. Live CD images typically use a block size of 256 KB as a compromise between decompression speed and space-efficiency. Apple uses a similar file format in the compressed variant of its DMG disk images.


Limitations

The design of the cloop driver requires that compressed blocks be read whole from disk. This makes cloop access inherently slower when there are many scattered reads, which can happen if the system is low on memory or when a large program with many shared libraries is starting. A big issue is the seek time for CD-ROM drives (~80 ms), which exceeds that of hard disks (~10 ms) by a large factor. On the other hand, because files are packed together, reading a compressed block may thus bring in more than one file into the cache. The effects of tail packing are known to improve seek times (cf.
reiserfs ReiserFS is a general-purpose, journaling file system initially designed and implemented by a team at Namesys led by Hans Reiser and licensed under GPLv2. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file syste ...
,
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 ...
), especially for small files. Some performance tests related to cloop have been conducted. 31-Dec-2011


See also

*
loop device In Unix-like operating systems, a loop device, vnd (vnode disk), or lofi (loop file interface) is a pseudo-device that makes a computer file accessible as a block device. Before use, a loop device must be connected to an extant file in the file sys ...
*
Cramfs The compressed ROM/RAM file system (or cramfs) is a Free software, free (GNU General Public License, GPL'ed) read-only Linux kernel, Linux file system designed for simplicity and space-efficiency. It is mainly used in embedded system, embedded an ...
*
SquashFS Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is al ...
*
e2compr The ext2 or second extended file system is a file system for the Linux kernel (operating system), kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been design ...


References

{{reflist


External links

* cloo
sources
against the mainline Linux kernels and
patch
to support any known cloop format. Note: versions 0.xx are for kernel 2.2; 1.xx are for kernel 2.4; 2.xx are for kernel 2.4 and 2.6.
cloop at Knoppix Linux Wiki
(installation instructions are here) * Slides from a LinuxTa
presentation
by Klaus Knopper on the implementation of cloop (in German). *
fuse
driver for cloop with
patchdescription
to support any known cloop format and th
binary
Knoppix Compression file systems Third-party Linux kernel modules