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

Rishabh
3 min readNov 3, 2020

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

SUMMARY:

Creating a physical volume.
1)pvdisplay /dev/sdb
2)pvdisplay /dev/sdB

To attach the new physical volume to existing Volume group i.e RHEL :: 3)vgextend <vgname> /dev/sdb

Now Extending the pre-exisiting LVM volume with a required size. 4)lvextend — size <value> /dev/rhel/root

Foramtting the extended part to use the storage.
5)fsadm resize /dev/rhel/root

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Rishabh
Rishabh

Written by Rishabh

Student from B.tech 2nd Year, A proud ARTH learner, love new technologies, Curious about many thing, likes to explore places, love eating pizza and much more.

No responses yet

Write a response