一、NN数据备份
1. 修改配置添加多目录,其中一个目录坏了,其他目录可以用,或者多个目录在不同磁盘,其中一个磁盘坏了也还是可以恢复
jar包hdfs-default.xml 默认配置中
<property>
<name>dfs.namenode.name.dir</name>
<value>file://${hadoop.tmp.dir}/dfs/name</value>
<description>Determines where on the local filesystem the DFS name node
should store the name table(fsimage). If this is a comma-delimited list
of directories then the name table is replicated in all of the
directories, for redundancy. </description>
</property>
自定义
本文详细介绍了Hadoop HDFS中NameNode(NN)的数据备份方法,包括通过修改配置添加多目录实现容错,以及在紧急情况下从Secondary NameNode(2NN)拷贝数据进行恢复。然而,从2NN拷贝数据存在数据丢失的风险,因此这种备份策略并不完全保险。
订阅专栏 解锁全文
2万+

被折叠的 条评论
为什么被折叠?



