Contributing Specified Amount of Storage
Task Description:
- Adding the external Hard disk to the Datanode.
- To create the partition of the added device in Datanode.
- Format the partition at Datanode.
- Mount the partition to the folder.
- configure Namenode and Datanode.
- Checking the contribution storage of datanode in the dfs of the Hadoop cluster.
DATA NODE
pubic ip : 65.0.55.124P
private : 172.31.45.63
NAME NODE
public ip : 13.127.64.219
private ip : 172.31.44.17
Step 1: Adding the external Hard disk to the Datanode.
Creating the volume of the ebs with volume type of gp2 with the size of 1 GB in the availability zone of ap-south-1a because the instance is also launched in ap-south-1a.
Volume is created with name Data_node-volume with the size of 1 GB and it is not inuse.
Attach Volume to the instance of the datanode of the device
Now volume is inuse it is attacted to the instance of the datanode.
And checking the same from the cli with the command fdisk
#fdisk -l
2.To create the partition of the added device in Datanode.
-To go inside the device of /dev/xvdf with following the command
#fdisk /dev/xvdf
- Entered n to the create the new partition and entered p to create the primary partition and create the partition with the size of 512 Mb and entered w to save the partition.
Checking the create partition with fdisk command
To load Driver for Partition by running the following command.
#udevadm settle
3.Format the partition at Datanode.
Formatting the partition by following command
#mkfs.ext4 /dev/xvdf1
4.Mount the partition to the folder.
Creating the folder by the mkdir command
#mkdir dn1
Checking the attached folder by the df -h command of the storage
#df -h
5.configuring Namenode and Datanode.
Finally contributed the specifed storage to the hadoop cluster