Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5A0418295 for ; Wed, 25 Nov 2015 07:18:11 +0000 (UTC) Received: (qmail 24726 invoked by uid 500); 25 Nov 2015 07:18:11 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 24668 invoked by uid 500); 25 Nov 2015 07:18:11 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 24616 invoked by uid 99); 25 Nov 2015 07:18:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2015 07:18:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 055D02C1F58 for ; Wed, 25 Nov 2015 07:18:11 +0000 (UTC) Date: Wed, 25 Nov 2015 07:18:11 +0000 (UTC) From: =?utf-8?Q?=E5=88=98=E5=96=86_=28JIRA=29?= To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-7208) NN doesn't schedule replication when a DN storage fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-7208?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15026= 339#comment-15026339 ]=20 =E5=88=98=E5=96=86 commented on HDFS-7208: -------------------------- We meet the same problem, but we have a very simple path that works. We ca= n treat it as the datanode deleted the related blocks, so we only need one = line to fix it. diff --git a/hadoop/adh/src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/o= rg/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/h= adoop/adh/src/hadoop-hdfs-proje index 3320c65..7a10072 100644 --- a/hadoop/adh/src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apac= he/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java +++ b/hadoop/adh/src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apac= he/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java @@ -1332,6 +1332,8 @@ public void checkDataDir() throws DiskErrorException = { + " on failed volume " + fv.getCurrentDir().getAbsoluteP= ath()); ib.remove(); removedBlocks++; + datanode.notifyNamenodeDeletedBlock(new ExtendedBlock(bpid, = b.getBlockId()), b.getStorageUuid()); } } } > NN doesn't schedule replication when a DN storage fails > ------------------------------------------------------- > > Key: HDFS-7208 > URL: https://issues.apache.org/jira/browse/HDFS-7208 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Reporter: Ming Ma > Assignee: Ming Ma > Fix For: 2.6.0 > > Attachments: HDFS-7208-2.patch, HDFS-7208-3.patch, HDFS-7208.patc= h > > > We found the following problem. When a storage device on a DN fails, NN c= ontinues to believe replicas of those blocks on that storage are valid and = doesn't schedule replication. > A DN has 12 storage disks. So there is one blockReport for each storage. = When a disk fails, # of blockReport from that DN is reduced from 12 to 11. = Given dfs.datanode.failed.volumes.tolerated is configured to be > 0, NN sti= ll considers that DN healthy. > 1. A disk failed. All blocks of that disk are removed from DN dataset. > =20 > {noformat} > 2014-10-04 02:11:12,626 WARN org.apache.hadoop.hdfs.server.datanode.fsdat= aset.impl.FsDatasetImpl: Removing replica BP-1748500278-xx.xx.xx.xxx-137780= 3467793:1121568886 on failed volume /data/disk6/dfs/current > {noformat} > 2. NN receives DatanodeProtocol.DISK_ERROR. But that isn't enough to have= NN remove the DN and the replicas from the BlocksMap. In addition, blockRe= port doesn't provide the diff given that is done per storage. > {noformat} > 2014-10-04 02:11:12,681 WARN org.apache.hadoop.hdfs.server.namenode.NameN= ode: Disk error on DatanodeRegistration(xx.xx.xx.xxx, datanodeUuid=3Df3b8a3= 0b-e715-40d6-8348-3c766f9ba9ab, infoPort=3D50075, ipcPort=3D50020, storageI= nfo=3Dlv=3D-55;cid=3DCID-e3c38355-fde5-4e3a-b7ce-edacebdfa7a1;nsid=3D420527= 250;c=3D1410283484939): DataNode failed volumes:/data/disk6/dfs/current > {noformat} > 3. Run fsck on the file and confirm the NN's BlocksMap still has that rep= lica. -- This message was sent by Atlassian JIRA (v6.3.4#6332)