hdfs目录权限变更导致无法启动

hdfs报错:

 

2018-04-19 11:20:20,928 INFO  impl.FsDatasetImpl (FsVolumeList.java:run(342)) - Caught exception while scanning /data/hadoop/hdfs/data/current. Will throw later.

ExitCodeException exitCode=1: du: cannot access `/data/hadoop/hdfs/data/current/BP-407923879-192.168.88.229-1515043569374/dncp_block_verification.log.prev': No such file or directory

 

        at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)

        at org.apache.hadoop.util.Shell.run(Shell.java:455)

        at org.apache.hadoop.fs.DU.run(DU.java:190)

        at org.apache.hadoop.fs.DU.(DU.java:70)

        at org.apache.hadoop.fs.DU.(DU.java:95)

        at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.(BlockPoolSlice.java:144)

        at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsVolumeImpl.addBlockPool(FsVolumeImpl.java:360)

        at org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsVolumeList$2.run(FsVolumeList.java:337)

2018-04-19 11:20:20,929 FATAL datanode.DataNode (BPServiceActor.java:run(820)) - Initialization failed for Block pool (Datanode Uuid unassigned) service to bd01/15.51.10.4:8020. Exiting.

 

 

查看是否真的不存在这个错误信息里面的目录:

[root@bd03 BP-407923879-192.168.88.229-1515043569374]# ls /data/hadoop/hdfs/data/current/BP-407923879-192.168.88.229-1515043569374

ls: cannot access /data/hadoop/hdfs/data/current/BP-407923879-192.168.88.229-1515043569374/dncp_block_verification.log.prev: No such file or directory

current  dncp_block_verification.log.curr  dncp_block_verification.log.prev  tmp

 

发现是存在主目录的,但是有一个文件无法访问到:

[root@bd03 BP-407923879-192.168.88.229-1515043569374]# ll

ls: cannot access dncp_block_verification.log.prev: No such file or directory

total 0

drwxr-xr-x 4 hdfs hadoop 60 Jan  4 14:00 current

-rw-r--r-- 1 hdfs hadoop  0 Feb  1 17:29 dncp_block_verification.log.curr

?????????? ? ?    ?       ?            ? dncp_block_verification.log.prev

drwxr-xr-x 2 hdfs hadoop  6 Apr 19 11:20 tmp

You have mail in /var/spool/mail/root

[root@bd03 BP-407923879-192.168.88.229-1515043569374]#

 

 

应该是文件系统损坏了,尝试重新挂载、重启还是不能修复,尝试修复文件系统:

umoun /data

xfs_repair /dev/md126p4

重新挂载、查看是否正常

mount -a

[root@bd03 BP-407923879-192.168.88.229-1515043569374]# ls

current  dncp_block_verification.log.curr  tmp

发现那个异常的目录丢失掉了,重启hdfs看下是否会受到影响

重启后hdfs正常

你可能感兴趣的:(大数据技术)