Date: Fri, 27 Jan 2012 13:29:23 +0100 From: Peter Maloney <peter.maloney@brockmann-consult.de> To: freebsd-stable@freebsd.org Subject: Re: Panic on 7.4-RELEASE-p5 Message-ID: <4F2298A3.4030204@brockmann-consult.de> In-Reply-To: <20120127034352.GG17973@in-addr.com> References: <20120127024815.GD17973@in-addr.com> <20120127030906.GA67449@icarus.home.lan> <20120127031351.GA67596@icarus.home.lan> <20120127034352.GG17973@in-addr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 --------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F2298A3.4030204>