Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A6A87200C1A for ; Mon, 13 Feb 2017 18:32:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A5333160B60; Mon, 13 Feb 2017 17:32:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C3021160B4A for ; Mon, 13 Feb 2017 18:32:16 +0100 (CET) Received: (qmail 11884 invoked by uid 500); 13 Feb 2017 17:32:14 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 11474 invoked by uid 99); 13 Feb 2017 17:32:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2017 17:32:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 09E8518613A for ; Mon, 13 Feb 2017 17:32:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.679 X-Spam-Level: * X-Spam-Status: No, score=1.679 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id bTC3T4Xhln66 for ; Mon, 13 Feb 2017 17:32:12 +0000 (UTC) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 43D685F47E for ; Mon, 13 Feb 2017 17:32:12 +0000 (UTC) Received: by mail-it0-f45.google.com with SMTP id x75so13622590itb.0 for ; Mon, 13 Feb 2017 09:32:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=70nhbeJ8R69/M3Wp1g2Pc6ly5LOBaKzpGddhHR5N2cM=; b=mzgzB17OC2uSUI5qt9hDRfrqkpgxspA/EpVTtpjOPjROX/BGCbMGAsjaoYC5geylH/ w4jRKtgSJk2ZUQyBdAEFtEWRRoI907PK/HK0Is14oXBzKzgJ7bfrKAEQXFitKxXkseUh 8uPDYyMohU2GR7aPKKjI2y9wJg967HXCeruw7ztNfizO2NXRtvChQn1XOaR7EsiDY/uJ YviW/E3EmW18vNTKrek7YfGip27e9Lie54K4x7lxBilsHeTBQkV+1OhI1JUu8CQ7ecSf h1llzHLaaY6G9sCwzbXzskdPePOTX/zBaw7ewntJTZgkpexH2eS+EJYMJK7cP925vWIp CiZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=70nhbeJ8R69/M3Wp1g2Pc6ly5LOBaKzpGddhHR5N2cM=; b=mp27kLyajOTagu7HWoPeEGWEhoFrtDvDi45035XPaTbdlS0Gq++dOMcXHSv/LFT7UB fZtQCjGZi8LOlaaqcMwVQA2/rHbD8VYEmIQvg+Ynt129rhrycBurS3wxN6U3LQrw+KI5 3nkqKm2rO9wxbYNEfI2YywoeqYlCEXmP0rVRx+1YBZeQr84nKf9E6aodaoQK/pSArhj7 541twKsdXhFdNZ+Vejrm8gUWjitra8XAQJaLhO5L8t8Jd3wc3mTzkLjhimM1wE8ty8Bb WNU7VSQuszDRIGbFj0MYT1L+xTGIdvUfVh3kHoxsbWVlmq6qVv+lJ+krZgp4dhh7+Fm3 9zXg== X-Gm-Message-State: AIkVDXL6rBBNvk1syfqt73k30nOQKpaxL02HPCyRoGKzi4gire0FgengyAmnlxk9jqZYj5IWw27IbyBQlKzb7g== X-Received: by 10.36.198.133 with SMTP id j127mr42339911itg.72.1487007115642; Mon, 13 Feb 2017 09:31:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.12.141 with HTTP; Mon, 13 Feb 2017 09:31:55 -0800 (PST) In-Reply-To: References: From: Ravi Prakash Date: Mon, 13 Feb 2017 09:31:55 -0800 Message-ID: Subject: Re: How to fix "HDFS Missing replicas" To: Ascot Moss Cc: user Content-Type: multipart/alternative; boundary=94eb2c07dd06e818c805486cd2ad archived-at: Mon, 13 Feb 2017 17:32:17 -0000 --94eb2c07dd06e818c805486cd2ad Content-Type: text/plain; charset=UTF-8 Hi Ascot! Just out of curiosity, which version of hadoop are you using? fsck has some other options (e.g. -blocks will print out the block report too, -list-corruptfileblocks prints out the list of missing blocks and files they belong to) . I suspect you may also want to specify the -openforwrite option. In any case, missing blocks are a pretty bad symptom. There's a high likelihood that you've lost data. If you can't find the blocks on any of the datanodes, you would want to delete the files on HDFS and recreate them (however they were originally created). In my experience I've seen missing files which were never closed. This used to happen in older versions when an rsync via HDFS NFS / HDFS FUSE is cancelled / fails. HTH Ravi On Sun, Feb 12, 2017 at 4:15 AM, Ascot Moss wrote: > Hi, > > After running 'hdfs fsck /blocks' to check the cluster, I got > 'Missing replicas: 441 (0.24602923 %)" > > How to fix HDFS missing replicas? > Regards > > > > > (detailed output) > > Status: HEALTHY > > Total size: 3375617914739 B (Total open files size: 68183613174 B) > > Total dirs: 2338 > > Total files: 39960 > > Total symlinks: 0 (Files currently being written: 60) > > Total blocks (validated): 59493 (avg. block size 56739749 B) (Total > open file blocks (not validated): 560) > > Minimally replicated blocks: 59493 (100.0 %) > > Over-replicated blocks: 0 (0.0 %) > > Under-replicated blocks: 111 (0.18657658 %) > > Mis-replicated blocks: 0 (0.0 %) > > Default replication factor: 3 > > Average block replication: 3.0054965 > > Corrupt blocks: 0 > > Missing replicas: 441 (0.24602923 %) > > Number of data-nodes: 7 > > Number of racks: 1 > > > --94eb2c07dd06e818c805486cd2ad Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Ascot!

