🔅Integrating LVM with Hadoop and providing Elasticity to Data-Node Storage !!

According to google:
LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.
So what are we going to do?
We are going to use LVM with root storage and increase the size of slave node on the go i.e., without unmounting , removing or without creating using new hard-disk.
Step1:
we have attached an external hard disk sdb of 8GB.

>>Let me show you guys my initial space provided by Data Node.

STEP2:
Creating a physical volume from the sdb hard disk.
>> pvcreate /dev/sdb


STEP3:
We are adding this physical volume to the pre-existing RHEL volume group as we want to make an elastic storage in Root directory.


Now we have sdb attached to our sda which can be used to increase the size of the datanode as per the requirement.
STEP4:
Now we adding Volume group to the Root-LVM storage.


STEP5:
As we can see above #df -h command does not show the storage increased above as we need to format it but here the important thing is we are going to use the resize command which will only format the later extended part of storage (5G) rest data won’t be affected.

STEP6:
Checking the storage provided by Data Node.
As we can see 5GB is Dynamically Increased
