On Tue, 5 Sep 2006, Paul Waldo wrote:
> Gordon Henderson wrote:
> > On Tue, 5 Sep 2006, Steve Cousins wrote:
> [snip]
> > and my weekly badblocks script looks like:
> >
> > #!/bin/csh
> >
> > echo "`uname -n`: Badblocks test starting at [`date`]"
> >
> > foreach disk ( a c )
> > foreach partition ( 1 2 3 5 6 )
> > echo -n "hd$disk${partition}: "
> > badblocks -c 128 /dev/hd$disk$partition
> > end
> > echo ""
> > end
> >
> > echo "`uname -n`: Badblocks test ending at [`date`]"
> [snip]
>
> Maybe I'm missing something, but are these partitions mounted? Here's what I
> get when I do this on a mounted partition:
>
> [EMAIL PROTECTED] ~]# badblocks -nsv /dev/md0
> /dev/md0 is mounted; it's not safe to run badblocks!
Do not use the -n option... (and -s won't be much use in a cron job, nor
-v, probably!) -n will write to the device which might well have issues
with the filesystem cache...
By reading the underlying drives you won't trigger a raid array failure
should you do see a bad sector, which might give you time to go something
about it. There was some emails on this list some time back (year or 2,3?)
about badblocking the md? device - I imagine it might not read every block
of every device unless it was a raid-0 array...
Gordon
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html