All files accessible in Linux, are arranged in one big tree: the file hierarchy, rooted at /. These files can be spread out over several devices.
File system refers to the files and directories stored on a computer. A file system can have different formats called file system types.
These formats determine how the information is stored as files and directories.
Some file system types store redundant copies of the data, while some file system types make hard drive access faster.
Wikipedia: File system
There are several ways to determine which file systems are used in the running operating system.
The fstab (or file systems table) file is a system configuration file commonly found at /etc/fstab on Unix and Unix-like computer systems. In Linux it is part of the util-linux package. The fstab file typically lists all available disk partitions and other types of file systems and data sources that are not necessarily disk-based, and indicates how they are to be initialized or otherwise integrated into the larger file system structure.
To get it, just run the command:
# cat /etc/fstab
The fstab file is read by the mount
command, which happens automatically at boot time to determine the overall file system structure,
and thereafter when a user executes the mount command to modify that structure.
The mount command attaches a filesystem, located on some device or other, to the file tree. Conversely, the umount command will detach it again.
The standard form of the mount command is:
# mount -t type device dir
This tells the kernel to attach the filesystem found on device (which is of type type) at the directory dir.
The following command lists all mounted filesystems:
# mount
The umount
command detaches the specified file system(s) from the file hierarchy.
A file system is specified by giving the directory where it has been mounted.
# umount dir
For more information just run command:
# man mount
Another way to find out what file systems are in use at the moment is to call the df command. Call with -T option additionaly print file system type.
# df -T
# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/mapper/cl-root xfs 8374272 4202560 4171712 51% / devtmpfs devtmpfs 497496 0 497496 0% /dev tmpfs tmpfs 508184 0 508184 0% /dev/shm tmpfs tmpfs 508184 7096 501088 2% /run tmpfs tmpfs 508184 0 508184 0% /sys/fs/cgroup /dev/vda1 xfs 1038336 280616 757720 28% /boot tmpfs tmpfs 101640 0 101640 0% /run/user/0
tmpfs
tmpfs is the name of a temporary file system used on many Unix-like filesystems.
It is mounted and structured like a disk-based filesystem, but resides in volatile memory space, similar to a RAM disk.
This means that all the content in tmpfs is temporary in the sense that it’s not permanently written to the disk and in case the tmpfs is unmounted, the system is rebooted or the power is cut all content will be lost.
Mount options for tmpfs:
# man mount
for the search press / type for tmpfs then press Enter
xfs
xfs is a 64-bit, journaled filesystem developed by Silicon Graphics, Inc.
It was the default filesystem in IRIX for many years, and has also been ported to the Linux kernel.
xfs excels at parallel I/O, data consistency, and overall filesystem performance. It is well suited for real-time applications, due to a unique feature which allows it to maintain guaranteed data I/O bandwidth.
Today xfs is supported by most Linux distributions and has now become the default filesystem on RHEL (Red Hat Enterprise Linux), Oracle Linux 7, CentOS 7 and many other distributions. Originally XFS was created to support extremely large filesystems with sizes of up to 16 exabytes and file sizes of up to 8 exabytes.
Mount options for xfs:
# man mount
for the search press / type for xfs then press Enter
Wikipedia: XFS
> df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on devtmpfs devtmpfs 500352 0 500352 0% /dev tmpfs tmpfs 507652 0 507652 0% /dev/shm tmpfs tmpfs 507652 2064 505588 1% /run tmpfs tmpfs 507652 0 507652 0% /sys/fs/cgroup /dev/vda1 btrfs 10005504 4782676 4238188 54% / /dev/vda1 btrfs 10005504 4782676 4238188 54% /usr/local /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/mariadb /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/machines /dev/vda1 btrfs 10005504 4782676 4238188 54% /home /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/log /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/libvirt/images /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/spool /dev/vda1 btrfs 10005504 4782676 4238188 54% /tmp /dev/vda1 btrfs 10005504 4782676 4238188 54% /opt /dev/vda1 btrfs 10005504 4782676 4238188 54% /boot/grub2/x86_64-efi /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/opt /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/tmp /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/pgsql /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/mysql /dev/vda1 btrfs 10005504 4782676 4238188 54% /boot/grub2/i386-pc /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/crash /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/cache /dev/vda1 btrfs 10005504 4782676 4238188 54% /srv /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/named /dev/vda1 btrfs 10005504 4782676 4238188 54% /var/lib/mailman tmpfs tmpfs 101532 0 101532 0% /run/user/1000
tmpfs
See description in section CentOS 7
btrfs
Btrfs is a copy-on-write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair, and easy administration.
By default, openSUSE is set up using Btrfs and snapshots for the root partition. Snapshots allow you to easily roll back your system if needed after applying updates, or to back up files.
Mount options for btrfs:
> man mount
for the search press / type for btrfs then press Enter
Wikipedia: Btrfs
openSUSE > Wiki > SDB:BTRFS
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on udev devtmpfs 484032 0 484032 0% /dev tmpfs tmpfs 101372 3528 97844 4% /run /dev/sda1 ext4 10253588 4714784 4998236 49% / tmpfs tmpfs 506848 0 506848 0% /dev/shm tmpfs tmpfs 5120 4 5116 1% /run/lock tmpfs tmpfs 506848 0 506848 0% /sys/fs/cgroup tmpfs tmpfs 101368 4 101364 1% /run/user/111 tmpfs tmpfs 101368 0 101368 0% /run/user/1000
tmpfs
See description in section CentOS 7
ext4
The ext4 filesystem is an advanced level of the ext3 filesystem which incorporates scalability and reliability enhancements for
supporting large filesystem.
Mount options for ext4:
$ man mount
for the search press / type for ext4 then press Enter
Wikipedia: Ext4