From: Dave Chinner <david@fromorbit.com>
To: big beer <bigbeerjr@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: mounting hixfs (Hitachi "tuned" XFS) on 2.6 kernel
Date: Tue, 18 May 2010 14:21:30 +1000 [thread overview]
Message-ID: <20100518042130.GC2150@dastard> (raw)
In-Reply-To: <AANLkTin_WoxWP3JXHvflVVP_2fGzgbSVfpPW1KGiyd1z@mail.gmail.com>
On Mon, May 17, 2010 at 08:34:14PM -0700, big beer wrote:
> >On Mon, May 17, 2010 at 6:24 PM, Stan Hoeppner <stan@hardwarefreak.com> wrote:
> > big beer put forth on 5/17/2010 7:08 PM:
> >
> >> If anyone has any ideas on what to do, and/or where to start, I'd
> >> greatly appreciate it.
> >
> > Why are you avoiding the obvious solution in favor of hacking?
>
> The obvious solution for me would be a backup or rsync. Unfortunately
> both of those have issues with this particular setup.
>
> Using a backup over the network to migrate will be way too slow
> (days). There are way too many files to index and this poor little nas
> box is already falling over with cpu load from daily activities. I can
> quickly make a mirror on the storage, and move it over to another
> larger host quickly (minutes). Mounting the FS on another machine will
> greatly improve the time and accuracy, as I won't have to worry about
> inconsistencies as it's a block level copy.
>
> The black-box solution is also very painful to work with, no gcc, no
> automake, no rsync, etc.
> I would also think that for some reason I can't think of, it would be
> nice to have support for this version of XFS be available for free for
> others. Some other poor sap might find some value.
>
> So I went and changed the magic number to 0x58465342 by dumping the
> 1st 512 bytes off the volume, editing, and writing back, now I'm
> getting "Can't verify primary superblock". Using xfs_db to look at the
> other superblocks indeed still shows HXFS. Any advise how I can
> find/dump/re-write one of the other superblocks? I'd like to see if I
> can change another one of them if xfs_repair will run.
There's no guarantee that mainline tools will work on this
filesystem. As a matter of principle, I'd be asking Hitachi for the
source code to their kernel module and userland tools and they are
required by the GPL to do supply it on request. If we have the
source code then any hidden surprises (i.e more than superblock
magic number changes) can be dealt with
Start by running 'xfs_check -F <dev>' on an unmodified image of the
filesystem. This will ignore bad superblock magic numbers. If this
does not find any significant problems or stuff it doesn't
understand, then it _might_ be safe to modify each secondary
superblock and run a modern xfs_repair on.
If you get this far modify the secondary superblocks by finding the
disk address of each superblock with xfs_db:
# for i in `seq 0 1 3`; do sudo xfs_db -x -c "sb $i" -c daddr /dev/vda; done
current daddr is 0
current daddr is 2097152
current daddr is 4194304
current daddr is 6291456
#
Just replace the "seq 0 1 3" with "seq 0 1 <number of AGs - 1>" to
suite your filesystem and "/dev/vda" with your block device.
And they can then be read via:
# dd if=/dev/vda of=sb_1.img bs=512 skip=2097152 count=1
modified, and then written by
# dd of=/dev/vda if=sb_1.img bs=512 seek=2097152 count=1
[ /me still wonders WTF the dd maintainers were thinking when they
removed iseek/oseek in favour of skip/seek - I use it these all the
time and I still have to look up the man page every time to make
sure I'm seeking on the correct stream... ]
Assuming everything is OK at this point, run 'xfs_repair -n <dev>'
first (no modify mode), and if it doesn't report anything
uncorrectable, then run without the '-n'.
Good luck!
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-05-18 4:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 0:08 mounting hixfs (Hitachi "tuned" XFS) on 2.6 kernel big beer
2010-05-18 1:24 ` Stan Hoeppner
2010-05-18 3:34 ` big beer
2010-05-18 4:21 ` Dave Chinner [this message]
2010-05-18 4:23 ` Eric Sandeen
2010-05-18 4:37 ` Stan Hoeppner
2010-05-18 15:19 ` big beer
2010-05-18 16:44 ` Benjamin Lau
2010-05-18 16:57 ` Roger Willcocks
2010-05-18 22:43 ` big beer
2010-05-19 4:19 ` Stan Hoeppner
2010-05-19 13:53 ` Eric Sandeen
2010-05-19 14:03 ` Stan Hoeppner
2010-05-18 23:34 ` Stan Hoeppner
2010-05-18 3:47 ` Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100518042130.GC2150@dastard \
--to=david@fromorbit.com \
--cc=bigbeerjr@gmail.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox