Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7CA801148A for ; Thu, 18 Sep 2014 11:15:39 +0000 (UTC) Received: (qmail 30979 invoked by uid 500); 18 Sep 2014 11:15:27 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 30854 invoked by uid 500); 18 Sep 2014 11:15:27 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 30839 invoked by uid 99); 18 Sep 2014 11:15:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2014 11:15:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of skgadalay@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-wg0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2014 11:15:01 +0000 Received: by mail-wg0-f44.google.com with SMTP id b13so706796wgh.27 for ; Thu, 18 Sep 2014 04:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WFil1eiNzloXUKvG//u9BwbA1FMJyqNl2Waihx8BZT4=; b=TSwGvGmxl4cX4JFj7hyNTeORp0+q7t7dIxKvL4NzCOnSE7If3J2BJlc1zA+L4IlD1Z 3jqLTCVUAJlg9rZ5rCzf19BaouK19T2ToQsLOhxaDF9IielUB6NG+VfyS5QWmPkt1XhQ fxe1utSYoBTaotod9rDmfD7mObw5UpiIeUEQG5rIblow9ONA8LnT6F/uEsFaJdpqXYl6 xq5mCIyp/LIMg+wZBsXHYhv+uSoTXcY4h8ad0ifbYrOR9ZjIMIedTHNLRdddKSuvG67V KO0Nxsi2D3eWHIQw/VSU36egIKolECL05u4EWsvHYlntmpxN8ONpUxSTzTT8rtbeQbUu pHgQ== MIME-Version: 1.0 X-Received: by 10.180.99.195 with SMTP id es3mr2058127wib.33.1411038900815; Thu, 18 Sep 2014 04:15:00 -0700 (PDT) Received: by 10.217.99.199 with HTTP; Thu, 18 Sep 2014 04:15:00 -0700 (PDT) In-Reply-To: References: Date: Thu, 18 Sep 2014 16:45:00 +0530 Message-ID: Subject: Re: Failed to rollback from hadoop-2.4.1 to hadoop 2.2.0 From: Susheel Kumar Gadalay To: user@hadoop.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org What is the o/p of command hdfs dfsadmin -upgradeProgress status If it says upgrade is complete then you can do some sanity check by hdfs fsck. Stop the servers by stop-dfs.sh and then rollback by command start-dfs.sh -rollback On 9/18/14, sam liu wrote: > Thanks for your comment! > > I can upgrade from 2.2.0 to 2.4.1 using command 'start-dfs.sh -upgrade', > however failed to rollback from 2.4.1 to 2.2.0 using command 'start-dfs.sh > -rollback': the namenode always stays on safe mode(awaiting reported blocks > (0/315)). > > Why? > > 2014-09-18 1:51 GMT-07:00 Susheel Kumar Gadalay : > >> You have to upgrade both name node and data node. >> >> Better issue start-dfs.sh -upgrade. >> >> Check whether current and previous directories are present in both >> dfs.namenode.name.dir and dfs.datanode.data.dir directory. >> >> On 9/18/14, sam liu wrote: >> > Hi Expert, >> > >> > Below are my steps and is it a hadoop bug or did I miss any thing? >> Thanks! >> > >> > Step: >> > [A] Upgrade >> > 1. Install Hadoop 2.2.0 cluster >> > 2. Stop Hadoop services >> > 3. Replace 2.2.0 binaries with 2.4.1 binaries >> > 4. Start datanodes: $HADOOP_HOME/sbin/hadoop-daemon.sh start datanode >> > 5. Start namenode with option upgrade: >> > $HADOOP_HOME/sbin/hadoop-daemon.sh >> > start namenode -upgrade >> > 6. Start secondary namenode, tasktracker and jobtracker >> > >> > Result: >> > >> > Whole upgrade process could be completed successfully. >> > >> > [B] Rollback >> > 1. Stop all hadoop services >> > 2. Replace 2.4.1 binaries with 2.2.0 binaries >> > 3. Start datanodes: $HADOOP_HOME/sbin/hadoop-daemon.sh start datanode >> > 4. Start namenode with option upgrade: >> > $HADOOP_HOME/sbin/hadoop-daemon.sh >> > start namenode -rollback >> > >> > Result: >> > >> > Namenode service could be started >> > Datanodes failed with exception: >> > Issue: DataNode failed with following exception >> > 2014-09-17 11:04:51,416 INFO >> > org.apache.hadoop.hdfs.server.common.Storage: Lock on >> > /hadoop/hdfs/data/in_use.lock acquired by nodename >> > 817443@shihc071-public >> > 2014-09-17 11:04:51,418 FATAL >> > org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed >> for >> > block pool Block pool BP-977402492-9.181.64.185-1410497086460 (storage >> id ) >> > service to hostname/ip:9000 >> > org.apache.hadoop.hdfs.server.common.IncorrectVersionException: >> > Unexpected version of storage directory /hadoop/hdfs/data. Reported: >> > -55. >> > Expecting = -47. >> > at >> > >> org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1082) >> > at >> > >> org.apache.hadoop.hdfs.server.datanode.DataStorage.setFieldsFromProperties(DataStorage.java:302) >> > at >> > >> org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:921) >> > >> >