Debian Bug report logs - #420764
xfsprogs: Filsystem no longer accessible after deleting directories in lost+found~

version graph

Package: xfsprogs; Maintainer for xfsprogs is XFS Development Team <linux-xfs@vger.kernel.org>; Source for xfsprogs is src:xfsprogs (PTS, buildd, popcon).

Reported by: Benjamin Leipold <rabbit171@web.de>

Date: Tue, 24 Apr 2007 15:03:02 UTC

Severity: important

Found in version xfsprogs/2.8.18-1

Fixed in versions xfsprogs/2.9.8-1, xfsprogs/2.9.4-1

Done: Niv Sardi <xaiki@debian.org>

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Nathan Scott <nathans@debian.org>:
Bug#420764; Package xfsprogs. (full text, mbox, link).


Acknowledgement sent to Benjamin Leipold <rabbit171@web.de>:
New Bug report received and forwarded. Copy sent to Nathan Scott <nathans@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Benjamin Leipold <rabbit171@web.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: xfsprogs: Filsystem no longer accessible after deleting directories in lost+found~
Date: Tue, 24 Apr 2007 17:01:33 +0200
Package: xfsprogs
Version: 2.8.18-1
Severity: important

Running xfs_repair gives me following message: "disconnected dir inode xxxx, moving to lost+found".
If i then try to delete this directory in lost+found, the filesystem is no longer accessible.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-6+r1 (PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xfsprogs depends on:
ii  libc6                         2.5-4      GNU C Library: Shared libraries
ii  libreadline5                  5.2-2      GNU readline and history libraries
ii  libuuid1                      1.39-1.1   universally unique id library

xfsprogs recommends no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Nathan Scott <nathans@debian.org>:
Bug#420764; Package xfsprogs. (full text, mbox, link).


Acknowledgement sent to nscott@aconex.com:
Extra info received and forwarded to list. Copy sent to Nathan Scott <nathans@debian.org>. (full text, mbox, link).


Message #10 received at 420764@bugs.debian.org (full text, mbox, reply):

From: Nathan Scott <nscott@aconex.com>
To: Benjamin Leipold <rabbit171@web.de>, 420764@bugs.debian.org
Subject: Re: Bug#420764: xfsprogs: Filsystem no longer accessible after deleting directories in lost+found~
Date: Thu, 26 Apr 2007 10:07:48 +1000
On Tue, 2007-04-24 at 17:01 +0200, Benjamin Leipold wrote:
> ...
> Running xfs_repair gives me following message: "disconnected dir inode xxxx, moving to lost+found".
> If i then try to delete this directory in lost+found, the filesystem is no longer accessible.

This is a known problem to upstream, they're working on it AFAIK.
Temporary workaround is to not rmdir that directory.

They would be interested in a copy of your filesystem metadata in
order to verify the fix, if you don't mind sharing it (there is a
script which will extract just the metadata, not the data, so the
entire FS isnt needed) - let me know if you'd like to help out in
this way, and I'll put you onto the relevent person at SGI.

cheers.

-- 
Nathan




Information forwarded to debian-bugs-dist@lists.debian.org, Nathan Scott <nathans@debian.org>:
Bug#420764; Package xfsprogs. (full text, mbox, link).


Acknowledgement sent to Markus Fleck-Graffe <fleck@isoc.de>:
Extra info received and forwarded to list. Copy sent to Nathan Scott <nathans@debian.org>. (full text, mbox, link).


Message #15 received at 420764@bugs.debian.org (full text, mbox, reply):

From: Markus Fleck-Graffe <fleck@isoc.de>
To: 387057@bugs.debian.org, 420764@bugs.debian.org
Subject: Problems with xfs_repair and deleting directories in /lost+found
Date: Thu, 16 Aug 2007 08:21:26 +0200
#387057
#420764

These bugs apparently correspond to SGI XFS bugzilla bug #723
at <URL:http://oss.sgi.com/bugzilla/show_bug.cgi?id=723>.

A current version of xfs_repair should not exhibit this bug
any more (xfsprogs >= 2.8.16).

The upstream bug report recommends the use of "xfs_repair -P"
when using version 2.8.11, in order to restore some of the old,
still working, 2.8.10 behaviour.

