From: Dave Wysochanski <dwysocha@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] f*cked up metadata on 1of3 LVM-disks
Date: Thu, 24 May 2007 17:42:02 -0400 [thread overview]
Message-ID: <1180042922.3288.24.camel@linux-cxyg> (raw)
In-Reply-To: <1179763074.3696.28.camel@linux-cxyg>
On Mon, 2007-05-21 at 11:57 -0400, Dave Wysochanski wrote:
> On Mon, 2007-05-21 at 12:38 +0200, BigMac wrote:
> > Nobody an idea how to recover the lvm meta data on the disk?
> > The data itself an the other disks are fine, just the first sectors of
> > /dev/hdc are gone by installing grub on it.
> >
> > I had a deeper look on the disk with one of those low level disk editors
> > and there are still parts of the meta-data stored on the disk.
> > It seems to be that grub messed up just the first 17 sectors of the disk.
> >
> > Regards,
> >
> > BigMac
> >
>
> I am working on a tool to do recovery and pull metadata out of the
> disks. Maybe this will help you.
>
> You can try "pvck -v" in the latest upstream LVM code. It does not
> extract metadata to a file yet but makes an attempt at identifying areas
> on the disk that contain metadata and prints the offsets and lengths
> (you can then just dd to a file). Since you have other PVs that are
> valid you could at least get the latest metadata off one of those, then
> use vgcfgrestore with this file and uuid option.
>
Here is a nasty awk cmdline you could use for example (just replace
loop1 with whatever your device is named). Remember you should run this
on one of your good PVs.
pvck -v /dev/loop1 2>&1 | grep "metadata record" | awk '{print "dd
if=/dev/loop1 bs=1 skip="substr($6,8,length($6)-8) "
count="substr($7,6,length($7)-6) " of=/tmp/dev-loop1-" NR ".bin" }'
> /tmp/doit.sh
Working on a real extract option to pvck though as this is certainly a
bit rough (some NULL chars still at the end of each file, etc).
prev parent reply other threads:[~2007-05-24 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-09 16:30 [linux-lvm] f*cked up metadata on 1of3 LVM-disks BigMac
2007-05-09 22:34 ` David Robinson
2007-05-21 10:38 ` BigMac
2007-05-21 15:57 ` Dave Wysochanski
2007-05-21 16:27 ` Jayson Vantuyl
2007-05-24 21:42 ` Dave Wysochanski [this message]
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=1180042922.3288.24.camel@linux-cxyg \
--to=dwysocha@redhat.com \
--cc=linux-lvm@redhat.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;
as well as URLs for NNTP newsgroup(s).