X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q1LC1lMo173913 for ; Tue, 21 Feb 2012 06:01:47 -0600 X-ASG-Debug-ID: 1329825705-04cb6c0fb754760001-NocioJ Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by cuda.sgi.com with ESMTP id RDrrPchlXWnDFFTg (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 21 Feb 2012 04:01:46 -0800 (PST) X-Barracuda-Envelope-From: kadafax@gmail.com X-Barracuda-Apparent-Source-IP: 209.85.214.53 Received: by bkcit16 with SMTP id it16so5936171bkc.26 for ; Tue, 21 Feb 2012 04:01:45 -0800 (PST) Received-SPF: pass (google.com: domain of kadafax@gmail.com designates 10.204.133.201 as permitted sender) client-ip=10.204.133.201; Authentication-Results: mr.google.com; spf=pass (google.com: domain of kadafax@gmail.com designates 10.204.133.201 as permitted sender) smtp.mail=kadafax@gmail.com; dkim=pass header.i=kadafax@gmail.com Received: from mr.google.com ([10.204.133.201]) by 10.204.133.201 with SMTP id g9mr13473630bkt.137.1329825705394 (num_hops = 1); Tue, 21 Feb 2012 04:01:45 -0800 (PST) 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= Received: by 10.204.133.201 with SMTP id g9mr10847044bkt.137.1329825705329; Tue, 21 Feb 2012 04:01:45 -0800 (PST) Received: from [139.124.5.5] ([139.124.5.5]) by mx.google.com with ESMTPS id w15sm45125731bku.0.2012.02.21.04.01.44 (version=SSLv3 cipher=OTHER); Tue, 21 Feb 2012 04:01:44 -0800 (PST) Message-ID: <4F4387A7.2070009@gmail.com> Date: Tue, 21 Feb 2012 13:01:43 +0100 From: kfx Reply-To: kadafax@gmail.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120212 Thunderbird/10.0.1 MIME-Version: 1.0 To: xfs@oss.sgi.com Subject: XFS, empty files after a crash Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-ASG-Orig-Subj: XFS, empty files after a crash Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail-bk0-f53.google.com[209.85.214.53] X-Barracuda-Start-Time: 1329825706 X-Barracuda-Encrypted: RC4-SHA X-Barracuda-URL: http://192.48.176.15:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.3 tests=DKIM_SIGNED, DKIM_VERIFIED X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.89105 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- -0.00 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 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