Anthony Iliopoulos changed bug 1174056
What Removed Added
Flags needinfo?(wolfgang@sweet-haven.com)  

Comment # 17 on bug 1174056 from
So you could do the following to make it mountable:

- optionally test the change first via metadump, e.g.:
  - xfs_metadump -f /dev/sdc1 /foo/bar/sdc1.md (where /foo/bar should be a path
to another filesystem, with sufficient space)
  - xfs_mdrestore sdc1.md sdc1.xfs

Now you have sdc1.xfs containing just metadata, and it is mountable almost like
a normal xfs filesystem (kernel will refuse to mount it with the same sanity
check error). You can first try the superblock changes in this metadump file.
If this is successfully mounts after the changes, then you can apply the same
changes to the actual filesystem partition superblock. This is just an optional
step for precaution.

If you prefer, you could actually send me the metadump file (sdc1.md), and I
will confirm before you proceed with changing the main filesystem.

Please note! The below will set the filesystem alignment to zero
(unit/width/log unit). This will not be optimal in terms of IO performance over
the raid controller. Again, here you could need to figure out the proper values
depending on your raid configuration, if you would like to optimize this.

How to actually change the superblock values:

vnum=$(xfs_db sdc1.xfs -c sb -c 'p versionnum' | awk '{print $3}')
vnum=$(printf "0x%x" $((vnum & ~0x0100)))
xfs_db -x sdc1.xfs -c sb -c 'write unit 0' -c 'write width 0' -c 'write
logsunit 0' -c "write versionnum $vnum"

verify that it is now mountable w/o errors:

mount sdc1.xfs /mnt/foo

If this succeeds, then just repeat the above modifications directly to the fs
partition device (e.g. replace sdc1.xfs with /dev/sdc1). The device should be
unmounted before modifying it with xfs_db.


You are receiving this mail because: