From owner-freebsd-questions@freebsd.org Mon Apr 18 22:21:28 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 3047EB1380F for ; Mon, 18 Apr 2016 22:21:28 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E911618B3 for ; Mon, 18 Apr 2016 22:21:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u3IMLQ7x004137 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 18 Apr 2016 16:21:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u3IMLQx6004134; Mon, 18 Apr 2016 16:21:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 18 Apr 2016 16:21:26 -0600 (MDT) From: Warren Block To: "Kevin P. Neal" cc: freebsd-questions@freebsd.org Subject: Re: tool for mapping away bad blocks on an external disk In-Reply-To: <20160418204526.GA86917@neutralgood.org> Message-ID: References: <20160417072641.GA2358@c720-r292778-amd64> <20160417093957.0b1acb4c37d7c15a4b06af88@sohara.org> <20160418065534.GA2198@c720-r292778-amd64> <20160418204526.GA86917@neutralgood.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 18 Apr 2016 16:21:26 -0600 (MDT) 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: Mon, 18 Apr 2016 22:21:28 -0000 On Mon, 18 Apr 2016, Kevin P. Neal wrote: > On Mon, Apr 18, 2016 at 08:55:34AM +0200, Matthias Apitz wrote: >> >> Thanks for all the hints; I started last night with overwriting the full >> disk with: >> >> # dd conv=noerror if=/dev/zero of=/dev/da0 bs=1m > > Just curious: Does anyone know what happens when there is not enough space > at the end of a disk (or tape) to write the entire block? Does a partial > block get written, or does no block get written? It writes the partial block. Or at least I've never bothered doing anything special, and the checksums work out. > It is because I don't know what happens that I usually pick a block size > that is mathematically factored out from the number of blocks on the disk > (and then multiplied by the number of bytes in a block obviously). You work too hard. :)