Skip to contentSkip to conversation

xfs_repair -d doesn't work

DISCUSSION Enrico Maria Crisostomo 2 participants 2 messages Sep 11, 2006

lore
Share & tools
lore
#0 lore raw

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

Hi.

I'm running a slackware-current with xfsprogs-2.8.10_1. On some machine I ran many 2.6.17 kernel and one machine is showing the "directory problem": I cannot get rid of many "Filesystem "hda3": XFS internal error xfs_da_do_buf(2) at line 2212 of file fs/xfs/xfs_da_btree.c. Caller 0xe0ac57d9". As I'm now running 2.6.17.13 I think I'm at safe from this bug and the last thing to do is... repairing my root filesystem. Unfortunately xfs_repair -d and xfs_repair -n does not work, and it returns saying it could not initialize XFS library because the filesystem is mounted AND writable. What I did:
- - remounted the file system read only: did not work, not even xfs_repair -n, which I expect to succeed always
- - hacked /etc/mtab to change rw to ro: did not work, error is the same as before.

Can you suggest me some way to repair my file system and confirm me that this xfs_repair behavior is a bug?

Thank you,
Enrico M. Crisostomo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBKOpW8+x8v0iKa8RAkMPAKDbwuF/pgkX8epIvkKEZOjQKP2cbgCghvJB IkbMDVHlvNJgRnwZ61YTgwk=
=ht3Y
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 5 lines · Enrico Maria Crisostomo

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

Hi.

Quoted 14 lines

I'm running a slackware-current with xfsprogs-2.8.10_1. On some machine I ran many 2.6.17 kernel and one machine is showing the "directory problem": I cannot get rid of many "Filesystem "hda3": XFS internal error xfs_da_do_buf(2) at line 2212 of file fs/xfs/xfs_da_btree.c. Caller 0xe0ac57d9". As I'm now running 2.6.17.13 I think I'm at safe from this bug and the last thing to do is... repairing my root filesystem. Unfortunately xfs_repair -d and xfs_repair -n does not work, and it returns saying it could not initialize XFS library because the filesystem is mounted AND writable. What I did:
- - remounted the file system read only: did not work, not even xfs_repair -n, which I expect to succeed always
- - hacked /etc/mtab to change rw to ro: did not work, error is the same as before.

IIRC, we recently updated libxfs to look at /proc/mounts rather than /etc/mtab to fix these sorts of problems.

As it is, to fix the "directory problem" you need a more recent xfsprogs (2.8.11 IIRC), so I'd suggest the first thing to do is upgrade your xfsprogs and try again.

Quoted 1 line

Can you suggest me some way to repair my file system

You should be able to boot to single user mode, remount the root filesystem readonly and then "xfs_repair -d <dev>" to fix it. You need to reboot after doing this....

Cheers,

Dave.

Signature · 3 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group