Linux Introduction
VI-EDITOR
Process Management
Linux Installation
Disk Partitions & File System Management
Logical Volume Management - LVM
User & Group Administration
Package Management
Network File System - NFS
Domain Naming System - DNS
Apache HTTP Web Server
KickStart Installations
FTP server
BOOT PROCESS
Dynamic Host Configuration Protocol - DHCP
Job Scheduling
File Links
Swap Management
Log Management
Performance Management
Linux Troubleshooting
Linux Summary
116 Followers
File System is a collection of files and directories on a partition or disk. These files and directories are organized as hierarchical structure in the partition or disk.
File System Types(Disk Format Types):
Below table shows differences between ext2, ext3, and ext4 File Systems
File System Mounting:-
Configuration files which is related to mounting in Linux:
Formatting a partition with ext4 filesystem
After creating a partition we need to assign some file system to it so that we can start storing the data into it. To format a partition the following syntax is used.
# mkfs.<file system type> <partition name>
#mkfs.ext4 /dev/sda1 (where sda1 is our newly created partition)
Likewise you can format the different partitions with different file systems like
#mkfs.ext3 /dev/sdb2
#mkfs.vfat /dev/sdb3Even after formatting the partition we cannot add the data into the partition. In order to add the data in the partition it is required to be mounted.
Mounting a partition
Mounting is a procedure where we attach a directory to the file system. There are two types of Mounting which will be used in Linux or any UNIX.
Temporary Mounting:
In a temporary mount point we will create a directory and mount it, but this mount point will last only till the system is up, once it is rebooted the mounting will be lost.
#mount <device name> <directory name (mount point)>
#mount /dev/sdb1 /iwayQ
To View all the mounted partitions:
#mount
#cd /iwayQ
echo "data" > /iwayQ/f1How to unmount FS:
#umount <mount-dir>
#umount /iwayq ; verify with mount cmdPermanent Mounting:
Permanent mounting procedure is exactly same like temp mounting, but here we will update the /etc/fstab file with the mounting details, so that it will be mounted even after the system is reboot.
Steps To make a permanent mount point:
Here we will be using our existing /iwayq directory as mount point which is created previously.
#vi /etc/fstab
#mount -a
You can now access the directory and add, delete or modify the contents and can also unmount the file system at any point
Sometimes a directory reflects error while unmouting, the possible causes for it are


To view the usage information of mounted partition:
To view the usage information of mounted partition use the command df –h

To view the size of a file or directory:
To view the size of the file or directory uses the command du –h file or directory name.
Assigning label to the partition:
Assigning the label is giving some name to the partition. To assign label to the partition e2label command is used
#e2label <partition name> <label>
#e2label /dev/sdb1 iwayqdisk To check the label
#e2label /dev/sdb1
To list all the mounted partition along with their labels, use mount –l command
Mounting a partition using its label:
Mounting a /dev/sdb1 partition with its label iwayqdisk
[root@iwayq]#mount LABEL=iwayqdisk /iwayqMaking a permanent mount point using label:
As we know that to make a permanent mount point, an entry has to be made in /etc/fstab file.
#vi /etc/fstab

Now use mount –a command and verify it with mount command whether it is mounted or not.
Mounting a partition permanently with its block id (UUID):
To check the uuid of a partition use blkid /dev/sdb1 command.

Now mount it with mount –a command and verify it with mount command