SquashFS

from Wikipedia, the free encyclopedia

SquashFS ( .sfs or .sqfs ) is a developed by Phillip Lougher, free ( GPL ), compressed file system for GNU / Linux - operating systems , which is only readable. SquashFS compresses files , inodes and directories , and supports block sizes of up to 1 Mebibyte for better compression  . It is accessed via a kernel module , as a virtual file system .

Technical details

SquashFS is a universal, read-only file system that stores all files in a file container, similar to e. B. tar .gz archive, saves. Accesses are decompressed at runtime and thus it can be used, among other things, in live systems or in applications in which only a small storage capacity, such as B. in embedded systems is present.

Deflate ( zlib ) is used by default for data compression , with support for the Lempel-Ziv-Markow algorithm (LZMA), which allows better compression ratios.

  • Squashfs saves the complete user and group identification (UID / GID) and the time of the file creation.
  • Theoretically, files up to 16  exbibytes (  bytes) are supported.
  • Inode and directory data are heavily compressed. Each inode has an average length of 8 bytes. The exact length varies with the file type, e.g. B. Directory, symbolic link, etc.
  • SquashFS can be used with block sizes up to 1 MiB (default value 128  KiB ). The larger the block size, the higher the compression rates.
  • Files that exist multiple times are only saved once.
  • Big and little endian architectures are supported.

There is a set of tools for SquashFS, the squashfs-tools , which include mksquashfs (for creating a file system) and unsquashfs , among others . The tools can be used to create a SquashFS container from an existing directory tree, which is for example on a regular hard drive with an ext4 file system, or vice versa, the files can be extracted from a SquashFS container that has been created.

SquashFS is often used together with UnionFS in order to unite several logical file systems at runtime: The original files, which can only be read, come from SquasFS, while changes to them are stored in UnionFS. In combination, this also enables write access and permanent storage of files.

history

The first version (1.0) was published on October 23, 2002. Efficient handling of sparse files was added with version 3.3 . After the SquashFS developers had already tried several times to include the file system in the Linux kernel, version 4 of the SquashFS code finally found its way into version 2.6.29 of the kernel published on March 23, 2009, after Linus Torvalds failed its widespread usage. Version 4.3 from May 12, 2014 and version 2.6.29 and higher is currently integrated in the Linux kernel.

See also

  • CramFS , an older, simpler, comparable file system

Web links

Individual evidence

  1. Official Squashfs LZMA. Retrieved November 21, 2011 .
  2. a b Phillip Lougher: [ANN] Squashfs 3.3 released. 1.2. Sparse files are now supported. November 5, 2007, accessed November 21, 2011 .
  3. Thorsten Leemhuis: Kernel-Log - What 2.6.29 brings: Btrfs, SquashFS, Ext4 without journal and new storage drivers. Pumpkin file system. In: heise online. March 10, 2009, p. 2 , accessed November 21, 2011 .