🌀 7.1: Elasticity Task

🔅Integrating LVM with Hadoop and providing Elasticity to DataNode Storage

steps :::

first we make hadoop cluster storage elastic means we can increase the storage in the datanode on run time by using the concept of lvm

first we start the services of name node and data node and lets see how much storage does data node give .

as we see how much storage data node give to name node.

now our next step is to increase the storage of data node so that it give more storage to name node .

so for doing this we add two more virtual harddisks in the data node .

our present harddisk to data node is this much

now we add two more virtual harddisks to the node the help of data node

we do add or not for this we check by using this command

fdisk -l

we successfully connected two harddisks

/dev/sdc of 20 gib

/dev/sdd of 20 gib

now our next step is create physical volume of both disks

by using these command

pvcreate /dev/sdc

pvcreate /dev/sdd

pv created successfully

we can also confirm by the command

pvdisplay

created .

our next step is create volume group with the help of these pv’s

with the help of this command

vgcreate vg_name /dev/sdc /dev/sdd

volume group created successfully

now we create logical volume with the help of volume group

by using lvcreate command

we successfully created lv of 20 gib

now our next step is to format the lv and mount to the /dn folder in the datanode

now let’s check whether storage of our cluster is increased or not

increased .

now do extend more the lv from vg

in vg we have 20 gib is free because in we have in vg is 40 gib and we give 20 gib to lv so almost 20 gib is free

now we check again the storage of cluster increased or not .

yes storage of cluster increased .

and our task is also done .