* Re: [linux-lvm] How to recover data corrupted by vgcreate
@ 2005-08-01 13:25 張廷州
0 siblings, 0 replies; 6+ messages in thread
From: 張廷州 @ 2005-08-01 13:25 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]
Hi,
There is no backup information available in /etc/lvm/archive to restore VG to original configuration.
Unfortunately the root directory is also in LVM partition.
So, "vgcfgrestore" did not solve the problem.
I also tried to create new LV by "lvcreate" to match with the existing LV.
The problem is I have no idea about the size of old LV.
I just gave a random size in "lvcreate" command.
But, I could not mount the file system because of bad superblock.
I don't know what I missed. Maybe the size is critical to do the matching.
Is there any reverse procedure I can do to recover VG by the existing LV information?
It may just like to recover partition table by scanning cylinder data in hard disk.
Any idea? Thanks a lot.
Davis
> >On Wed, Jul 27, 2005 at 11:33:05AM -0500, Jonathan E Brassow wrote:
> >>I'm not familiar exactly with how the metadata gets laid on disk, but
> >>I would think you could just 'vgcreate vg_name /dev/hdd2' (you did
> >>this
> >>already) then 'lvcreate -n <lvname> -l <max size> vg_name'... This of
> >>course assumes that the previous lv resided wholly on /dev/hdd2. Then
> >>try mounting the new lv and see what happens.
> >
> >Before you do that, try vgcfgrestore.
> >
>
> AJ, when he did the initial 'vgcreate' was part of the process to
> create a backup copy of the metadata? If so, vgcfgrestore could work.
> But otherwise, I'm not sure were the old metadata would be stored,
> since this disk is from a different machine... Seems odd to me that
> vgcreate would blow over the old vg if it knew about it. If it did not
> know (or detect the old vg), how would it know to backup the metadata?
Not sure, but if the reason the disk was moved was because a cpu went out, i'm
assuming the old root fs is also on that disk - hoping so anyway ;) If so,
the old root fs can be mounted and /etc/lvm/archive can be checked for a valid
copy of the metadata. (Assuming root wasn't on lvm...)
As to why vgcreate didn't recognize the old VG...that's very odd - not sure
what went wrong there...
[-- Attachment #2: Type: text/html, Size: 3395 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [linux-lvm] How to recover data corrupted by vgcreate
@ 2005-07-26 16:57 張廷州
2005-07-27 16:33 ` Jonathan E Brassow
0 siblings, 1 reply; 6+ messages in thread
From: 張廷州 @ 2005-07-26 16:57 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 561 bytes --]
Hi,
I have a Linux PC with Fedora C3 installed.
The disk was partitioned automatically when Linux was installed.
So, LVM2 partition was created.
The CPU is damaged today and I move the disk to another Linux PC and try to read data out.
The disk is connected to device /dev/hdd. /dev/hdd2 is the LVM2 partition.
But, I do a stupid thing. I invoke vgcreate command on /dev/hdd2.
vgcreate vg_name /dev/hdd2
The partition seems to be lost.
How can I recover the data in /dev/hdd2?
It's very important data to me.
Thanks for any help.
Davis
[-- Attachment #2: Type: text/html, Size: 1472 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [linux-lvm] How to recover data corrupted by vgcreate
2005-07-26 16:57 張廷州
@ 2005-07-27 16:33 ` Jonathan E Brassow
2005-07-27 17:24 ` AJ Lewis
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan E Brassow @ 2005-07-27 16:33 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]
I'm not familiar exactly with how the metadata gets laid on disk, but I
would think you could just 'vgcreate vg_name /dev/hdd2' (you did this
already) then 'lvcreate -n <lvname> -l <max size> vg_name'... This of
course assumes that the previous lv resided wholly on /dev/hdd2. Then
try mounting the new lv and see what happens.
brassow
On Jul 26, 2005, at 11:57 AM, 張廷州 wrote:
> Hi,
>
> I have a Linux PC with Fedora C3 installed.
> The disk was partitioned automatically when Linux was installed.
> So, LVM2 partition was created.
> The CPU is damaged today and I move the disk to another Linux PC and
> try to read data out.
> The disk is connected to device /dev/hdd. /dev/hdd2 is the LVM2
> partition.
> But, I do a stupid thing. I invoke vgcreate command on /dev/hdd2.
>
> vgcreate vg_name /dev/hdd2
>
> The partition seems to be lost.
> How can I recover the data in /dev/hdd2?
> It's very important data to me.
> Thanks for any help.
>
> Davis
> _______________________________________________
> 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/
[-- Attachment #2: Type: text/enriched, Size: 1590 bytes --]
I'm not familiar exactly with how the metadata gets laid on disk, but
I would think you could just 'vgcreate vg_name /dev/hdd2' (you did
this already) then 'lvcreate -n <<lvname> -l <<max size> vg_name'...
This of course assumes that the previous lv resided wholly on
/dev/hdd2. Then try mounting the new lv and see what happens.
brassow
On Jul 26, 2005, at 11:57 AM,
<fontfamily><param>Hiragino Kaku Gothic Pro</param>張廷州</fontfamily>
wrote:
<excerpt><smaller>Hi,</smaller>
<smaller> </smaller>
<smaller>I have a Linux PC with Fedora C3 installed.</smaller>
<smaller>The disk was partitioned automatically when Linux was
installed.</smaller>
<smaller>So, LVM2 partition was created.</smaller>
<smaller>The CPU is damaged today and I move the disk to another Linux
PC and try to read data out.</smaller>
<smaller>The disk is connected to device /dev/hdd. /dev/hdd2 is the
LVM2 partition.</smaller>
<smaller>But, I do a stupid thing. I invoke vgcreate command on
/dev/hdd2.</smaller>
<smaller> </smaller>
<smaller> vgcreate vg_name /dev/hdd2</smaller>
<smaller> </smaller>
<smaller>The partition seems to be lost.</smaller>
<smaller>How can I recover the data in /dev/hdd2?</smaller>
<smaller>It's very important data to me.</smaller>
<smaller>Thanks for any help.</smaller>
<smaller> </smaller>
<smaller>Davis</smaller>
<smaller> </smaller>_______________________________________________
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/</excerpt>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] How to recover data corrupted by vgcreate
2005-07-27 16:33 ` Jonathan E Brassow
@ 2005-07-27 17:24 ` AJ Lewis
2005-07-28 15:00 ` Jonathan E Brassow
0 siblings, 1 reply; 6+ messages in thread
From: AJ Lewis @ 2005-07-27 17:24 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]
On Wed, Jul 27, 2005 at 11:33:05AM -0500, Jonathan E Brassow wrote:
> I'm not familiar exactly with how the metadata gets laid on disk, but
> I would think you could just 'vgcreate vg_name /dev/hdd2' (you did this
> already) then 'lvcreate -n <lvname> -l <max size> vg_name'... This of
> course assumes that the previous lv resided wholly on /dev/hdd2. Then
> try mounting the new lv and see what happens.
Before you do that, try vgcfgrestore.
> On Jul 26, 2005, at 11:57 AM, 張廷州 wrote:
>
>
> > Hi,
> >
> > I have a Linux PC with Fedora C3 installed.
> > The disk was partitioned automatically when Linux was installed.
> > So, LVM2 partition was created.
> > The CPU is damaged today and I move the disk to another Linux PC
> > and try to read data out.
> > The disk is connected to device /dev/hdd. /dev/hdd2 is the LVM2
> > partition.
> > But, I do a stupid thing. I invoke vgcreate command on /dev/hdd2.
> >
> > vgcreate vg_name /dev/hdd2
> >
> > The partition seems to be lost.
> > How can I recover the data in /dev/hdd2?
> > It's very important data to me.
> > Thanks for any help.
> >
> > Davis
> > _______________________________________________
> > 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/
>
>
> _______________________________________________
> 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/
--
AJ Lewis Voice: 612-638-0500
Red Hat E-Mail: alewis@redhat.com
One Main Street SE, Suite 209
Minneapolis, MN 55414
Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715
Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the
many keyservers out there...
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] How to recover data corrupted by vgcreate
2005-07-27 17:24 ` AJ Lewis
@ 2005-07-28 15:00 ` Jonathan E Brassow
2005-07-28 16:41 ` AJ Lewis
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan E Brassow @ 2005-07-28 15:00 UTC (permalink / raw)
To: LVM general discussion and development
On Jul 27, 2005, at 12:24 PM, AJ Lewis wrote:
> On Wed, Jul 27, 2005 at 11:33:05AM -0500, Jonathan E Brassow wrote:
>> I'm not familiar exactly with how the metadata gets laid on disk, but
>> I would think you could just 'vgcreate vg_name /dev/hdd2' (you did
>> this
>> already) then 'lvcreate -n <lvname> -l <max size> vg_name'... This of
>> course assumes that the previous lv resided wholly on /dev/hdd2. Then
>> try mounting the new lv and see what happens.
>
> Before you do that, try vgcfgrestore.
>
AJ, when he did the initial 'vgcreate' was part of the process to
create a backup copy of the metadata? If so, vgcfgrestore could work.
But otherwise, I'm not sure were the old metadata would be stored,
since this disk is from a different machine... Seems odd to me that
vgcreate would blow over the old vg if it knew about it. If it did not
know (or detect the old vg), how would it know to backup the metadata?
brassow
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [linux-lvm] How to recover data corrupted by vgcreate
2005-07-28 15:00 ` Jonathan E Brassow
@ 2005-07-28 16:41 ` AJ Lewis
0 siblings, 0 replies; 6+ messages in thread
From: AJ Lewis @ 2005-07-28 16:41 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
On Thu, Jul 28, 2005 at 10:00:02AM -0500, Jonathan E Brassow wrote:
>
> On Jul 27, 2005, at 12:24 PM, AJ Lewis wrote:
>
> >On Wed, Jul 27, 2005 at 11:33:05AM -0500, Jonathan E Brassow wrote:
> >>I'm not familiar exactly with how the metadata gets laid on disk, but
> >>I would think you could just 'vgcreate vg_name /dev/hdd2' (you did
> >>this
> >>already) then 'lvcreate -n <lvname> -l <max size> vg_name'... This of
> >>course assumes that the previous lv resided wholly on /dev/hdd2. Then
> >>try mounting the new lv and see what happens.
> >
> >Before you do that, try vgcfgrestore.
> >
>
> AJ, when he did the initial 'vgcreate' was part of the process to
> create a backup copy of the metadata? If so, vgcfgrestore could work.
> But otherwise, I'm not sure were the old metadata would be stored,
> since this disk is from a different machine... Seems odd to me that
> vgcreate would blow over the old vg if it knew about it. If it did not
> know (or detect the old vg), how would it know to backup the metadata?
Not sure, but if the reason the disk was moved was because a cpu went out, i'm
assuming the old root fs is also on that disk - hoping so anyway ;) If so,
the old root fs can be mounted and /etc/lvm/archive can be checked for a valid
copy of the metadata. (Assuming root wasn't on lvm...)
As to why vgcreate didn't recognize the old VG...that's very odd - not sure
what went wrong there...
--
AJ Lewis Voice: 612-638-0500
Red Hat E-Mail: alewis@redhat.com
One Main Street SE, Suite 209
Minneapolis, MN 55414
Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715
Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the
many keyservers out there...
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-01 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 13:25 [linux-lvm] How to recover data corrupted by vgcreate 張廷州
-- strict thread matches above, loose matches on Subject: below --
2005-07-26 16:57 張廷州
2005-07-27 16:33 ` Jonathan E Brassow
2005-07-27 17:24 ` AJ Lewis
2005-07-28 15:00 ` Jonathan E Brassow
2005-07-28 16:41 ` AJ Lewis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.