* [linux-lvm] Recovering LVM partition after OS reinstallation
@ 2008-09-12 9:48 hanocri
2008-09-12 16:48 ` Jaroslav Stava
0 siblings, 1 reply; 4+ messages in thread
From: hanocri @ 2008-09-12 9:48 UTC (permalink / raw)
To: linux-lvm
After root filesystem failure my "/" was all messed up so i had to
install system from scratch (Debian Unstable). /home is on separate
LVM partition and (i hope so) intact. However pvscan and vgscan gives
no result. According to fdisk partition is marked as "8e Linux LVM".
I have LVM metadata backup which you can find here:
http://pastebin.com/m5a13d266
At line 23 there is: 'device = "/dev/dm-7" # Hint only ', but there
is no such device as /dev/dm-7. I think it should be rather /dev/dm-6
(I'm using dmraid), again according to fdisk - the size and type is
correct.
Should I change dm-7 into dm-6 or simply ignore it and do
vgcfgrestore? And what does ' #Hint only' mean? Or maybe there is
other way to recover LVM config?
Thanks for any help.
--
Regards, Grzegorz R.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Recovering LVM partition after OS reinstallation
2008-09-12 9:48 [linux-lvm] Recovering LVM partition after OS reinstallation hanocri
@ 2008-09-12 16:48 ` Jaroslav Stava
2008-09-12 18:51 ` hanocri
0 siblings, 1 reply; 4+ messages in thread
From: Jaroslav Stava @ 2008-09-12 16:48 UTC (permalink / raw)
To: LVM general discussion and development
hanocri wrote:
> After root filesystem failure my "/" was all messed up so i had to
> install system from scratch (Debian Unstable). /home is on separate
> LVM partition and (i hope so) intact. However pvscan and vgscan gives
> no result. According to fdisk partition is marked as "8e Linux LVM".
> I have LVM metadata backup which you can find here:
> http://pastebin.com/m5a13d266
> At line 23 there is: 'device = "/dev/dm-7" # Hint only ', but there
> is no such device as /dev/dm-7. I think it should be rather /dev/dm-6
> (I'm using dmraid), again according to fdisk - the size and type is
> correct.
> Should I change dm-7 into dm-6 or simply ignore it and do
> vgcfgrestore? And what does ' #Hint only' mean? Or maybe there is
> other way to recover LVM config?
>
> Thanks for any help.
>
>
Check dmraid. Twice.
If *scan can't find a lvm pv, than there is something wrong.
(unless you are filtering out /dev/dm* - check filter= in lvm.conf)
Did you (or the Debian installation) change the partition layout?
Where did you install the system to? I assume not to the old
"lvroot" logical volume.
Partition type (fdisk) means quite nothing.
If the device/partition is a lvm PV, then there should be an lvm
label at the beginning. That's what vgscan is looking for (see -vvv).
If there is no label at the beginning, then:
- we are looking at the wrong place - partition layout changed or
perhaps dmraid changed it's mapping
- we are looking at the correct place, but the label is not there
You could try looking for the label at other places - man pvck.
Either way provide some info:
"lvmdump -m -a" can automate that
or at least post dmsetup table, vgscan -vvv
dmraid information
Regards,
Jaroslav Stava
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Recovering LVM partition after OS reinstallation
2008-09-12 16:48 ` Jaroslav Stava
@ 2008-09-12 18:51 ` hanocri
2008-09-12 19:58 ` Jaroslav Stava
0 siblings, 1 reply; 4+ messages in thread
From: hanocri @ 2008-09-12 18:51 UTC (permalink / raw)
To: LVM general discussion and development
2008/9/12 Jaroslav Stava <jstava@redhat.com>:
>
> Check dmraid. Twice.
>
> If *scan can't find a lvm pv, than there is something wrong.
> (unless you are filtering out /dev/dm* - check filter= in lvm.conf)
>
> Did you (or the Debian installation) change the partition layout?
> Where did you install the system to? I assume not to the old
> "lvroot" logical volume.
>
> Partition type (fdisk) means quite nothing.
> If the device/partition is a lvm PV, then there should be an lvm
> label at the beginning. That's what vgscan is looking for (see -vvv).
> If there is no label at the beginning, then:
> - we are looking at the wrong place - partition layout changed or
> perhaps dmraid changed it's mapping
> - we are looking at the correct place, but the label is not there
>
> You could try looking for the label at other places - man pvck.
>
> Either way provide some info:
> "lvmdump -m -a" can automate that
> or at least post dmsetup table, vgscan -vvv
> dmraid information
>
> Regards,
> Jaroslav Stava
>
Sorry, I made a terrible mistake!
After your suggestions I've dumped (using dd) some first sectors of
/dev/dm-6 to check what is in header and I noticed LUKS label.
I totally forgot that whole partition was encrypted (it used to be
unlocked by external keyfile). So I unlocked partition first and after
that activated LVM.
All volumes are here, healthy and intact.
About "lvroot" volume - it was never in use. I planned to install
other distribution here, but I never did.
Root filesystem is on non-lvm partition.
Again sorry for this stupid mistake and thank you for your help.
--
Regards, Grzegorz R.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Recovering LVM partition after OS reinstallation
2008-09-12 18:51 ` hanocri
@ 2008-09-12 19:58 ` Jaroslav Stava
0 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Stava @ 2008-09-12 19:58 UTC (permalink / raw)
To: LVM general discussion and development
hanocri napsal(a):
> Sorry, I made a terrible mistake!
> After your suggestions I've dumped (using dd) some first sectors of
> /dev/dm-6 to check what is in header and I noticed LUKS label.
>
At least my my post did help in some way :-)
> I totally forgot that whole partition was encrypted (it used to be
> unlocked by external keyfile). So I unlocked partition first and after
> that activated LVM.
> All volumes are here, healthy and intact.
>
Congratulations. (Not a terrible mistake after all)
> About "lvroot" volume - it was never in use. I planned to install
> other distribution here, but I never did.
> Root filesystem is on non-lvm partition.
>
> Again sorry for this stupid mistake and thank you for your help.
>
>
You are welcome
Jaroslav Stava
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-12 19:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 9:48 [linux-lvm] Recovering LVM partition after OS reinstallation hanocri
2008-09-12 16:48 ` Jaroslav Stava
2008-09-12 18:51 ` hanocri
2008-09-12 19:58 ` Jaroslav Stava
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox