Date: Sun, 20 Aug 2006 16:07:11 +0200 From: "Daniel Eriksson" <daniel_k_eriksson@telia.com> To: <freebsd-current@freebsd.org> Subject: RE: Avoiding bad sectors? Message-ID: <4F9C9299A10AE74E89EA580D14AA10A605F5CD@royal64.emp.zapto.org> In-Reply-To: <44E83900.4020108@inse.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
First thing you should do is run a SMART selftest on the device using smartmontools: smartctl -t long /dev/adX Poll the status of the selftest using: smartctl -a /dev/adX until the selftest has finished (an hour or two) or aborted. This can be done while in multiuser mode, but beware that disc accesses will be slower than usual. If you want to "fix" the problem and avoid downtime, then move swap to another slice (possibly an inode-backed md device, if that is possible) and fill the bad slice using 'dd'. Not sure if taking the data from /dev/random instead of /dev/zero makes any difference, but it will not hurt you other than by adding some time to the operation. Once you've written to the bad slice you probably want to re-run the SMART selftest to make sure it passes without any more failures. /Daniel Eriksson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F9C9299A10AE74E89EA580D14AA10A605F5CD>