All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Help restoring a corrupted PV partition ( 18th )
@ 2021-10-18 18:08 Brian McCullough
  2021-10-18 21:40 ` Zdenek Kabelac
  0 siblings, 1 reply; 3+ messages in thread
From: Brian McCullough @ 2021-10-18 18:08 UTC (permalink / raw)
  To: linux-lvm


I have had a disk go bad on me, causing me to lose one PV.

If I am not providing sufficient, or the proper, information, feel free
to ask for more.


I seem to have retrieved the partition using ddrescue and put it on to
a new drive, but it seems to be missing some label information, because
pvscan doesn't recognize it as a PV partition.

Using hexdump, I see the string " LVM2 " at 0x1004, but nothing before
that.  The whole 16 bytes is:

0x01000  16 d6 8e db 20 4c 56 4d  32 20 78 5b 35 41 25 72
                        L  V  M  2



I find what appears to be an LVM2 vgconfig block starting at 0x01200,
extracted that to a file and was able to read the UUID that this PV
should have.  It is one of about a dozen that make up this VG.


On another machine, I dumped a PV partition, and find "LABLEONE" at
0x200, with the same " LVM2 " at 0x01000.

I was concerned that my dump was offset, but the comparison to the
"good" one suggests that that isn't the problem, but just the missing
"LABLEONE" and related information at 0x0200.


How to fix?

If I do a "pvcreate --uuid xxxx" would this fix that recovered partition
so that pvscan and friends can work properly, and I can finally boot
that machine?


Thank you,
Brian

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Help restoring a corrupted PV partition ( 18th )
  2021-10-18 18:08 [linux-lvm] Help restoring a corrupted PV partition ( 18th ) Brian McCullough
@ 2021-10-18 21:40 ` Zdenek Kabelac
  2021-10-18 22:20   ` Brian McCullough
  0 siblings, 1 reply; 3+ messages in thread
From: Zdenek Kabelac @ 2021-10-18 21:40 UTC (permalink / raw)
  To: LVM general discussion and development, Brian McCullough

Dne 18. 10. 21 v 20:08 Brian McCullough napsal(a):
> 
> I have had a disk go bad on me, causing me to lose one PV.
> 
> If I am not providing sufficient, or the proper, information, feel free
> to ask for more.
> 
> 
> I seem to have retrieved the partition using ddrescue and put it on to
> a new drive, but it seems to be missing some label information, because
> pvscan doesn't recognize it as a PV partition.
> 
> Using hexdump, I see the string " LVM2 " at 0x1004, but nothing before
> that.  The whole 16 bytes is:
> 
> 0x01000  16 d6 8e db 20 4c 56 4d  32 20 78 5b 35 41 25 72
>                          L  V  M  2
> 
> 
> 
> I find what appears to be an LVM2 vgconfig block starting at 0x01200,
> extracted that to a file and was able to read the UUID that this PV
> should have.  It is one of about a dozen that make up this VG.
> 
> 
> On another machine, I dumped a PV partition, and find "LABLEONE" at
> 0x200, with the same " LVM2 " at 0x01000.
> 
> I was concerned that my dump was offset, but the comparison to the
> "good" one suggests that that isn't the problem, but just the missing
> "LABLEONE" and related information at 0x0200.
> 
> 
> How to fix?
> 
> If I do a "pvcreate --uuid xxxx" would this fix that recovered partition
> so that pvscan and friends can work properly, and I can finally boot
> that machine?

Hi

It's quite important to be aware how the disk corruption happened.
Was this plain disk hw error -  or some crash of raid setup ?

Normally you could restore PV with this:

pvcreate --uuid  XXXX --restorefile  file_with_vg_backup  /dev/ddddd
vgcfgrestore --restorefile   file_with_vg_backup   vgname


But if the content of device was scramble by some 'raid' bug - you might have 
problem to retrieve any usable data afterward.


Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Help restoring a corrupted PV partition ( 18th )
  2021-10-18 21:40 ` Zdenek Kabelac
@ 2021-10-18 22:20   ` Brian McCullough
  0 siblings, 0 replies; 3+ messages in thread
From: Brian McCullough @ 2021-10-18 22:20 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: LVM general discussion and development

On Mon, Oct 18, 2021 at 11:40:39PM +0200, Zdenek Kabelac wrote:
> Dne 18. 10. 21 v 20:08 Brian McCullough napsal(a):
> >
> >I have had a disk go bad on me, causing me to lose one PV.

Thank you for the thoughts, Zdenek.

No, it was a hardware failure.  Bad blocs, unreadable sectors, etc.

According to ddrescue, this partition was recovered without any
problems, although, as I observe later, the first part of the partition
is zero.



> >
> >If I am not providing sufficient, or the proper, information, feel free
> >to ask for more.
> >
> >
> >I seem to have retrieved the partition using ddrescue and put it on to
> >a new drive, but it seems to be missing some label information, because
> >pvscan doesn't recognize it as a PV partition.
> >
> >Using hexdump, I see the string " LVM2 " at 0x1004, but nothing before
> >that.  The whole 16 bytes is:
> >
> >0x01000  16 d6 8e db 20 4c 56 4d  32 20 78 5b 35 41 25 72
> >                         L  V  M  2
> >
> >
> >
> >I find what appears to be an LVM2 vgconfig block starting at 0x01200,
> >extracted that to a file and was able to read the UUID that this PV
> >should have.  It is one of about a dozen that make up this VG.
> >
> >
> >On another machine, I dumped a PV partition, and find "LABLEONE" at
> >0x200, with the same " LVM2 " at 0x01000.
> >
> >I was concerned that my dump was offset, but the comparison to the
> >"good" one suggests that that isn't the problem, but just the missing
> >"LABLEONE" and related information at 0x0200.
> >
> >
> >How to fix?
> >
> >If I do a "pvcreate --uuid xxxx" would this fix that recovered partition
> >so that pvscan and friends can work properly, and I can finally boot
> >that machine?
> 
> Hi
> 
> It's quite important to be aware how the disk corruption happened.
> Was this plain disk hw error -  or some crash of raid setup ?
> 
> Normally you could restore PV with this:
> 
> pvcreate --uuid  XXXX --restorefile  file_with_vg_backup  /dev/ddddd
> vgcfgrestore --restorefile   file_with_vg_backup   vgname
> 
> 
> But if the content of device was scramble by some 'raid' bug - you might
> have problem to retrieve any usable data afterward.
> 
> 
> Regards
> 
> Zdenek
> 

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-19  6:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 18:08 [linux-lvm] Help restoring a corrupted PV partition ( 18th ) Brian McCullough
2021-10-18 21:40 ` Zdenek Kabelac
2021-10-18 22:20   ` Brian McCullough

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.