SoftUpdates/fsck considered harmful

Brian Fundakowski Feldman green at
Sat Feb 21 13:32:37 PST 2004

I lost some data which was important to me (thankfully, not lost completely, 
as a fgrep on the hard disk was able to find a copy) because of a crash 
while SoftUpdates had some data not yet flushed.  I simply had done this:

1. vi file
2. *edit edit edit, :wq*
3. ci file
4. co -l file

That should have left me with several copies of it, but when the system 
panicked, upon reboot fsck told me:

Feb 19 21:34:46 green fsck: /dev/ad0s2e: UNREF FILE I=448021  OWNER=green MODE=100644
Feb 19 21:34:46 green fsck: /dev/ad0s2e: SIZE=6298 MTIME=Feb 19 20:38 2004  (CLEARED)

I'm certain this was the file I was editing.  SoftUpdates only guarantees 
the disk is in a valid state, not that I won't lost files, but if fsck 
hadn't decided that "UNREF" meant "the user did not intend this file to 
exist any longer", I would have had a copy of it in /home/lost+found!  Can 
there please be a less harmful behavior than simply not restoring unlinked 
files just because they appear to be "UNREF"?

Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\

More information about the freebsd-fs mailing list