Created 06-15-2021 09:51 AM
I have 5 Data nodes, where 1 Data node crashed. Name node is still replicating the data blocks of the crashed Data node. What happens when I recover the crashed Data node. The data blocks which is under replicated will be reported but what happens to already replicated blocks. Will they be marked as corrupted blocks or will be deleted/removed since there will be 4 replicas?
Created 06-16-2021 01:08 AM
Hello @pauljoshiva
The NameNode endeavors to ensure that each block always has the intended number of replicas. The NameNode detects that a block has become under- or over-replicated when a block report from a DataNode arrives. When a block becomes over replicated, the NameNode chooses a replica to remove. The NameNode will prefer not to reduce the number of racks that host replicas, and secondly prefer to remove a replica from the DataNode with the least amount of available disk space. The goal is to balance storage utilization across DataNodes without reducing the block's availability.
Hope this answers your query.
Regards,
Manoj
Created 06-16-2021 12:57 AM
Hello @pauljoshiva
If the crashed data node comes up, then the data replica count will be 4 that is the case of over replicated blocks.HDFS will automatically delete the excess replicas as the default replication factor has to be maintained 3. The replica from the now active datanode is going to be removed.
Created 06-16-2021 01:08 AM
Hello @pauljoshiva
The NameNode endeavors to ensure that each block always has the intended number of replicas. The NameNode detects that a block has become under- or over-replicated when a block report from a DataNode arrives. When a block becomes over replicated, the NameNode chooses a replica to remove. The NameNode will prefer not to reduce the number of racks that host replicas, and secondly prefer to remove a replica from the DataNode with the least amount of available disk space. The goal is to balance storage utilization across DataNodes without reducing the block's availability.
Hope this answers your query.
Regards,
Manoj