* [linux-lvm] Destroyed partition on one PV (followup)
@ 2013-10-05 4:06 Ken Bass
2013-10-24 6:38 ` Marian Csontos
0 siblings, 1 reply; 2+ messages in thread
From: Ken Bass @ 2013-10-05 4:06 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 873 bytes --]
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?
I know that a lot of the data is still there and somewhat intact - I did a
hexdump of each.
Any ideas?
As always, TIA.
ken
[-- Attachment #2: Type: text/html, Size: 1029 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] Destroyed partition on one PV (followup)
2013-10-05 4:06 [linux-lvm] Destroyed partition on one PV (followup) Ken Bass
@ 2013-10-24 6:38 ` Marian Csontos
0 siblings, 0 replies; 2+ messages in thread
From: Marian Csontos @ 2013-10-24 6:38 UTC (permalink / raw)
To: LVM general discussion and development
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/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-24 6:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-05 4:06 [linux-lvm] Destroyed partition on one PV (followup) Ken Bass
2013-10-24 6:38 ` Marian Csontos
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).