How to
contribute a limited amount
of storage as a slave to the cluster?

Integrating Hadoop with LVM

What is Hadoop?

What is LVM?

What is the Elasticity storage of hadoop?

Create HDFS Hadoop Cluster:

Hadoop Cluster

Create an LVM

Before creating LVM we can see new devices not mounted.

>> df -Th

Creating PV, Volume Group, and Logical Volume

>> pvcreate /dev/sdh
>> pvcreate /dev/sdi
vgcreate hadoopLVM /dev/sdh /dev/sdi
lvcreate --size 40G --name hadoopLV hadoopLVM
>> mkfs.ext4 /dev/hadoopLVM/hadoopLV
>> mount /dev/hadoopLVM/hadoopLV  /datanode/

Increase Datanode size

>> lvextend --size +<Size_to_increase>G /dev/<group_name>/<LV_name>
>> resize2fs /dev/<group_name>/<LV_name>

Decrease A Logical Volume Size

>> umount <mounted_path>
>> e2fsck  -f /dev/<group_name>/<LV_name>
>> resize2fs /dev/<group_name>/<LV_name> <sizeToFormat>G
>> lvreduce -L <sizeToReduce>G /dev/<group_name>/<LV_name>

Thanks for Reading !!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store