Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 05-03-2017 10:54 PM - edited 09-16-2022 04:33 AM
hdfs fs -setrep -w 3 fails and Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
hadoop fs -setrep -w 3 /
^C[root@host1 ~]# hadoop fs -setrep -w 3 /user/root/ml-20m/genome-scores.csv
Replication 3 set: /user/root/ml-20m/genome-scores.csv
Waiting for /user/root/ml-20m/genome-scores.csv ........^C[root@host1 ~]# hadoop fs -setrep -w 3 /user/root/ml-20m/genome-scores.csv
Replication 3 set: /user/root/ml-20m/genome-scores.csv
Waiting for /user/root/ml-20m/genome-scores.csv ........................................................................................................................................................................................................
hdfs fsck /user/root/ml-20m/genome-scores.csv -files -blocks -locations
Connecting to namenode via http://host1.cloudera.com:50070
FSCK started by root (auth:SIMPLE) from /172.31.32.255 for path /user/root/ml-20m/genome-scores.csv at Thu May 04 04:57:20 UTC 2017
/user/root/ml-20m/genome-scores.csv 323544381 bytes, 3 block(s): Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745713_4889. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745714_4890. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745715_4891. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
0. BP-1580841952-172.31.32.255-1493753849966:blk_1073745713_4889 len=134217728 Live_repl=2 [DatanodeInfoWithStorage[172.31.63.45:50010,DS-c9f8ac9f-97fc-4547-a5c5-a5373055a50d,DISK], DatanodeInfoWithStorage[172.31.56.160:50010,DS-741c0afe-1496-4e6e-9662-b83677d6e0dc,DISK]]
1. BP-1580841952-172.31.32.255-1493753849966:blk_1073745714_4890 len=134217728 Live_repl=2 [DatanodeInfoWithStorage[172.31.56.160:50010,DS-741c0afe-1496-4e6e-9662-b83677d6e0dc,DISK], DatanodeInfoWithStorage[172.31.63.45:50010,DS-c9f8ac9f-97fc-4547-a5c5-a5373055a50d,DISK]]
2. BP-1580841952-172.31.32.255-1493753849966:blk_1073745715_4891 len=55108925 Live_repl=2 [DatanodeInfoWithStorage[172.31.63.45:50010,DS-c9f8ac9f-97fc-4547-a5c5-a5373055a50d,DISK], DatanodeInfoWithStorage[172.31.56.160:50010,DS-741c0afe-1496-4e6e-9662-b83677d6e0dc,DISK]]
Status: HEALTHY
Total size: 323544381 B
Total dirs: 0
Total files: 1
Total symlinks: 0
Total blocks (validated): 3 (avg. block size 107848127 B)
Minimally replicated blocks: 3 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 3 (100.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 2.0
Corrupt blocks: 0
Missing replicas: 3 (33.333332 %)
Number of data-nodes: 2
Number of racks: 1
FSCK ended at Thu May 04 04:57:20 UTC 2017 in 3 milliseconds
hdfs dfs -setrep
-setrep: Not enough arguments: expected 2 but got 0
Usage: hadoop fs [generic options] -setrep [-R] [-w] <rep> <path> ...
sudo -u hdfs hdfs fsck /
/user/root/penndtch.1: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745711_4887. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
.
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745703_4879. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745704_4880. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745705_4881. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745706_4882. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745707_4883. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
/user/root/psd7003.xml: Under replicated BP-1580841952-172.31.32.255-1493753849966:blk_1073745708_4884. Target Replicas is 3 but found 2 live replica(s), 0 decommissioned replica(s) and 0 decommissioning replica(s).
.Status: HEALTHY
Total size: 3184936505 B
Total dirs: 417
Total files: 1986
Total symlinks: 0
Total blocks (validated): 1994 (avg. block size 1597260 B)
Minimally replicated blocks: 1994 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 20 (1.0030091 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 2.0
Corrupt blocks: 0
Missing replicas: 20 (0.499002 %)
Number of data-nodes: 2
Number of racks: 1
FSCK ended at Thu May 04 05:49:14 UTC 2017 in 123 milliseconds
I am using cloudera 5.10.1
1 namenode
1 secondary namenode
2 data nodes
Created 05-03-2017 11:26 PM
Created 05-04-2017 01:20 PM
i have added one node and tried hadoop fs -setrep -w 3 /
it is working.....
no under Replicas.......
Created 05-03-2017 11:00 PM
Created 05-03-2017 11:14 PM
hdfs fs -setrep -w 2 / is working ..
if i have 3 datanodes can i replicate to 4
Created 05-03-2017 11:26 PM
Created 05-04-2017 01:20 PM
i have added one node and tried hadoop fs -setrep -w 3 /
it is working.....
no under Replicas.......