From: Andreas Dilger <adilger@turbolabs.com>
To: Jim Cromie <james.cromie@juno.com>
Cc: linux-lvm@sistina.com
Subject: Re: [linux-lvm] pv recovery after trashing partition table.
Date: Sat, 13 Oct 2001 02:40:27 -0600 [thread overview]
Message-ID: <20011013024027.B29785@turbolinux.com> (raw)
In-Reply-To: <20011013.022001.-448365.3.james.cromie@juno.com>
On Oct 13, 2001 02:20 -0600, Jim Cromie wrote:
> So somehow I managed to corrupt hda4 at about the same time that
> I blanked the MBR. I dont know how, but Ill accept that theyre
> causally (not casually) related.
>
> I looked a bit at gpart's partition-type-guessing code, it shouldnt
> be too hard to work out which bytes are failing gpart's guesser.
> Getting LVM to accept my hacks may be much harder.
Well, I just ran gpart on a system I have with LVM partitions, and it
does detect them properly.
> So how big is an LVM super-block ?
There are several parts to the LVM metadata. The PV data (first on the
partition), the VG data (next), LV data, and then the PE map. Because
LVM metadata has been known to have problems in the past, one thing
you can try is to restore the metadata from backups (see vgcfgrestore).
The real problem is that the start of the filesystem depends on how big
the actual disk is, and the alignment. If any of the LVM data is there,
doing something like "od -Ax -a /dev/hda4 | more", or even better
"strings -tx /dev/hda4" should show you the VG name, LV names, etc
(along with other stuff, of course). If you find such data, it may be
possible to reconstruct your LVM setup, or at least recover the data.
> I always have the (probably 1-way) fallback - a partion type change,
> then an fsck to see what it finds.
It will find nothing, because the filesystem doesn't start until (maybe)
a few MB into the partition. Any fsck program will expect the filesystem
to start right at the beginning.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-10-13 8:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-13 8:20 [linux-lvm] pv recovery after trashing partition table Jim Cromie
2001-10-13 8:40 ` Andreas Dilger [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-13 2:50 Jim N Cromie
2001-10-13 2:45 Jim N Cromie
2001-10-13 5:43 ` Andreas Dilger
2001-10-13 0:18 Jim N Cromie
2001-10-13 0:11 ` Andreas Dilger
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=20011013024027.B29785@turbolinux.com \
--to=adilger@turbolabs.com \
--cc=james.cromie@juno.com \
--cc=linux-lvm@sistina.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).