[Top] [All Lists]

Re: XFS, empty files after a crash

To: Peter Grandi <pg_xf2@xxxxxxxxxxxxxxxxxx>
Subject: Re: XFS, empty files after a crash
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 21 Feb 2012 21:18:55 -0600
Cc: Linux fs XFS <xfs@xxxxxxxxxxx>
In-reply-to: <20291.50554.414722.399249@xxxxxxxxxxxxxxxxxx>
References: <4F4387A7.2070009@xxxxxxxxx> <20291.50554.414722.399249@xxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
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 

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.


<Prev in Thread] Current Thread [Next in Thread>