xfs
[Top] [All Lists]

XFS, empty files after a crash

To: xfs@xxxxxxxxxxx
Subject: XFS, empty files after a crash
From: kfx <kadafax@xxxxxxxxx>
Date: Tue, 21 Feb 2012 13:01:43 +0100
Authentication-results: mr.google.com; spf=pass (google.com: domain of kadafax@xxxxxxxxx designates 10.204.133.201 as permitted sender) smtp.mail=kadafax@xxxxxxxxx; dkim=pass header.i=kadafax@xxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=LWRlemmi0f77ElIsTThCcWwd6IVtd1T5OSUjz9weqoA=; b=tqOw29mPWKoVtd1gx7B1nleqmJq3yQ8bLVODQp59mEJNv0CBGYcP8Q/i9g1EHjmqg/ afYd3SU9ZIK/v/BkK/SQekp9GNr+RpucWLLbvtvKYg8DAanTP1oxfQZbCBSCz3vRSUaJ a0DxS2Fmq2VUoAO1VpYcKN35FqbSfSL5VInXk=
Reply-to: kadafax@xxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120212 Thunderbird/10.0.1
Hi,

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 ?

Example for a previously not empty file:
# ls -l myfile
-rw-r--r-- 1 me me 0 2012-01-24 15:29 myfile

# du  myfile
27460    myfile

# du --apparent-size myfile
0    myfile

# xfs_bmap myfile
myfile: no extents

System: Ubuntu 11.04  2.6.38-8-server x86_64

xfs_info /dev/sdc1
meta-data=/dev/sdc1 isize=256 agcount=10, agsize=268435328 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=2441215488, imaxpct=5
         =                       sunit=128    swidth=640 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=8 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

Thank you

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