public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* XFS, empty files after a crash
@ 2012-02-21 12:01 kfx
  2012-02-21 16:25 ` Peter Grandi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: kfx @ 2012-02-21 12:01 UTC (permalink / raw)
  To: xfs

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

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-02-28  1:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-02-27  1:04 ` Dave Chinner
2012-02-27  8:43   ` kadafax
2012-02-28  1:39     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox