View Single Post
  #2 (permalink)  
Old 04-Jul-2009, 18:54
microchip8's Avatar
microchip8 microchip8 is online now
Shaman Penguin
 
Join Date: Jun 2008
Location: /dev/belgium
Posts: 2,203
microchip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the roughmicrochip8 is a reputation jewel in the rough
Default Re: checking disk for errors

There's a difference between a corrupted filesystem and actual physical damaged blocks on the disk itself. What Ubuntu does is check the filesystem itself which SUSE also does after a set period of time which can be controlled by the tune2fs program (assuming you're using Ext2/3 file system). Also if power goes off suddenly, Ext3 upon boot will replay its journal so you'll be safe (in most cases)

from man tune2fs
Quote:
-i interval-between-checks[d|m|w]
Adjust the maximal time between two filesystem checks. No postfix or d result in
days, m in months, and w in weeks. A value of zero will disable the time-depen-
dent checking.
tune2fs -i 2m /dev/sdXX (replace XX accordingly - will set check interval for 2 months).

To see the interval between checks: tune2fs -l /dev/sdXX (replace XX accordingly)
and look for "Last Checked" and "Check Interval"

if, on the other hand, you want to check the disk itself for physical problems, you can use as root the badblocks utility

badblocks -b 4096 -n -s /dev/sdXX (change XX accordingly)
__________________
My site: http://microchip.bplaced.net
My repo: http://download.opensuse.org/repositories/home:/microchip8
SUSE Unbound Forum: http://suseunbound.lefora.com


Do coders dream of sheep() ?
Reply With Quote