hopefully simple query regarding dd

Steve O'Hara-Smith steve at sohara.org
Thu Apr 13 09:36:09 UTC 2017

On Thu, 13 Apr 2017 10:03:02 +0100
tech-lists <tech-lists at zyxst.net> wrote:

> Hello questions@
> I couldn't find an an answer to this hopefully non-silly question and
> can't test it meself without possibly risking a hd. Basically what I
> want to know is this. Can I do this:
> dd if=/dev/ada0 of=/dev/ada0
> to refresh the disk, and *expect the outcome to be non-destructive for
> the disk*. That bit is important. By non-destructive, I mean for the
> data already on it.

	It should be safe and work, assuming that what you want to do is
read and rewrite every block. You should probably think very hard about
what you want it to do in the case of read and/or write errors.

	I'm not sure why you'd want to do it though, discs are not
particularly volatile storage even on timescales of years.

	Of course if it ever gets a read error that passes the CRC
(aka silent corruption) it will cement the error in stone for you by
writing it back.

	If you are really concerned about long term data retention then I
suggest ZFS with plenty of redundancy (at least two drives redundancy) and a
regular scrub.

Steve O'Hara-Smith <steve at sohara.org>

More information about the freebsd-questions mailing list