Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 22:33:30 +0100
From:      RW <rwmaillists@googlemail.com>
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> <alpine.BSF.2.20.1604171023510.30232@wonkity.com> <nf0h0u$5ij$1@ger.gmane.org> <alpine.BSF.2.20.1604171136320.30232@wonkity.com> <20160418065534.GA2198@c720-r292778-amd64> <20160418204526.GA86917@neutralgood.org> <31454.128.135.52.6.1461012965.squirrel@cosmo.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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."





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160418223330.48d246e3>