Filesystem maintenance

Rashkae ubuntu at tigershaunt.com
Mon Sep 3 03:07:43 UTC 2007


Jeff wrote:
> Greetings.
> I am running an Ubuntu Linux 7.04 server (ran a 6.06, then 6.10, and now 
> the 7.04).  The server works great, with one exception.
> 
> I have heard about Linux stability.  However, as the server runs 24/7 
> and never needs rebooting, after a while, the hard drive develops 
> problems.  This past spring, I let the thing run without any rebooting 
> or maintenance, and after about 4 months ended up with a read-only file 
> system, had to run FSCK and had major problems once the drive finally 
> came back to usability.  Since then, I have tried to run FSCK about once 
> every week or two.
> 
> I have some experience with Linux, but not extensive.  Here are my 
> questions.
> 
> 1. Is FSCK the way to keep the disk drive running well?

yes, though normally, you shouldn't have to run FSCK at all.  The more 
interesting question here is why you ended up with a corrupted file 
system to begin with.

It's possible the corruption occurred during a power failure or other 
unexpected system halt without unmounting the filesystem.  EXT3 is, in 
theory, Journaled and should recover from these seamlessly, but since it 
lacks any kind of hash check on journal entries, it is possible for 
corruption to occur is a write to the journal is not properly flushed 
from the hard drive's own write cache.

I would, however, familiarize myself with the smartctl utility to turn 
on SMART monitoring of your hard drive and  check there for any 
irregularities (in particular, look for
Re-Mapped sectors, which would indicate that the harddrive had bad 
sectors.  If this number increases, I would replace the drive asap)
It also wouldn't hurt to run badblocks on the drive.




More information about the ubuntu-users mailing list