From: Austin Gonyou <austin@coremetrics.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] I broke my PVs!
Date: Mon Oct 21 05:15:01 2002 [thread overview]
Message-ID: <1035195304.2789.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20021021115226.B9466@sistina.com>
You're On Mon, 2002-10-21 at 04:52, Heinz J . Mauelshagen wrote:
> On Sun, Oct 20, 2002 at 03:16:34PM -0500, Austin Gonyou wrote:
> > On Sun, 2002-10-20 at 05:49, Luca Berra wrote:
> > > On Sat, Oct 19, 2002 at 11:14:02PM -0500, Austin Gonyou wrote:
> > > >I have 3 disks, one 9GB and two 18GB scsi disks. I just
> re-installed my
> > > >system with RH 8.0, and it didn't like that the two 18's weren't
> > > >initialized, I guess I screwed up, cause I didn't think I was
> > > >initializing them(since I told the installer not to), and instead
> ran
> > > >fdisk and then saved without making partitions.
> >
> >
> > > what do you mean with initialized?
> > > mke2fs? in this case you will find lovely ext2 superblock copies in
> the
> > > middle of your data, but then you could salvage most of your data.
> >
> > I ran fdisk, then just saved. So I guess you could say I just lost the
> > partition table.
> >
> > > lost partition table? just recreate it, it is not destructive?
> >
> > I didn't have any partitions just whole disks.
>
> Austin,
> so your 2 18Gb drives have been in one VG as whole disk PVs
> and you wrote a partition table onto those. which toasted the PV
> structures on both forcing vgscan to fail finding the VG.
>
> Before you write anything else onto the disks, you should save the rest
> of your LVM metadata for later help.
> Let's assume your PVs are /dev/sdb and /dev/sdc and your VG name
> is "vg00", then you want to run:
>
Gahh...:( I was talking to pjc, and I think I've got it working, but
wont' know until after I create a new kernel and get xfs utilities.
> # dd if=/dev/sdb of=sdb.vgda bs=1k count=4k
> # dd if=/dev/sdc of=sdc.vgda bs=1k count=4k
> # tar jcf vg00.vgda.tar.bz2 sd[bc].vgda
> # rm sd[bc].vgda
>
> We need vg00.vgda.tar.bz2 if it comes to option 3 below :)
>
We ended up making some loopback devices, using losetup on them,
pvcreating the loops with --size, vgcreating with them, then lvcreating
using that vg.
vgchange -an on that vg, then losetup -d on the used loops, then
vgcfgrestore from that config for each pv, tweaking as needed based on
size.
> The 3 options are:
>
> - follow Luca's advice to recreate everything with the _very_ same
> parameters
> (pvcreate, vgcreate, lvcreate -Zn). LVM doesn't destroy the data then;
> this presumes that you just ran those commands giving you a simple
> layout
> in the first place.
> YOU NEED TO RUN "lvcreate -Zn ..." IN ORDER TO AVOID ZEROING THE FIRST
> BLOCK OF THE LV DATA!!!
>
> - vgcfgrestore your metadata if you still have a backup:
Yeah..I blew it away, before getting the backup, which happened on a
stupid hunch in the first place.
> - send vg00.tar.bz2 to me for a hack to get your PV structures back;
> you can restore the hacked metadata to the devices using dd
:( pvcreate already run on the disks. :(
>
> If your layout is _that_ simple and you have the exact parameters at
> hand (PE size, stripe size), you want to prefer option one above.
> Again: run "lvcreate -Zn ..." because otherwise your FS will be in
> trouble.
Understood. It is that simple. I will see what will happen when I get an
xfs enabled kernel and updated utilities.
I will let you know what happens, but thanks for all the help. :)
--
Austin Gonyou
Coremetrics, Inc.
prev parent reply other threads:[~2002-10-21 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-19 23:14 [linux-lvm] I broke my PVs! Austin Gonyou
2002-10-20 5:49 ` Luca Berra
2002-10-20 15:17 ` Austin Gonyou
2002-10-20 16:35 ` Luca Berra
2002-10-20 18:03 ` Austin Gonyou
2002-10-21 4:55 ` Heinz J . Mauelshagen
2002-10-21 5:15 ` Austin Gonyou [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=1035195304.2789.12.camel@localhost.localdomain \
--to=austin@coremetrics.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