From owner-freebsd-stable@FreeBSD.ORG Fri Jan 27 12:42:00 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B3B8106564A for ; Fri, 27 Jan 2012 12:42:00 +0000 (UTC) (envelope-from peter.maloney@brockmann-consult.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mx1.freebsd.org (Postfix) with ESMTP id 263C78FC0A for ; Fri, 27 Jan 2012 12:42:00 +0000 (UTC) Received: from [10.3.0.26] ([141.4.215.32]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Md4Bm-1S7sNF37oY-00IFzy; Fri, 27 Jan 2012 13:29:23 +0100 Message-ID: <4F2298A3.4030204@brockmann-consult.de> Date: Fri, 27 Jan 2012 13:29:23 +0100 From: Peter Maloney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20120127024815.GD17973@in-addr.com> <20120127030906.GA67449@icarus.home.lan> <20120127031351.GA67596@icarus.home.lan> <20120127034352.GG17973@in-addr.com> In-Reply-To: <20120127034352.GG17973@in-addr.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:xpGay2SBmC1ojozFhpw/claDvwcNLFRC33JNXizGsuK StUDhdUPx+lwnKw3C6jXGNnvn5xdcksJUWNhik9VDgUebb7bQR 1wn/yqpaJvGbgFMJu7u/yMrY8C9fit6vt4MbOXBe5phmsfYmUf C/dYbhshD+Umy9OaZgZli/lPM5hr+elu+IOZSTdzPyRakFwMsm 8QJCbckOdlq4FPISfOX8KGvZuCV2LIWfoN5APLidELSgj1Co8z bLrxSX2Z6jsYgsPxcMyHLpRetH9aTsrn0ZP2caewt8B08HhSKB E3lU3xxtRW4ZHjAil75m+F6yVWrnojGQbrraKK52gmSI5BPmcB 24GQv+qTPfoAKVdJ9XbNCYuJf8wsUI5MqiUl6LOlO Subject: Re: Panic on 7.4-RELEASE-p5 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 12:42:00 -0000 On 01/27/2012 04:43 AM, Gary Palmer wrote: > > After scanning selected spans, do NOT read-scan remainder of disk. > If Selective self-test is pending on power-up, resume after 0 minute delay. > > I noticed a while ago that there were some "bad" sectors on the disk, and > at the time they were under the swap partition if my math was correct, > and the box never swaps so it wasn't a problem. I don't know if > the errors above are the same ones I saw earlier or not. > > There were no read or write errors on the console prior to the panic > earlier today. In fact the previos output on the console relates to > the last reboot for a software upgrade (fixing some packages) 11 > days prior. The only thing in logs going back to November relating > to ad1 are boot messages. > > Thanks, > > Gary > Unmount your swap, and then write zeros to it to relocate the bad sectors. in one shell: gstat -I 100ms -f da#p# in another: swapoff /dev/da#p# sysctl kern.geom.debugflags=0x10 dd if=/dev/zero of=/dev/da#p# bs=1M (eventually it stops saying end of device or no space left; at this point I am not sure if you should then continue writing where it stopped in 512 byte blocks, or if it wrote a partial 1M in the last 1M) Watch first shell. If the speed goes up, settles at a certain number, then wildly goes down low and back up to that number, it is possibly working. Then repeat. If the same wild fluctuations happen, then the drive didn't relocate enough, because it is trying to keep some semi-bad ones, or they are only bad when reading. If it is just settling at a speed and staying there, then it is probably successful. I don't know how reliable it is. I have found it to be 100% reliable in my testing though. But some/most disks lie to you on the "relocated sector count". And then remount the swap and change that kernel parameter back. sysctl kern.geom.debugflags=0 swapon /dev/da#p# Your relocated sector count: 5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0 However, this does not fix your disk. eg. If you have heads grinding the platter, you have dust flying around, and your disk will get worse. Be VERY careful using dd to write directly to disks. If you use the wrong slice, or you use the main device without slices and miscalculate, bad things happen. This is why that kernel parameter was set to stop you. > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- -------------------------------------------- Peter Maloney Brockmann Consult Max-Planck-Str. 2 21502 Geesthacht Germany Tel: +49 4152 889 300 Fax: +49 4152 889 333 E-mail: peter.maloney@brockmann-consult.de Internet: http://www.brockmann-consult.de --------------------------------------------