Integrating LVM with Hadoop and providing Elasticity to DataNode


  • Hadoop installed
  • Two disks

The way to create LVM goes as below:

Step 1: Create physical volume.

pvcreate /dev/xvdg

Step 2: Create volume group.

vgcreate myvg /dev/xvdg

Step 3: Create LVM.

lvcreate --size 2G --name lv1 myvg

Step 4: format the LVM partition

mkfs.ext4 /dev/myvg/lv1

Step 5:mount the LVM partition

mount /dev/myvg/lv1 /dn
Hadoop hdfs cluster report

Extend the LVM as follows:

lvextend --size +1.5G /dev/myvg/lv1
Hadoop hdfs cluster report

Steps to do so are as follows:

Step 1: list all the block storage


Step 2: Create the physical volume

pvcreate /dev/xvdf

Step 3: Extend the volume group

vgextend myvg /dev/xvdf

Step 4: Extend the LVM partition

lvextend --size +5G /dev/myvg/lv1

Learning Practicing Exploring