linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Marian Csontos <mcsontos@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Destroyed partition on one PV (followup)
Date: Thu, 24 Oct 2013 08:38:44 +0200	[thread overview]
Message-ID: <5268C074.5060007@redhat.com> (raw)
In-Reply-To: <CAH5g025Z+f2C_t1vvqbsCU43VzTY-NvCRg9A+GYF8cLh2+46gw@mail.gmail.com>

On 10/05/2013 06:06 AM, Ken Bass wrote:
> I did a little more investigating that might somewhat change the solution.
>
> What caused the corruption was a fedora installation that was supposed to
> be on a different drive, but the dynamic labelling of devs screwed me.
>
> What I had to begin with was an lv of 3 devs: sdb1, sdc1, and sdd1. The
> installer re-partitioned sdb into 5 separate partitions (a boot, swap, and
> 3 ext4), and then began to format them. I stopped the format before it got
> to far along. The other devs are untouched.
>
> I can run the pvcreate command (I tried with the -t flag) to restore the pv
> on 2 of the ext4 partitions, as well as on the swap partition (pvcreate
> asks to wipe the swap signature). So, if I did, how would I recombine those
> separate partitions back to one?

You do not want new PVs. You need to to restore the one with original 
UUID (which is unique identifier and is used to group disks in a VG.)

So first you need to create single large partition on the affected disk 
(fdisk/parted/...), then restore PV.

>
> I know that a lot of the data is still there and somewhat intact - I did a
> hexdump of each.
>
> Any ideas?

You should use pvcreate with --uuid and --restorefile if you are able to 
get to recent metadata backup. Is not this a partition where your /etc sits?

In the worst case I would try to dd the few X kBs from sane partition to 
the one affected and hex-edit the start to match PV's UUID.
But there may be better ways (like booting from LiveCD, activating VG 
and dumping metadata.)

I also opened a bug for Anaconda:

   https://bugzilla.redhat.com/show_bug.cgi?id=1022811

Hopefully that will not repeat.

And remember: when you experiment always experiment with backups at your 
pockets.

-- Marian

>
> As always, TIA.
>
> ken
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

      reply	other threads:[~2013-10-24  6:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05  4:06 [linux-lvm] Destroyed partition on one PV (followup) Ken Bass
2013-10-24  6:38 ` Marian Csontos [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=5268C074.5060007@redhat.com \
    --to=mcsontos@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).