From owner-freebsd-questions@freebsd.org Thu Apr 13 10:18:48 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 547EFD3CF41 for ; Thu, 13 Apr 2017 10:18:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA9162C for ; Thu, 13 Apr 2017 10:18:47 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Thu, 13 Apr 2017 12:18:44 +0200 Received: from r56.edvax.de (port-92-195-127-117.dynamic.qsc.de [92.195.127.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 1B3133CC3F; Thu, 13 Apr 2017 12:18:42 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v3DAIgg6003719; Thu, 13 Apr 2017 12:18:42 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 13 Apr 2017 12:18:42 +0200 From: Polytropon To: tech-lists Cc: freebsd-questions@freebsd.org Subject: Re: hopefully simple query regarding dd Message-Id: <20170413121842.fd841d6e.freebsd@edvax.de> 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with 849EE6872E4 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1251 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:18:48 -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. > > AMD C-70 APU with Radeon(tm) HD Graphics (998.20-MHz K8-class CPU) > real memory = 4294967296 (4096 MB) 4 GB RAM and _old_? ;-) > Brand new freebsd-12 install as of yesterday. I think ZFS might just > kill it though. Having 8+ GB RAMM for ZFS is probably a good choice, but if speed isn't a primary concern (maybe because it's limited by network) 4 GB RAM will of course work. > 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. The disk does this internally. When bad blocks start "bubbling up", it indicates that the disk ran out of spare blocks for automatic remapping. In this case, the disk is usually starting to die, suggesting to replace it. > 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 > 198 Offline_Uncorrectable ----CK 100 253 000 - 0 > 196 Reallocated_Event_Count -O--CK 196 196 000 - 4 > 194 Temperature_Celsius -O---K 104 089 000 - 39 > > Basically, I want that Current_Pending_Sector number to go to 0. I guess > if it doesn't, then it's either replace the disk or it's time to dispose > of the netbook. Probably replacing the disk is the better choice when the netbook itself isn't faulty. > Right now it's rebuilding 12 with witness/invariants > disabled, so I can't really do the dd thing I earlier asked about right > now. I just needed to know if it could be run without having to reinstall. Usually yes. Rebuilding world is also a convenient stress test both for the disk and the machine (CPU and RAM). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...