From owner-freebsd-questions@freebsd.org Sun Apr 17 07:26:52 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BEC8B116B6 for ; Sun, 17 Apr 2016 07:26:52 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B36716DA for ; Sun, 17 Apr 2016 07:26:51 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [62.216.197.7] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1arh6Q-0001rT-Lr for freebsd-questions@freebsd.org; Sun, 17 Apr 2016 09:26:42 +0200 Received: from localhost.my.domain (c720-r292778-amd64 [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id u3H7QfH6002394 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sun, 17 Apr 2016 09:26:41 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id u3H7Qf6M002393 for freebsd-questions@freebsd.org; Sun, 17 Apr 2016 09:26:41 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sun, 17 Apr 2016 09:26:41 +0200 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: tool for mapping away bad blocks on an external disk Message-ID: <20160417072641.GA2358@c720-r292778-amd64> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 11.0-CURRENT r292778 (amd64) User-Agent: Mutt/1.5.24 (2015-08-30) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 62.216.197.7 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2016 07:26:52 -0000 Hello, I have an older external disk, connected through USB, which has bad blocks: Apr 17 09:16:38 c720-r292778-amd64 kernel: ugen0.3: at usbus0 Apr 17 09:16:38 c720-r292778-amd64 kernel: umass0: on usbus0 Apr 17 09:16:38 c720-r292778-amd64 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 Apr 17 09:16:38 c720-r292778-amd64 kernel: umass0:1:0: Attached to scbus1 Apr 17 09:16:38 c720-r292778-amd64 kernel: da0 at umass-sim0 bus 0 scbus1 target 0 lun 0 Apr 17 09:16:38 c720-r292778-amd64 kernel: da0: Fixed Direct Access SCSI-2 device Apr 17 09:16:38 c720-r292778-amd64 kernel: da0: Serial Number FAFFFFF0FDF1F6F90FA46017 Apr 17 09:16:38 c720-r292778-amd64 kernel: da0: 40.000MB/s transfers Apr 17 09:16:38 c720-r292778-amd64 kernel: da0: 1430799MB (2930277168 512 byte sectors) Apr 17 09:16:38 c720-r292778-amd64 kernel: da0: quirks=0x2 # fsck /dev/da0s1a ** /dev/da0s1a ** Last Mounted on / ** Phase 1 - Check Blocks and Sizes CANNOT READ BLK: 1512063104 CONTINUE? [yn] y THE FOLLOWING DISK SECTORS COULD NOT BE READ: 1512063180, 1512063219, CANNOT READ BLK: 1794212160 CONTINUE? [yn] Do we have some good tool to perform an analyse of the full disk and map away all bad blocks? There is no important data on this disk and if I can not get rid of the bad blocks I must throw it to dustbin. Thanks matthias -- Matthias Apitz, ✉ guru@unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045