This topic was published by DevynCJohnson and viewed 883 times since "". The last page revision was "".
- Topics - 444
Linux has various virtual filesystems that each have a specific purpose and daemons that perform the same functions as these filesystems. Three virtual filesystems that some people do not understand or know about are specfs, devfs, and tmpfs. Then, there are some daemons that can take the place of these filesystems like udev replacing devfs.
A virtual filesystem is a filesystem on top of another filesystem. Sometimes, virtual filesystems are referred to as pseudo-filesystems. Below are some examples of virtual filesystems seen on Unix and Unix-like systems.
specfs - specfs, or Special FileSystem, is a virtual filesystem used to access special device files. This filesystem is odd compared to other filesystems in general because this filesystem does not require a mount-point, yet the OS can still use specfs. However, specfs can be mounted by the user (mount -t specfs none /dev/streams). The device files for character devices in the /dev/ directory use specfs.
devfs - devfs is a device manager in the form of a filesystem. The Device FileSystem is largely the same as specfs except for some differences in the way they function and their uses. devfs is used for most of the device files in /dev/. Most Unix and Unix-like systems use devfs including Mac OS X, *BSD, and Solaris. Nearly all Unix and Unix-like systems that use devfs place it on the kernelspace. However, Linux uses a userspace-kernelspace hybrid approach. This means the devfs virtual filesystem is on the kernelspace and userspace.
udev - This is an alternative to devfs. devfs and udev are both device managers, but devfs is a virtual filesystem and udev is not a filesystem. Rather, udev is a daemon; that is a process that runs in the background. udev exists on the userspace rather than the kernelspace or both. Some derivatives of udev include mdev and eudev which work on the same principle.
tmpfs - The Temporary filesystem is a virtual filesystem for storing temporary files. This filesystem is really in the memory and/or in the swap space. Obviously, all data on this filesystem are lost when the system is shutdown. The mount point is /tmp/.
devtmpfs - This is an improved devfs. The purpose of devtmpfs is to boost boot-time. devtmpfs is more like tmpfs than devfs. The mount-point is /dev/. devtmpfs only creates device files for currently available hardware on the local system.
initramfs - The INITial RAM FileSystem is the alternative to initrd. initramfs is a common filesystem that is used on memory. When a live-Linux system is being run, the root-filesystem may be initramfs. Some Linux kernels contain a CPIO archive file that create this virtual filesystem when the archive is uncompressed onto memory.
initrd - Initial Ramdisk is another filesystem for memory. It may be a temporary filesystem as in most Linux systems, or it could be the filesystem used on RAM by live-Linux systems.
cramfs - Embedded Linux systems cannot use initrd or other memory-filesystems. Instead, embedded Linux systems may use the Compressed RAM/ROM FileSystem. Each page of memory is compressed, but the metadata is changed in a way that saves memory without compression. The filesystem size limit is not quite 272-megabytes and files must not exceed sixteen megabytes. This is a read-only filesystem. Once the filesystem is created, it cannot be changed until the next creation time at boot-time.
SquashFS - An alternative to cramfs includes SquashFS. This filesystem compresses the inodes rather than the pages as in cramfs. This filesystem is also read-only and made during boot-up. However, there are exceptions that allow users to write and modify data on a live-Linux distro. The Ubuntu, Arch, and Fedora live-CDs are three examples of some of the Linux distros that use SquashFS for the live-distro.
UnionFS - This is a special filesystem that is mount with other filesystems. Remember, I said SquashFS is writable under special circumstances. A special concept called a union-mount can be used to mount two or more filesystems together at the same time and at the same mount point. Such filesystems are then seen as one unified filesystem. So, on live-CDs, SquashFS is union-mounted with UnionFS. This allows SquashFS to appear writable even though SquashFS is read-only.
aufs - (Version 1: AnotherUnionFS | Version 2: Advanced multi-layered Unification FileSystem). This is an alternative to UnionFS. Slax and Knoppix are two examples of live-distros that use aufs. aufs is supposedly faster and better than UnionFS.
rootfs - This term is commonly seen, but not in this form. This is the root-filesystem which can be /dev/sda0 on some systems (depending on the hardware). So, when discussing the root filesystem on a Linux operating system, it can be referred to as rootfs. In other words, rootfs is not actually a separate or special filesystem; it is just the root of your system which may use any filesystem you choose.
- The /dev/null File - http://dcjtech.info/topic/the-devnull-file/
- SysFS and ConfigFS - http://dcjtech.info/topic/sysfs-and-configfs/
- DebugFS, SecurityFS, PipeFS, and SockFS - http://dcjtech.info/topic/debugfs-securityfs-pipefs-and-sockfs/
- USBdev, usbfs, subfs, and Others - http://dcjtech.info/topic/usbdev-usbfs-subfs-and-others/
- More Filesystem Topics - http://dcjtech.info/topic/filesystems/