Discussion:
xfs_repair: bad primary superblock - bad magic number !!!
Patrick Hsieh
2002-09-24 09:15:21 UTC
Permalink
Hello list,

I am running woody with 2.4.19 and xfs patch for 2.4.19 from SGI ftp
site. Whey I type xfs_repair /dev/hda, I got the error

***@et:~# xfs_repair /dev/hda
Phase 1 - find and verify superblock...
bad primary superblock - bad magic number !!!


Is there something wrong? Should I unmount the filesystem before
performing xfs_repair?
--
Patrick Hsieh <***@ezplay.tv>

GPG public key http://pahud.net/pubkeys/pahudatezplay.gpg
Time
2002-09-24 14:24:07 UTC
Permalink
Post by Patrick Hsieh
I am running woody with 2.4.19 and xfs patch for 2.4.19 from SGI ftp
site.
I'm currently using 2.4.18 with the Debian tested & packaged patch and I
get the same error, heh. Yea, looks like you found a bug:

(***@hour)~$ xfs_repair /dev/hdb
Phase 1 - find and verify superblock...
bad primary superblock - bad magic number !!!

attempting to find secondary superblock...
.........................................................................
Post by Patrick Hsieh
Is there something wrong? Should I unmount the filesystem before
performing xfs_repair?
xfs_repair will not let you repair with the filesystem mounted, it
'should' be giving you this warning:

(***@hour)~$ xfs_repair /dev/hdb
xfs_repair: /dev/hdb contains a mounted filesystem

fatal error -- couldn't initialize XFS library
--
Regards,

Time



13

\
9 . 3 clockbot.net
/

6
Noah L. Meyerhans
2002-09-24 15:28:08 UTC
Permalink
Post by Patrick Hsieh
I am running woody with 2.4.19 and xfs patch for 2.4.19 from SGI ftp
site. Whey I type xfs_repair /dev/hda, I got the error
The filesystem isn't directly on /dev/hda is it? I would hope it's on a
partition on that drive (/dev/hda1 or something).
Post by Patrick Hsieh
Is there something wrong? Should I unmount the filesystem before
performing xfs_repair?
I don't think xfs_repair will work at all on a mounted filesystem.
This, IMHO, makes it next to useless if you want to take advantage of
the fast recovery afforded by the filesystem journal. Metadata is
journalled, which means that the filesystem can be quickly brought up
clean. However, there are no guarantees about actual *data*, and the
only way to check the data seems to be to run xfs_repair, which is no
better than running a long fsck at boot time.

I hope I'm wrong about that, but that's what my experiences have been.
I was using XFS on a Debian mirror, which crashed one day. After
bringing it back up, people started complaining about corrupt packages
on the mirror. The filesystem had to be runmounted so I could run
xfs_repair on it... I have no idea how you'd handle such a situation if
you were using XFS on your root disk...

noah
--
_______________________________________________________
| Web: http://web.morgul.net/~frodo/
| PGP Public Key: http://web.morgul.net/~frodo/mail.html
Time
2002-09-25 05:02:02 UTC
Permalink
Post by Noah L. Meyerhans
The filesystem isn't directly on /dev/hda is it? I would hope it's on a
partition on that drive (/dev/hda1 or something).
Heh, yea I screwed that up.

(***@hour)~$ xfs_repair /dev/hdb1

works fine. thanks 8)
--
Regards,

Time



13

\
9 . 3 clockbot.net
/

6
Loading...