From owner-freebsd-questions@freebsd.org Thu Apr 13 10:25:22 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 90170D3C1CF for ; Thu, 13 Apr 2017 10:25:22 +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 5B70DA4B for ; Thu, 13 Apr 2017 10:25:21 +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 1cybwF-0006yx-G6 for freebsd-questions@freebsd.org; Thu, 13 Apr 2017 11:25:19 +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 1cybxA-0009dk-9T for freebsd-questions@freebsd.org; Thu, 13 Apr 2017 10:26:16 +0000 Date: Thu, 13 Apr 2017 11:25:14 +0100 From: Steve O'Hara-Smith To: freebsd-questions@freebsd.org Subject: Re: hopefully simple query regarding dd Message-Id: <20170413112514.784369a1fbaa217d8beb675c@sohara.org> In-Reply-To: <33df8ac0-3d45-2945-fd4f-f4068ce60f8c@zyxst.net> References: <7ed0944d-56d0-fc10-629b-b90067f48651@zyxst.net> <20170413103601.ae71e4fa9a2b5d9b024a71fc@sohara.org> <33df8ac0-3d45-2945-fd4f-f4068ce60f8c@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 10:25:22 -0000 On Thu, 13 Apr 2017 11:08:23 +0100 tech-lists wrote: > On 13/04/2017 10:36, Steve O'Hara-Smith wrote: > > 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. > > Hi, > > The context is this: > > old netbook, slow cpu (boo!) low power (yay!) .. was thinking of making > it a server on either the local or external LAN. Ah - so forget about redundancy :) > Brand new freebsd-12 install as of yesterday. I think ZFS might just > kill it though. It's not *that* much worse than the box that serves my RAIDZ2 NAS but there's not much point with only one drive IMHO. > Before installing, I ran a dd if=/dev/zero of=/dev/ada0 bs=1m > conv=noerror from the shell option in the installer because if there > were blocks giving errors, I wanted to re-map them somewhere safe. OK so that should have forced all the reallocation the drive needs to do unless it is dying. > After installing, the first thing I did was to install and run smartd to > see where I was with the disk. I knew previously the disk was likely to > have errors. > > Here's the relevant stats: > > 9 Power_On_Hours -O--CK 085 085 000 - 11379 > 191 G-Sense_Error_Rate -O--CK 001 001 000 - 759 > 5 Reallocated_Sector_Ct PO--CK 183 183 140 - 143 > 197 Current_Pending_Sector -O--CK 001 001 000 - 65216 Eeek! Is that really claiming nearly 64K sectors waiting to remap ? > 196 Reallocated_Event_Count -O--CK 196 196 000 - 4 But why isn't this *much* higher ? Puzzled. Hmm before you do anything drastic do a read test on the whole drive (dd to /dev/null with a reasonable blocksize), it may just be waiting for a good read on sectors you've never touched apart from writing nulls. > now. I just needed to know if it could be run without having to reinstall. Yeah you should be safe - at least as safe as anything with those odd numbers. Do the read test first though. -- Steve O'Hara-Smith