Introduction to File System in Linux
File system is an important issue for any operating system. We can see that every operating system gicves us the freedom of choice to get a file system which will be suitable for the particular use. On linux we can find different 93 types of file systems which can be used for our server. Every file system have it’s particular characteristics, features and use.
On linux we can run different file system on a single operating system, but for this we have to apply the file system on different partition of our hard disk. So first we need to know how to create different partition on our operating system.
So, let’s learn how to create a partition before know more about the file system. On linux we need to learn few commands to make a new partition. First let’s find out the physical device address we have, for that we need to run the below command
We will get the below reply from the server. At the beginning of the result we can find out the name of our hard disk.
As we can see that our device name is sda. So to create a new partition we need to run the below command.
#fdisk –cul /dev/sda
After pressing enter we will get into a consol where we have to follow some instructions to complete this work. To get help we need to press m and then press enter.
We will get a list of instructions from here.
To create a new partition we need to press n and then press enter. Here the consol will ask for a simple choice to make a primary partition or an extended partition. Here we will create a extended partition. So press e and then press enter.
From here we will get to choice the partition size also the beginning and the ending of the partition. Usually we will choice the beginning as it is. Now suppose we will create a 200 MegaByte partition. So we need to put +200M and than press enter.
Once the partition is created then we need to give a file system for that partition to operate. So at this stage we need to press t and find out the partition number where we wanted to put required file system.. Once the it is done then we can put the file system number and then press enter.
After that we need to press w and then press enter.
After that it is recommended to reboot the server.
There are very few familiar formats usually used on linux partition these are:
Extended: hex number is 5
linux : hex number is 83
LVM: hex number is 8e
Well it is better to know few more formats which might be used in linux server. So lists of file formats are given below with a very necessary explanation.
Ext2 – most widely used file system in linux platform. This format was designed in such a way so that it can be extended with small effort.
Ext3- journaling has been added to the ext2 and made a better improved version named ext3.
Ext4 – ext4 is a bit more improved version of ext3 with indexing and journaling.
JFS- journaling file system is used instead of extended format. This is a better version of ext4 which have a stable and more sped with little resource than ext4.
XFS – this is almost alike JFS, but the read write speed is more than JFS.
BTRFS – basic features of this file system is easy to administrate, repair system, large storage support and fault tolerance. This system is still under development. Mostly used in research purpose.
ISO9660 – this is an iso file mounting system mostly used in online iso mount or online booting system.
ReiserFS – the basic feature of this file system is to extend dynamically depending on demand. But the pack or proper support from the community this file system is almost out of market.
MSDOS – this file system is used to have a compatible environment with FAT file system.
Vfat – this file system supports FAT32 format of windows which supports a bigger storage.
Nfs – network file system is mostly used to share resources, but we can share file and folders without having an actual file format.
Smbfs – another network file system but the improved features of this file system is that this file system can help sharing resources on a cross platform like windows and linux.
NTFS – this file system also supported by Linux using a 3rd party tool. This is one of the most stable and advanced file systems for Microsoft system.