Hi All,
This is a very simple operation intend to be very confusing as I saw in other posts I read.
What you will need to add storage to hadoop is a new disk, mounted on a new volume (directory)
After you got a new disk, ask you system administrator to mount him on a new desired directory:
[root@RHEL7datanode1 ~]# mkdir -p /hadoop/add_disk/
[root@RHEL7datanode1 ~]# chown -R hdfs:hadoop /hadoop
[root@RHEL7datanode1 ~]# su - hdfs
now you need to change conf file and add this new folder to the hdfs-site.xml
vi /usr/hdp/2.3.0.0-2557/hadoop/conf/hdfs-site.xml
<property>
<name>dfs.datanode.data.dir</name>
<value>/data2/hdp,/data1/hdp,/hadoop/add_disk</value>
</property>
Restart datanode:
[hdfs@RHEL7datanode1 ~]$ /usr/hdp/2.3.0.0-2557/hadoop/sbin/hadoop-daemon.sh stop datanode
stopping datanode
[hdfs@RHEL7datanode1 ~]$ /usr/hdp/2.3.0.0-2557/hadoop/sbin/hadoop-daemon.sh startp datanode
starting datanode, logging to /var/log/hadoop/hdfs/hadoop-hdfs-datanode-RHEL7datanode1.out
After the datanode is up look for something like this in your log file: (to verify it's OK)
[root@RHEL7datanode1 hdfs]# tail -f /var/log/hadoop/hdfs/hadoop-hdfs-namenode-RHEL7datanode1.log
2016-11-10 12:56:59,673 INFO blockmanagement.DatanodeDescriptor (DatanodeDescriptor.java:updateStorage(856)) - Adding new storage ID DS-cf75-40f2--f00574d388b0 for DN 10.212.125.124:50010
This command will show you the new capacity size:
[hdfs@RHEL7datanode1 ~]$ hdfs dfsadmin -report
This is a very simple operation intend to be very confusing as I saw in other posts I read.
What you will need to add storage to hadoop is a new disk, mounted on a new volume (directory)
After you got a new disk, ask you system administrator to mount him on a new desired directory:
[root@RHEL7datanode1 ~]# mkdir -p /hadoop/add_disk/
[root@RHEL7datanode1 ~]# chown -R hdfs:hadoop /hadoop
[root@RHEL7datanode1 ~]# su - hdfs
now you need to change conf file and add this new folder to the hdfs-site.xml
vi /usr/hdp/2.3.0.0-2557/hadoop/conf/hdfs-site.xml
<property>
<name>dfs.datanode.data.dir</name>
<value>/data2/hdp,/data1/hdp,/hadoop/add_disk</value>
</property>
Restart datanode:
[hdfs@RHEL7datanode1 ~]$ /usr/hdp/2.3.0.0-2557/hadoop/sbin/hadoop-daemon.sh stop datanode
stopping datanode
[hdfs@RHEL7datanode1 ~]$ /usr/hdp/2.3.0.0-2557/hadoop/sbin/hadoop-daemon.sh startp datanode
starting datanode, logging to /var/log/hadoop/hdfs/hadoop-hdfs-datanode-RHEL7datanode1.out
After the datanode is up look for something like this in your log file: (to verify it's OK)
[root@RHEL7datanode1 hdfs]# tail -f /var/log/hadoop/hdfs/hadoop-hdfs-namenode-RHEL7datanode1.log
2016-11-10 12:56:59,673 INFO blockmanagement.DatanodeDescriptor (DatanodeDescriptor.java:updateStorage(856)) - Adding new storage ID DS-cf75-40f2--f00574d388b0 for DN 10.212.125.124:50010
This command will show you the new capacity size:
[hdfs@RHEL7datanode1 ~]$ hdfs dfsadmin -report
Comments
Post a Comment