Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Know the disk space of data nodes in hadoop?

Is there a way or any command using which I can come to know the disk space of each datanode or the total cluster disk space?

I tried the command

dfs -du -h /

but it seems that I do not have permission to execute it for many directories and hence cannot get the actual disk space.

like image 957
Djeah Avatar asked Oct 21 '25 18:10

Djeah


2 Answers

From UI:

http://namenode:50070/dfshealth.html#tab-datanode

---> which will give you all the details about datanode.

From command line:

To get disk space of each datanode:

sudo -u hdfs hdfs dfsadmin -report

---> which will give you the details of entire HDFS and the individual datanodes OR

sudo -u hdfs hdfs dfs -du -h /

---> which will give you the total disk usage of each folder under root / directory

like image 152
PradeepKumbhar Avatar answered Oct 23 '25 09:10

PradeepKumbhar


You view the information about all datanodes and their disk usage in the namenode UI's Datanodes tab. Total cluster disk space can be seen in the summary part of the main page.

http://namenode-ip:50070

enter image description here

like image 31
Rahul Avatar answered Oct 23 '25 08:10

Rahul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!