soft updates / short or lost files after system crash

Arne Wörner arne_woerner at yahoo.com
Fri Sep 17 13:22:54 PDT 2004


Hi!

I experienced
a. short and
b. disapeared
files on two of my ufs2 fs with soft updates enabled (in an intentional system
crash caused by pressing the reset button).

Test cases:{
1.
I did a
> dd if=/dev/zero of=a bs=1 [where a was in the fs on ad1s1e]
and when the file a was about 1MB, I pressed the reset button (I wanted to do a
sync shortly before pressing the button, but I am not sure now, if I did).
After the next reboot background fsck logged some messages (see appendix A).
The file a disapeared.

2.
I did a
> dd if=/dev/zero of=/root/a bs=1 & dd if=/dev/zero of=/opt/a & sync ; sleep 20
; sync
[where /root/a is in a non-soft-updates fs; and /opt/a is in a soft-updates fs]
and pressed the reset button shortly after the second sync, when the files
where about 2MB.
After the next reboot ackground fsck logged some messages (see appendix B).
The file /root/a was about 2MB and /opt/a just 2K.
}

I was quite sure, that a sync would bring every unclean block to disc before it
terminates or abount at its termination time.

Did I do something wrong (maybe mis-configuration)?
Is there a bug in the soft updates configuration?
Should I write a bug report?

Thank you for your time.

Bye
Arne

appendix A:
Sep 17 19:23:31 neo fsck: /dev/ad1s1e: Reclaimed: 0 directories, 1 files, 424
fragments 
Sep 17 19:23:31 neo fsck: /dev/ad1s1e: 106404 files, 26065010 used, 33244724
free (4620 frags, 4155013 blocks, 0.0% fragmentation)

appendix B:
Sep 17 19:38:02 neo fsck: /dev/ad1s1e: INCORRECT BLOCK COUNT I=3 (3712 should
be 4) (CORRECTED) 
Sep 17 19:38:02 neo fsck: /dev/ad1s1e: Reclaimed: 0 directories, 0 files, 929
fragments 
Sep 17 19:38:02 neo fsck: /dev/ad1s1e: 106254 files, 26058903 used, 33250326
free (4614 frags, 4155714 blocks, 0.0% fragmentation) 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


More information about the freebsd-fs mailing list