Please note that apparently the "xfs_check" tool is *not* being
obsoleted (contrary to what Nathan Scott writes in Debian bug
report #387057), but that "xfs_check" explicitly uses a different
implementation (of the same "on-disk" XFS filesystem structure spec)
than "xfs_repair" in order to allow for those two tools to
"cross-check" each other. (Source: SGI XFS internals tutorial at
http://oss.sgi.com/projects/xfs/training/index.html)

The following are instructions how to to manually repair
the problem.

If your root filesystem is affected, you will need to boot
into a different Linux system (such as the Knoppix live CD).

I got the following kernel (dmesg) message when deleting the
affected directory (which had been created after running
"xfs_repair" on the filesystem) from /lost+found, and then
unmounting the affected filesystem (in my case, /dev/md0):

--- CUT ---
xfs_inotobp: xfs_imap()  returned an error 22 on md0.  Returning error.
xfs_iunlink_remove: xfs_inotobp()  returned an error 22 on md0.
Returning error.
xfs_inactive:   xfs_ifree() returned an error = 22 on md0
xfs_force_shutdown(md0,0x1) called from line 1780 of file
fs/xfs/xfs_vnodeops.c.  Return address = 0xfb13f728
Filesystem "md0": I/O Error Detected.  Shutting down filesystem: md0
Please umount the filesystem, and rectify the problem(s)
xfs_force_shutdown(md0,0x1) called from line 424 of file
fs/xfs/xfs_rw.c.  Return address = 0xfb13f728
xfs_force_shutdown(md0,0x1) called from line 424 of file
fs/xfs/xfs_rw.c.  Return address = 0xfb13f728
--- CUT ---

Because my root partition was affected, this message was
also displayed on shutdown (when unmounting the root filesystem),
keeping the system from powering off, and possibly also leading
to some data loss.

I used "xfs_check" to cross-check /dev/md0,
and got the following output:

--- CUT ---
# xfs_check /dev/md0
link count mismatch for inode 18262829 (name ?), nlink 0, counted 2
--- CUT ---

I used the following command line to display the data of the
affected directory inode:

--- CUT ---
# xfs_db -r -c 'inode 18262829' -c print /dev/XXX
--- CUT ---

(Of course, you will need to adjust the inode number and
partition device name with your own data.)

For the following to work, you must make sure that the value
of "core.nlinkv1", as printed by the previous command
("xfs_db ..."), is really "= 0" (as reported by "xfs_check").

NOTE: use the commands below only if you are absolutely sure that
the affected directory is really empty! If it isn't, you must
mount the filesystem, "mv" (or, if you can afford to remove
the files, "rm") any files from the directory somewhere else
(but do *not* remove the directory), sync, and unmount the
filesystem again.

I was able to remove the inconsistency using the following
command (NOTE: the affected filesystem must be unmounted
at that point):

--- CUT ---
# xfs_db -x -c 'inode XXX' -c 'write core.nextents 0' /dev/hdXX
# xfs_db -x -c 'inode XXX' -c 'write core.size 0' /dev/hdXX
# xfs_db -x -c 'inode XXX' -c 'write core.nlinkv1 2' /dev/hdXX
# sync
--- CUT ---

(where the "2" value comes from the "xfs_check" message above)

After that, I could re-mount the filesystem, remove the affected
directory (in my case, "/lost+found/18262829"), and unmount the
filesystem without any errors. Just in case, it might be a good
idea to run both "xfs_repair" and "xfs_check" on the filesystem
once again to ensure that there are no remaining inconsistencies.

DISCLAIMER: Please note that while the XFS filesystem is apparently
quite well-documented, and comes with a set of rather well-designed
low-level tools (like "xfs_db"), it is still very risky to use any of
the above commands on your filesystem. Some loss of data is in fact
rather likely once your file system has been messed up to the
point described above. I will not assume any warranty that the
above commands will work for your system as well as they did for me.
YOU HAVE BEEN WARNED! :)

Best of luck,
Markus Fleck-Graffe



Reply sent to Niv Sardi <xaiki@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Benjamin Leipold <rabbit171@web.de>:
Bug acknowledged by developer. (full text, mbox, link).


Message #20 received at 420764-close@bugs.debian.org (full text, mbox, reply):

From: Niv Sardi <xaiki@debian.org>
To: 420764-close@bugs.debian.org
Subject: Bug#420764: fixed in xfsprogs 2.9.4-1
Date: Wed, 31 Oct 2007 04:17:03 +0000
Source: xfsprogs
Source-Version: 2.9.4-1

We believe that the bug you reported is fixed in the latest version of
xfsprogs, which is due to be installed in the Debian FTP archive:

xfslibs-dev_2.9.4-1_i386.deb
  to pool/main/x/xfsprogs/xfslibs-dev_2.9.4-1_i386.deb
xfsprogs-udeb_2.9.4-1_i386.udeb
  to pool/main/x/xfsprogs/xfsprogs-udeb_2.9.4-1_i386.udeb
xfsprogs_2.9.4-1.diff.gz
  to pool/main/x/xfsprogs/xfsprogs_2.9.4-1.diff.gz
xfsprogs_2.9.4-1.dsc
  to pool/main/x/xfsprogs/xfsprogs_2.9.4-1.dsc
xfsprogs_2.9.4-1_i386.deb
  to pool/main/x/xfsprogs/xfsprogs_2.9.4-1_i386.deb
xfsprogs_2.9.4.orig.tar.gz
  to pool/main/x/xfsprogs/xfsprogs_2.9.4.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 420764@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niv Sardi <xaiki@debian.org> (supplier of updated xfsprogs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 29 Oct 2007 17:42:00 +1100
Source: xfsprogs
Binary: xfsprogs-udeb xfslibs-dev xfsprogs
Architecture: source i386
Version: 2.9.4-1
Distribution: unstable
Urgency: low
Maintainer: Nathan Scott <nathans@debian.org>
Changed-By: Niv Sardi <xaiki@debian.org>
Description: 
 xfslibs-dev - XFS filesystem-specific static libraries and headers
 xfsprogs   - Utilities for managing the XFS filesystem
 xfsprogs-udeb - A stripped-down version of xfsprogs for debian-installer (udeb)
Closes: 144876 148123 148150 293631 339717 347561 385090 387057 409063 414073 414079 420764 445011
Changes: 
 xfsprogs (2.9.4-1) unstable; urgency=low
 .
   * New upstream release.
   * There are bugs that do not apply anymore (but were never closed)
     (closes: #339717, #347561, #414073, #409063, #387057, #385090, #293631, #420764, #414079, #445011, #148150, #148123)
   * Repackage as non-native. (closes: #144876)
   * Updated to latest standards, no change was needed.
   * Remove coma in udeb description as it confuses debconf (at least linda says so)
   * Remove checkver call, and let debian/compat be.
Files: 
 d8f567065b63aba4c1724e575ec23528 647 admin optional xfsprogs_2.9.4-1.dsc
 1cf0d30b35c6ba5b5d181602537bedf3 1005884 admin optional xfsprogs_2.9.4.orig.tar.gz
 1901235de651974c341b68093e84af8e 15695 admin optional xfsprogs_2.9.4-1.diff.gz
 4b9a57deb2ab2512a3ba94c2b0775c32 1397718 admin optional xfsprogs_2.9.4-1_i386.deb
 63f2fb85fde4c8af08ac511a4b9cdcd5 298304 libdevel extra xfslibs-dev_2.9.4-1_i386.deb
 d61662f4d2253a2d3418bc6d87e58afc 128586 debian-installer optional xfsprogs-udeb_2.9.4-1_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHJ/eAvD4bToVllT0RArXNAJwPOe7N/zalZmGYhHbfos+4Z3+LnwCeItZf
83tjqKyxOAcUunOkuGxFhrY=
=v0SN
-----END PGP SIGNATURE-----





Information forwarded to debian-bugs-dist@lists.debian.org, Nathan Scott <nathans@debian.org>:
Bug#420764; Package xfsprogs. (full text, mbox, link).


Acknowledgement sent to Daniel Huhardeaux <devel@tootai.net>:
Extra info received and forwarded to list. Copy sent to Nathan Scott <nathans@debian.org>. (full text, mbox, link).


Message #25 received at 420764@bugs.debian.org (full text, mbox, reply):

From: Daniel Huhardeaux <devel@tootai.net>
To: 420764@bugs.debian.org
Subject: xfsprogs: Filsystem no longer accessible after deleting directories in lost+found
Date: Sun, 09 Dec 2007 15:01:42 +0100
We face this problem on a Debian Etch 2.6.18-5-vserver-2-686 with Raid1 
(mdadm). We tried the manipulation given by Markus Fleck-Graffe but no luck.

Hope you will backport the resolution for Etch which has xfsprogs_2.8.11-1

Regards

-- 
Daniel




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 18 Jan 2008 07:35:07 GMT) (full text, mbox, link).


Bug unarchived. Request was from Lucas Nussbaum <lucas@lucas-nussbaum.net> to controlbugs.debian.org. (Sat, 09 Aug 2008 17:59:18 GMT) (full text, mbox, link).


Message #30 received at 420764-done@bugs.debian.org (full text, mbox, reply):

From: Christoph Hellwig <hch@lst.de>
To: 420764-done@bugs.debian.org
Subject: Upstream fix is in lenny
Date: Thu, 1 Jan 2009 11:28:36 +0100
The reference upstream fix is validated to be in the lenny version
of xfsprogs (2.9.8-1)




Message #31 received at 420764-done@bugs.debian.org (full text, mbox, reply):

From: Christoph Hellwig <hch@infradead.org>
To: 420764-done@bugs.debian.org
Subject: Upstream fix is in lenny
Date: Sun, 4 Jan 2009 04:33:19 -0500
The referenced upstream fix is validated to be in the lenny version
of xfsprogs (2.9.8-1).




Marked as fixed in versions xfsprogs/2.9.8-1. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Sat, 02 Nov 2013 15:57:15 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 01 Dec 2013 07:39:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 23 19:34:12 2026; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.