Hadoop分佈式文件系統使用指南二
升級
- 停止hdfs
- 注意不可使用bin/stop-all.sh來停止
$ bin/stop-dfs.sh
退回
- 停止集群
$ bin/stop-dfs.sh
- 部署老版本的Hadoop
檢查hdfs磁碟狀況
waue@vpro:/opt/hadoop$ bin/hadoop fsck /
.
/user/waue/input/1.txt: Under replicated blk_-90085106852013388_1001. Target Replicas is 3 but found 2 replica(s).
/user/waue/input/1.txt: Under replicated blk_-4027196261436469955_1001. Target Replicas is 3 but found 2 replica(s).
.
/user/waue/input/2.txt: Under replicated blk_-2300843106107816641_1002. Target Replicas is 3 but found 2 replica(s).
.
/user/waue/input/3.txt: Under replicated blk_-1561577350198661966_1003. Target Replicas is 3 but found 2 replica(s).
.
/user/waue/input/4.txt: Under replicated blk_1316726598778579026_1004. Target Replicas is 3 but found 2 replica(s).
Status: HEALTHY
Total size: 143451003 B
Total dirs: 8
Total files: 4
Total blocks (validated): 5 (avg. block size 28690200 B)
Minimally replicated blocks: 5 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 5 (100.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 2.0
Corrupt blocks: 0
Missing replicas: 5 (50.0 %)
Number of data-nodes: 2
Number of racks: 1
The filesystem under path '/' is HEALTHY