hadoop节点一块硬盘故障更换方法

  • Post author:
  • Post category:其他


hadoop节点服务器的一块硬盘出现物理故障,需要更换,将节点的服务停止,暂时不提供服务,将故障更换了,新盘格式化,

fdisk -l

新的2T盘为/dev/sde

parted -s /dev/sde mklabel gpt mkpart primary 0% 100%

格式化:

mkfs.ext4 /dev/sde1

挂载硬盘:

mount /dev/sde /data2

正常启动datanode服务,但是报错,如下:

“/var/log/hadoop/hdfs/hadoop-hdfs-datanode-dn61.100.cloud.log” 727814L, 246556758C

2016-01-20 09:55:57,892 WARN  datanode.DataNode (BPOfferService.java:getBlockPoolId(143)) – Block pool ID needed, but service not yet registered with NN

java.lang.Exception: trace

at org.apache.hadoop.hdfs.server.datanode.BPOfferService.getBlockPoolId(BPOfferService.java:143)

at org.apache.hadoop.hdfs.server.datanode.BlockPoolManager.remove(BlockPoolManager.java:91)

at org.apache.hadoop.hdfs.server.datanode.DataNode.shutdownBlockPool(DataNode.java:899)

at org.apache.hadoop.hdfs.server.datanode.BPOfferService.shutdownActor(BPOfferService.java:350)

at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.cleanUp(BPServiceActor.java:619)

at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:837)

at java.lang.Thread.run(Thread.java:745)

2016-01-20 09:55:57,892 INFO  datanode.DataNode (BlockPoolManager.java:remove(99)) – Removed Block pool (Datanode Uuid unassigned)

2016-01-20 09:55:57,892 WARN  datanode.DataNode (BPOfferService.java:getBlockPoolId(143)) – Block pool ID needed, but service not yet registered with NN

java.lang.Exception: trace

at org.apache.hadoop.hdfs.server.datanode.BPOfferService.getBlockPoolId(BPOfferService.java:143)

at org.apache.hadoop.hdfs.server.datanode.DataNode.shutdownBlockPool(DataNode.java:901)

at org.apache.hadoop.hdfs.server.datanode.BPOfferService.shutdownActor(BPOfferService.java:350)

at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.cleanUp(BPServiceActor.java:619)

at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:837)

at java.lang.Thread.run(Thread.java:745)

2016-01-20 09:55:59,892 WARN  datanode.DataNode (DataNode.java:secureMain(2049)) – Exiting Datanode

2016-01-20 09:55:59,894 INFO  util.ExitUtil (ExitUtil.java:terminate(124)) – Exiting with status 0

2016-01-20 09:55:59,896 INFO  datanode.DataNode (StringUtils.java:run(640)) – SHUTDOWN_MSG:

/************************************************************

SHUTDOWN_MSG: Shutting down DataNode at dn61.100.cloud/172.16.8.72

解决方法:

发现权限不一样,正常的是755权限,有问题的是750,修改权限,chmod 755 -R /data2

异常的

[root@dn6 data2]# ll

drwxr-x— 4 root root  4096 Jan 20 10:16 hadoop

drwx—— 2 root root 16384 Jan 19 15:38 lost+found

正常的

[root@dn6 data2]# ll

drwxr-xr-x 4 root root  4096 Jan 20 10:16 hadoop

drwx—— 2 root root 16384 Jan 19 15:38 lost+found



版权声明:本文为levy_cui原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。