Just out of curiosity, which version= of hadoop are you using?

fsck has some other options (e.= g. -blocks will print out the block report too, -list-corruptfileblocks pri= nts out the list of missing blocks and files they belong to) . I suspect yo= u may also want to specify the -openforwrite option.

In a= ny case, missing blocks are a pretty bad symptom. There's a high likeli= hood that you've lost data. If you can't find the blocks on any of = the datanodes, you would want to delete the files on HDFS and recreate them= (however they were originally created). In my experience I've seen mis= sing files which were never closed. This used to happen in older versions w= hen an rsync via HDFS NFS / HDFS FUSE is cancelled / fails.

HTH
Ravi



On Sun, Feb 12, 2017 at 4:15 AM, Ascot= Moss <ascot.moss@gmail.com> wrote:
Hi,

After running 'hd= fs fsck /blocks' to check the cluster, I got
'Missing replicas:= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 441 (0.24602923 %)"= =C2=A0

How to fix HDFS missing=C2=A0replicas?
Regards




(detailed output)

Status: HEALTHY

=C2=A0Total size:=C2=A0 =C2=A0 3375617914739 B (Total open fi= les size: 68183613174 B)

=C2=A0Total dirs:=C2=A0 =C2=A0 2338

=C2=A0Total files: =C2=A0 39960

=C2=A0Total symlinks:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 0 (Files currently being written: 60)

=C2=A0Total blocks (validated):=C2=A0 =C2=A0 =C2=A0 59493 (av= g. block size 56739749 B) (Total open file blocks (not validated): 560)

=C2=A0Minimally replicated blocks: =C2=A0 59493 (100.0 %)

=C2=A0Over-replicated blocks:=C2=A0 =C2=A0 =C2=A0 =C2=A0 0 (0= .0 %)

=C2=A0Under-replicated blocks: =C2=A0 =C2=A0 =C2=A0 111 (0.18= 657658 %)

=C2=A0Mis-replicated blocks: =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 (0= .0 %)

=C2=A0Default replication factor:=C2=A0 =C2=A0 3

=C2=A0Average block replication: =C2=A0 =C2=A0 3.0054965

=C2=A0Corrupt blocks:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 0

=C2=A0Missing replicas:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 441 (0.24602923 %)

=C2=A0Number of data-nodes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 7

=C2=A0Number of racks: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 1



--94eb2c07dd06e818c805486cd2ad--