From owner-freebsd-questions@freebsd.org Mon Apr 18 21:33:34 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 DA8BFB13595 for ; Mon, 18 Apr 2016 21:33:34 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70EC31952 for ; Mon, 18 Apr 2016 21:33:34 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mail-wm0-x234.google.com with SMTP id u206so355538wme.1 for ; Mon, 18 Apr 2016 14:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lD6IvDXRODbtMGvny7J6oCVmb+lnc24QmYQvtPkiAvE=; b=waEDQuxWMb5L7D71fVHRc2D0N0/PzAK+pcO0FY39n9NYhkcHaKsN1wG1261hpFrMmx dtqN91lkmshUQois4uWnn9BxhTrwV5BbBvyiyiE+K0ybMzpWwKJHnfXQY+mYn0aRdsYa 5ZJumtFguIsdzyHseUUASQtKwpW0htQJ6F4IB8SzV/KCGzwNdp+XvVpHu6unbaS/FysP 4TbzUGhjGFUh5yzcF3TWIDznntvNcQpCzgIsHFXPn2ohz30E/luxM49xsDA37tBDdOUV M8dA2JLaN9vXrBfG2SKTYmnnH1temoX5oaK69vnTtp6E5BZIoJCXsrDhj7B7rlU3miKr PgQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lD6IvDXRODbtMGvny7J6oCVmb+lnc24QmYQvtPkiAvE=; b=S0ZxRDwwlg018fSblRIj5HbHctbz/0rT+YKLt7Ev3acT9pp7xQqRQwfh/S3/Ayjl87 qdFUjoNNLY0cyXOQ25abenqUhsBxLRdgbr++cN6QWdV616UHY2kSs4MWl4CjPd+fRkmA Dt1zV/GcJ+aknJnwjSFlCJmJHXnc3yfHVHVyP5AC9oew7v40RMnuMgVnoqTwZniqUx0I 1hO6wmeIjG9XX6p35aCpPCu8PevFHMqJGpx8j8USS/4JAw5dYpNSwuUJ18Wkx5ql2fYe PRDncQwXEmICHZiOrVKfK0q+ZcPoHrGPxDJgoZsnZvd4hH5nuik3Wk/QTEyl1WSV3ph3 AjHQ== X-Gm-Message-State: AOPr4FUvYafc8ztwrAOJQLLw2x/gi8QnWOhu16mU3ZZnIPAZ/XvnM5/lzJWlf1GdQBELBw== X-Received: by 10.194.107.74 with SMTP id ha10mr37846714wjb.24.1461015212702; Mon, 18 Apr 2016 14:33:32 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.213.141]) by smtp.gmail.com with ESMTPSA id c187sm788437wme.16.2016.04.18.14.33.31 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Apr 2016 14:33:31 -0700 (PDT) Date: Mon, 18 Apr 2016 22:33:30 +0100 From: RW To: freebsd-questions@freebsd.org Subject: Re: tool for mapping away bad blocks on an external disk Message-ID: <20160418223330.48d246e3@gumby.homeunix.com> In-Reply-To: <31454.128.135.52.6.1461012965.squirrel@cosmo.uchicago.edu> References: <20160417072641.GA2358@c720-r292778-amd64> <20160417093957.0b1acb4c37d7c15a4b06af88@sohara.org> <20160418065534.GA2198@c720-r292778-amd64> <20160418204526.GA86917@neutralgood.org> <31454.128.135.52.6.1461012965.squirrel@cosmo.uchicago.edu> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd10.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 21:33:35 -0000 On Mon, 18 Apr 2016 15:56:05 -0500 (CDT) Valeri Galtsev wrote: > On Mon, April 18, 2016 3:45 pm, 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? > > As far as I understand, block device (/dev/da0) operations are > "quantized" in size of blocks the device reports to the system. > (which are either 512 bytes or 4kbytes on most modern 4kn drives) FWIW FreeBSD hasn't had block devices for a long time. It's true that drives don't have fractional sectors, but I think the block referred to is the block size in the dd command. The dd man page does refer to writing partial blocks: "A partial output block is one where less than the output block size was written. Partial output blocks to tape devices are considered fatal errors. Otherwise, the rest of the block will be written. Partial output blocks to character devices will produce a warning message."