From owner-freebsd-questions@freebsd.org Thu Apr 13 09:36:09 2017 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 071CED3BEBD for ; Thu, 13 Apr 2017 09:36:09 +0000 (UTC) (envelope-from steve@sohara.org) Received: from smtp1.irishbroadband.ie (smtp2.irishbroadband.ie [62.231.32.43]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF9382DB for ; Thu, 13 Apr 2017 09:36:08 +0000 (UTC) (envelope-from steve@sohara.org) Received: from [89.127.62.20] (helo=smtp.lan.sohara.org) by smtp1.irishbroadband.ie with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1cybAb-0005Ps-JT for freebsd-questions@freebsd.org; Thu, 13 Apr 2017 10:36:05 +0100 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.88 (FreeBSD)) (envelope-from ) id 1cybBW-0008sg-OD for freebsd-questions@freebsd.org; Thu, 13 Apr 2017 09:37:02 +0000 Date: Thu, 13 Apr 2017 10:36:01 +0100 From: Steve O'Hara-Smith To: freebsd-questions@freebsd.org Subject: Re: hopefully simple query regarding dd Message-Id: <20170413103601.ae71e4fa9a2b5d9b024a71fc@sohara.org> In-Reply-To: <7ed0944d-56d0-fc10-629b-b90067f48651@zyxst.net> References: <7ed0944d-56d0-fc10-629b-b90067f48651@zyxst.net> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd10.3) X-Clacks-Overhead: "GNU Terry Pratchett" 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.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 09:36:09 -0000 On Thu, 13 Apr 2017 10:03:02 +0100 tech-lists 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