filesystem information

Roland Smith rsmith at xs4all.nl
Mon Jun 30 17:04:03 UTC 2008


On Mon, Jun 30, 2008 at 12:30:38PM -0400, Jim wrote:
> On Mon, Jun 30, 2008 at 7:30 AM, Bill Moran <wmoran at potentialtech.com> wrote:
> > In response to Jim <stapleton.41 at gmail.com>:
> >
> >> I have a computer that is in a situation where it is losing power
> >> occasionally. All but one of the filesystems are going along fine.
> >> Once file system seems to lose data on a power outage. Even if it only
> >> reads a file, and doesn't write it, it may still lose a file (ex,
> >> about half the audio files on my xmms playlist, a couple data files in
> >> my wine directory that, to my knowledge, are unlikely to be written
> >> after they are first installed).
> >>
> >> What I'd like to do is get an output of the flags and options on my
> >> filesystems to see what is different between that filesystem and the
> >> others. Any suggestion on how to do that? This particular FS has
> >> lasted through several rebuilds since it doesn't hold OS critical
> >> stuff, just data files.
> >
> > tunefs -p and/or dumpfs -m
> >
> >> Any suggestions?
> >
> > Sounds like you're on the right track with hunting this down.  Perhaps
> > turn softupdates off and mount the filesystem sync if you're seeing
> > lots of power outages.

Ans set 'hw.ata.wc="0"' in /boot/loader.conf to stop the drives from
caching writes.

> Thanks, it looks like the 'good' filesystems have softupdates off
> (except one), and the one the broke has it off. I thought softupdates
> were supposed to fix this? Is gjournal a better solution? Is 'just use
> neither' a better solution? 

WRT softupdates/gjournal, see below.

In case of frequent power outages, I guess the right answer is "get a
UPS". :)

Without a UPS nothing can protect you against power outages. Even when
running the filesystem with the sync flag and setting ATA devices to
write-through the cache cannot guarantee you won't lose data. If the
power fails when a write is in progress, you're screwed.

A proper UPS with monitoring software will give your system time to shut
down properly (finishing writes, unmounting etc) before its battery runs out. 

> Any reference material on the subject

See http://en.wikipedia.org/wiki/Soft_updates :

  Instead of duplicating metadata writes in a journal, soft updates work
  by properly ordering the metadata writes to guarantee consistency
  after a crash. Like journaling, soft updates do not guarantee that no
  data will be lost, but do make sure the filesystem is consistent

In FreeBSD softupdates have a longer track record than journaling. 

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080630/dc4c418c/attachment.pgp


More information about the freebsd-questions mailing list