Create a File system

Device recognition

First, when we add a new disk, we should be able to see it with the following command:

Partition Creation

After that we have to create a partition for that device using the same command, a device can have 4 primary partitions and many more extended partitions. Here we will create a primary partition for device /dev/sdh

We can see now that the partition has been created

Volume Group Creation

After we have physical partition, we can create a volume group (e.g. group of physical volumes)

Logical Volume and File system creation

After we have the physical Volume we can start slicing it into pieces called Logical Volumes as follows:

Logical Volume

We can also display the stats of the newly created logical volume with:

File System

Once the logical volume is created, we can create a file system on it. There are two main types of file systems:

Journal File systems: ext3, ex4

Non-Journal: ext2

We will create a journal file system to prevent from corruption in case of a power outage.

Once the file system is created we can mount, but before that we have to edit the /etc/fstab, indificated what and where we mount it:

Mount of the file system

Once the file system is created and the /etc/fstab file edited as mentioned above, we can MOUNT the file system as follows: