public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Peter Grandi <pg_xf2@xf2.for.sabi.co.UK>
Cc: Linux fs XFS <xfs@oss.sgi.com>
Subject: Re: XFS, empty files after a crash
Date: Tue, 21 Feb 2012 21:18:55 -0600	[thread overview]
Message-ID: <4F445E9F.5030003@sandeen.net> (raw)
In-Reply-To: <20291.50554.414722.399249@tree.ty.sabi.co.UK>

On 2/21/12 10:25 AM, Peter Grandi wrote:
>> Hi, After a crash, a lot of files on a xfs file system report
>> an empty size with "ls -a" but not with "du". [ ... ]
> 
> It is a FAQ:
> 
>   http://xfs.org/index.php/XFS_FAQ#Q:_Why_do_I_see_binary_NULLS_in_some_files_after_recovery_when_I_unplugged_the_power.3F
> 
> Usually it is a good idea to do a web search before reporting a
> problem.

He seems to be reporting a different problem.

In the FAQ case above, one would get a file but "it has is a size but no extents " - i.e. ls -l would show 1M, but du would show 0, and no extents are allocated.

In this case, he has no size, blocks are reported used, but no extents are allocated.  That actually seems like a new/odd case.

>> Is there a way to copy back the used blocks to recover the
>> files ?
> 
> No, because your applications told XFS that the content of those
> blocks could be thrown away in case of crash.

> It is your responsibility to ensure that your applications use
> 'fsync' or at least 'fsyncdata' when data should be stored
> permanently before a crash occurs.

I'd agree that there is likely nothing to recover; there are no extents allocated.  I'm not sure why du is reporting space used though.

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-02-22  3:18 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 [this message]
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
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=4F445E9F.5030003@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=pg_xf2@xf2.for.sabi.co.UK \
    --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