[ https://issues.apache.org/jira/browse/HDFS-5526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826113#comment-13826113 ]
Tsz Wo (Nicholas), SZE commented on HDFS-5526: ---------------------------------------------- The problem is that ./current/VERSION is not rolled back. Below is a test case: # format using v2.2.0 #* ./current/VERSION {noformat} #Mon Nov 18 18:26:32 PST 2013 storageID=DS-955224766-xx.xx.xx.xx-50010-1384827992929 clusterID=CID-7692ad34-b0d1-4e81-a08e-c714010a8355 cTime=0 storageType=DATA_NODE layoutVersion=-47 {noformat} #* ./previous {noformat} <not exist> {noformat} #* ./current/BP-1970701609-xx.xx.xx.xx-1384827972355/current/VERSION {noformat} #Mon Nov 18 18:26:33 PST 2013 namespaceID=737643680 cTime=0 blockpoolID=BP-1970701609-xx.xx.xx.xx-1384827972355 layoutVersion=-47 {noformat} #* ./current/BP-1970701609-xx.xx.xx.xx-1384827972355/previous {noformat} <not exist> {noformat} # upgrade to trunk with layout version -48 #* ./current/VERSION {noformat} #Mon Nov 18 18:34:30 PST 2013 storageID=DS-955224766-xx.xx.xx.xx-50010-1384827992929 clusterID=CID-7692ad34-b0d1-4e81-a08e-c714010a8355 cTime=0 storageType=DATA_NODE layoutVersion=-48 {noformat} #* ./previous {noformat} <not exist> {noformat} #* ./current/BP-1970701609-xx.xx.xx.xx-1384827972355/current/VERSION {noformat} #Mon Nov 18 18:34:30 PST 2013 namespaceID=737643680 cTime=1384828466206 blockpoolID=BP-1970701609-xx.xx.xx.xx-1384827972355 layoutVersion=-48 {noformat} #* ./current/BP-1970701609-xx.xx.xx.xx-1384827972355/previous/VERSION {noformat} #Mon Nov 18 18:26:33 PST 2013 namespaceID=737643680 cTime=0 blockpoolID=BP-1970701609-xx.xx.xx.xx-1384827972355 layoutVersion=-47 {noformat} # rollback to -47 will fail with IncorrectVersionException {code} 2013-11-18 18:41:56,420 FATAL datanode.DataNode (BPServiceActor.java:run(706)) - Initialization failed for block pool Block pool BP-1970701609-xx.xx.xx.xx-1384827972355 (storage id ) service to localhost/xx.xx.xx.xx:8020 org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /Users/szetszwo/hadoop/_local_cluster/data1. Reported: -48. Expecting = -47. {code} > Datanode cannot roll back to previous layout version > ---------------------------------------------------- > > Key: HDFS-5526 > URL: https://issues.apache.org/jira/browse/HDFS-5526 > Project: Hadoop HDFS > Issue Type: Bug > Components: datanode > Reporter: Tsz Wo (Nicholas), SZE > Priority: Blocker > > Current trunk layout version is -48. > Hadoop v2.2.0 layout version is -47. > If a cluster is upgraded from v2.2.0 (-47) to trunk (-48), the datanodes > cannot start with -rollback. It will fail with IncorrectVersionException. -- This message was sent by Atlassian JIRA (v6.1#6144)