consistent file system inconsistencies (tried replacing drive)

Jeremy Chadwick freebsd at jdc.parodius.com
Fri Oct 15 18:15:51 UTC 2010


On Fri, Oct 15, 2010 at 02:06:32PM -0400, Scott Charron wrote:
> I did not create a separate /tmp filesystem so I would guess /tmp is part of
> root.  I will symlink it to /var/tmp (if it's not already).
> 
> Thanks I'll enable soft-updates and try.  It's odd though because
> soft-updates are turned off by default on the root FS (when you are
> partitioning during install).  Also I was under the impression soft-updates
> would actually require a little more disk access time and thus make the
> problem slightly worse.
> 
> I am open to try it, but I'm not sure why it would help.
> 
> I wouldn't say I have frequent outages, but enough to be very annoying on
> this particular system because console/vga access is difficult.
> 
> Thank you,
> 
> On Fri, Oct 15, 2010 at 11:54 AM, Oliver Fromme <olli at lurza.secnetix.de>wrote:
> > Scott Charron <shewless at unleashed-web.org> wrote:
> >  > As requested, the output of mount and /etc/fstab (and df):
> >
> > I notice that you don't have soft-updates enabled on the
> > root file system, but e.g. /tmp is part of your root file
> > system (or is it a symlink to /var/tmp?).  This is a
> > sub-optimal configuration.
> >
> > Please enable soft-updates on the root file system ("tunefs
> > -n enable /" in single-user mode, then reboot, and verify
> > after rebooting with "mount" that it really is enabled).
> > This might fix your problem, or at least alleviate it.
> >
> > If you have power failures very often, you should also
> > consider getting a UPS.  Frequent power failures are
> > particularly bad for hard disks; they can cause physical
> > damage.

Can you get into single-user mode?  Or boot a LiveFS CD alternatively
(preferably running the exact same version of the kernel/system as your
boot disk is using)?

I would advocate doing so, then using "fsck -f" on all of your
individual filesystems (whatever's listed in /etc/fstab).  Do them
individually, one at a time.  You may want to use the -y flag as well.

If you see filesystem problems on your non-root filesystem as well, e.g.
ones with SU (soft-updates) applied, I would recommend setting
background_fsck="no" in your /etc/rc.conf.  There are some old threads
documenting how background filesystem checks don't always fix all
problems before the system starts actually using the filesystem.  There
were reports of people finding that manual fsck would detect issues that
background fsck wouldn't fix.  YMMV.

Footnote question: why is your system regularly losing power?  Unless
you're using a journalling filesystem, AFAIK you'll be susceptible to
data loss.  SU won't fix this problem either.  Think about what's
actually happening to all of the hardware pieces (literally), and what
happens to your data (RAM vs. in-transport vs. hard disk cache).

-- 
| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |



More information about the freebsd-fs mailing list