From owner-freebsd-questions@FreeBSD.ORG Thu Feb 27 21:39:34 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C961AB for ; Thu, 27 Feb 2014 21:39:33 +0000 (UTC) Received: from mail-ee0-x22e.google.com (mail-ee0-x22e.google.com [IPv6:2a00:1450:4013:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85ABB1889 for ; Thu, 27 Feb 2014 21:39:33 +0000 (UTC) Received: by mail-ee0-f46.google.com with SMTP id d49so1736877eek.19 for ; Thu, 27 Feb 2014 13:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3POGyeflt2cW+o9pHqFOa3qJgrt2lcN4iGHyuNtklVQ=; b=oFIy3tNqEPcgJ/ROfOxY2SsiIgIvdsY/em42MmEhJL83UEGCWb+9Mxza4fCV/vi1wd xHSPc30n4G7A1yM9NeMJdKNRjroXUaG+BMs9QBzomDGYed1T/NHUcvaM9ZZwbEXzu0Qp 1FsvyNje/Eo7pxCU1J13uSHlSYH8gWsTVJ6mF6HDR4ndhmmOXyIsEhYjCwLaVR/DgBCw 8/PbVdNKSGO/cZV9f/1o+GibdRY+2BHNcel2lL0gClA4lusbHz30dVHUOPQe9DOZfWee 0ZLy4vuIUcSHjFWgEqMZDeL9ANGASQdOeKIC7z6lojYpmVSh2A8gamZUqCLSrRvLcXlj ppKA== X-Received: by 10.14.209.3 with SMTP id r3mr15760362eeo.85.1393537171996; Thu, 27 Feb 2014 13:39:31 -0800 (PST) Received: from [192.168.1.222] (ip5450aabf.adsl-surfen.hetnet.nl. [84.80.170.191]) by mx.google.com with ESMTPSA id m9sm2369270eeh.3.2014.02.27.13.39.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 13:39:31 -0800 (PST) Message-ID: <530FB08A.1010004@gmail.com> Date: Thu, 27 Feb 2014 22:39:22 +0100 From: Andrei Brezan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Matthias Apitz Subject: Re: errors from external USB disk References: <20140226121714.GA1532@tiny-r255948> <20140226145527.3cd8eb4b.freebsd@edvax.de> <20140227115934.GA2006@La-Habana> <20140227150715.e6aa0594.freebsd@edvax.de> <20140227175258.GA3214@La-Habana> In-Reply-To: <20140227175258.GA3214@La-Habana> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 21:39:34 -0000 On 27/02/2014 18:52, Matthias Apitz wrote: > El día Thursday, February 27, 2014 a las 03:07:15PM +0100, Polytropon escribió: > >>> While copying big files from the failing disk to another with 'cp -Rp' >>> I saw: >>> >>> Feb 23 18:48:07 La-Habana kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: >>> 28 00 01 cf d9 cf 00 00 0e 00 >>> Feb 23 18:48:07 La-Habana kernel: (da0:umass-sim0:0:0:0): CAM status: >>> CCB request completed with an error >>> Feb 23 18:48:07 La-Habana kernel: (da0:umass-sim0:0:0:0): Retrying command >> So it's definitely a reading error here. > I was today reading the entire disk with > > # dd if=/dev/da0 of=/dev/null bs=1m > > and after around 700 GByte it terminated with: > > dd: /dev/da0: Input/output error > 712870+0 records in > 712870+0 records out > > in /var/log/messages I have: > > Feb 27 18:01:48 La-Habana kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: > 28 00 57 05 33 80 00 00 80 00 > Feb 27 18:01:48 La-Habana kernel: (da0:umass-sim0:0:0:0): CAM status: > SCSI Status Error > Feb 27 18:01:48 La-Habana kernel: (da0:umass-sim0:0:0:0): SCSI status: > Check Condition > Feb 27 18:01:48 La-Habana kernel: (da0:umass-sim0:0:0:0): SCSI sense: > MEDIUM ERROR asc:11,0 (Unrecovered read error) > Feb 27 18:01:48 La-Habana kernel: (da0:umass-sim0:0:0:0): Error 5, > Unretryable error > > Is there a way, to map away such bad block? Until today I was thinking > that the firmware does this by its own, transparently. It does but it has a limited number of unallocated sectors. If you would manage to attach the disk to a SATA or E-SATA controller you can use smartctl -a on the device and see something like this: 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 plus a few other hinting attributes. Without that we can only assume that it ran out of spare sectors and now it can not remap the bad ones anymore. If you want to recover something from the disk with dd you can try and use sysutils/ddrescue so you get a best copy of what it can be read from the disk. >>> I dis this already, but it does not show much: >>> [...] >>> Error Counter logging not supported >>> >>> Device does not support Self Test logging >> Sorry, I forgot to mention: SMART usually does not work over USB. >> Do you have the chance to attach the disk, probably a SATA drive, >> to a "native" SATA port and try again? > I have only laptops with USB external. Again, maybe you have one with E-SATA around. > > Thanks > > matthias > Hope it helps, Andrei