From: Stan Hoeppner <stan@hardwarefreak.com>
To: kadafax@gmail.com
Cc: xfs@oss.sgi.com
Subject: Re: XFS, empty files after a crash
Date: Tue, 21 Feb 2012 11:39:23 -0600 [thread overview]
Message-ID: <4F43D6CB.3010508@hardwarefreak.com> (raw)
In-Reply-To: <4F4387A7.2070009@gmail.com>
On 2/21/2012 6:01 AM, kfx wrote:
> After a crash, a lot of files on a xfs file system report an empty size
> with "ls -a" but not with "du".
> xfs_check and xfs_repair don't report any problem to repair (although an
> internal log is used) :(
> So if I understand correctly, those empty files actually use space on
> the disk but are incorrectly reported as empty by the system.
> Is there a way to copy back the used blocks to recover the files ?
What was the nature of the crash? Kernel panic? Power failure? Other?
Do you have have backups of previously existing files that are now shown
as zero size? If so delete and restore, maybe just overwrite.
For new files that were in the process of being created you're simply
out of luck. The metadata may have hit the journal but the file data in
buffer cache was lost.
In memory write buffering/ordering techniques are what give modern
filesystems their write throughput performance. Unfortunately this
comes at a cost, when systems crash. As Peter mentioned, one way to
mitigate this is coding apps to sync their writes. This obviously has a
performance impact. Another is possibly to mount filesystems with the
sync option, which will obviously severely impact write performance.
Both will prevent or at least lessen the carnage you've seen as a result
of this crash. You may not be able to live the performance of the
latter, though.
--
Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-02-21 17:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 12:01 XFS, empty files after a crash kfx
2012-02-21 16:25 ` Peter Grandi
2012-02-22 3:18 ` Eric Sandeen
2012-02-23 19:38 ` Nathaniel W. Turner
2012-02-23 20:07 ` kadafax
2012-02-23 22:15 ` Nathaniel W. Turner
2012-02-24 10:21 ` kadafax
2012-02-21 17:39 ` Stan Hoeppner [this message]
2012-02-27 1:04 ` Dave Chinner
2012-02-27 8:43 ` kadafax
2012-02-28 1:39 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F43D6CB.3010508@hardwarefreak.com \
--to=stan@hardwarefreak.com \
--cc=kadafax@gmail.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox