Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 2009 10:55:04 -0600
From:      Geoff Fritz <gfritz@gmail.com>
To:        "John ." <comp.john@googlemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: please recommend a disk-exercising program?
Message-ID:  <20090607165504.GA67823@dev.null>
In-Reply-To: <abc784790906070243t419d8ebbp59a68af23e902004@mail.gmail.com>
References:  <abc784790906070243t419d8ebbp59a68af23e902004@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 07, 2009 at 10:43:40AM +0100, John . wrote:
> Hello list,
> 
> Can anyone please recommend to me a program that will stress-test a
> disk? If it matters, two are connected by firewire, another via usb.
> Filesystem is ufs. I think I have a disk that might be about to fail,
> but it only sometimes errors when under stress. I need to see if it
> was a fluke or to really make it fail, so that I can get rid of it.

I believe that the "badblocks" util is what you're looking for.  It can
be found in the sysutils/e2fsprogs port.  It has both destructive and
non-destructive modes.  I've used it on Linux and FreeBSD, and it can
really exercise the disk well.

I've seen several mentions of "dd" in this thread, and I'll say that I've
seen several recommendations elsewhere to use a simple:

	dd if=/dev/<device> of=/dev/<device>

to "refresh" the drive.  That is, dd will read the block(s), then attempt to
write them back, and if there are problems, the drive should re-map the sector
to one without problems.  Though the dd_rescue/ddrescue/dd-rescue ports are
more tolerant of errors than the stock dd util.

Personally, I'd recommend badblocks before trying anything else.

-- Geoff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090607165504.GA67823>