Integrating LVM with Hadoop These are the steps that are to be followed on the data node. 1. Firstly, add physical hard disks to the data node. Here I have added two hard disks. 2. Convert the hard disks to physical volume as volume groups can only be created with physical volumes. 3. We can see the info of physical volumes by using the command "pvdisplay" 4. Create a volume group with the above physical volumes. #vgcreate vg_name /disk-name1 /disk_name2... /disk_namen 5. We can use vgdisplay and vg-group_name to get the info about the volume group. 6. Create a partition in the logical volume of size that you want to contribute to the namenode. The command is "lvcreate --size <value> --name <value> vg_name" 7. Now format the partition of the logical volume. 8. Create directory you want to contribute to the namenode and mount the above logical volume to the directory. 9. Use "df -h" command to check if the logical volume is mounted to the desi...
Increasing or decreasing static partition size in Linux 1. Create a static partition. Here I have created a partition of 5Gb. 2. Now, create a partition. Here I am creating a sub-partition of 1Gb. 3. Now, format and mount the partition. I am creating a folder with the name static and mounting the partition sdd1 to it. mkfs.ext4 /dev/sdd1--> For formatting mkdir /static mount /dev/sdd1 /static --> For mounting 4. Now, Create a file in /static. Go to static using cd /static. 5. In order to increase the size of a static partition, we need to unmount it and also delete the existing partition. unmount /dev/sdd1 --> For unmounting fdisk /dev/sdd1 and then use 'd' for deleting the partition and 'w' to save the changes. 6. Create a new partition and enter the desired size you want the partition to have. I am not entering any size here, So it will take all the 5Gb from the partition I created of 5Gb i.e., /dev/sdd 7. Here, we can clearly see that the size is now 5Gb....
Comments
Post a Comment