Filesystem

From Hackepedia
Jump to: navigation, search

A filesystem is a subsystem of a UNIX system. It is built on top of secondary storage devices but not limited to that and can also be built on top of primary storage devices (RAM) or be an entirely virtual filesystem. A UNIX system cannot operate without bootstrapping itself and programs from the filesystem.

All filesystems available in a UNIX system are mounted in a tree hierarchy that starts with the root filesystem at the top and branches out to other filesystems toward the branches. The structure of the entire filesystems tree is made up of directories with files, character devices, block devices, sockets and symlinks making up the branches along the tree. From the root to the farthest branch from the root only 1023 bytes may be spanned in writing the path delimited by '/' characters, between the '/' characters a directory or file may only be up to 255 bytes long.

/
/bin
/sbin
/etc
/etc/X11
...
/usr
/usr/bin
/usr/sbin
...
/usr/local
/usr/local/bin
/usr/local/sbin
/mnt
/tmp
/dev


To view files in a filesystem the command ls is used, to view mounted filesystems the mount command is used, to see properties about filesystems one would use df.


List of filesystems available in UNIX and UNIX-like Operating Systems


Berkeley Fast File System (FFS)

The ffs filesystem was written at UCB by Marshall Kirk McKusick for 4.2BSD. It is still widely used in the BSD family of Operating Systems. Later development of this filesystem allows snapshotting.

Bind File System (bindfs)

This is the Linux version of the Null filesystem.

Device File System (devfs)

(From the FreeBSD manpage) The device file system, or devfs, provides access to kernel's device namespace in the global file system namespace. The conventional mount point is /dev.

Ext2 File System (ext2fs)

This is the original Linux filesystem. It was buggy and rumours have it some people lost a lot of important data on these. It is supported by some BSD's which have written a free licensed version of this implementationl.

Ext3 File System (ext3fs)

Is basically ext2, but with journalling on the metadata. This made this filesystem the default for a long time.

Hammer File System

This is the filesytem on DragonFlyBSD and was written by Matt Dillon. It supports snapshotting and is supposed to be used as a distributed filesystem.

Kern File System (kernfs)

(from the NetBSD manpage) The filesystem includes several regular files which can be read, some of which can also be written. The contents of the files is in a machine- independent format, either a string, or an integer in decimal ASCII. Where numbers are returned, a trailing newline character is also added.

Memory File System (mfs)

The mfs filesystem resides in RAM but is available as a file system. When the system powers off any files left in the mfs filesystem will vanish.

Null File System (nullfs)

(from the manpage on FreeBSD) The mount_nullfs utility creates a null layer, duplicating a sub-tree of the file system name space under another part of the global file system namespace. This allows existing files and directories to be accessed using a different pathname.

Network File System

nfs was developed at Sun Microsystems and implemented in most other free UBO's. Most support is for version 2 and 3, with some support for version 4.

Proc File System (procfs)

The procfs filesystem is a filesystem that represents the process namespace of a system. You can see all processes listed here and when you change into the directories of the processes and list further attributes about the specific process.

Reiser File System (ReiserFS)

This is a filesystem written and architected by a man named Hans Reiser. Development will is stalled since Hans Reiser was found guilty of murdering his wife even though her body was never found.

Tmp File System

This is the Solaris version of the memory file system.

Union File System (unionfs)

Union filesystem is found on all BSD's except OpenBSD which removed it due to bugs. This filesystem stacked a filesystem on top of another filesystem and showed files below and above. One could read and executes files from the lower filesytem and when any files would change it would copy the new overlaying file on the upper filesytem.

Unix File System (ufs)

Most UNIX'es have the ufs filesystem it is derived from the Berkeley ffs filesystem.

X File System (xfs)

(From OpenBSD's mount_xfs manpage) The xfs filesystem was written primarily to make a free, AFS-compatible filesystem (Arla). But since the xfs interface is simple and generic it could be used for other filesystems as well.

Z File System (zfs)

A filesystem written at Sun Microsystems that allows snapshotting and cloning of a zfs filesystem.