archive mirror
 help / color / mirror / Atom feed
From: Roger Heflin <>
To: LVM general discussion and development <>
Subject: Re: [linux-lvm] Recovering "broken" disk ( 17th )
Date: Mon, 18 Oct 2021 09:49:44 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

[-- Attachment #1.1: Type: text/plain, Size: 1965 bytes --]

You will need a lvm backup file for the pvcreate --uuid I believe (there
may be some option to get around needing the backup file).

That will put the header back on if you either have an lvm backup and/or
archive file, you might also need a vgcfgrestore afterwards depending on if
anything else is missing.

I have never done it, but it looks possible to make a lvm backup file by
reading it directly off the disk with dd, so that you will have a file that
pvcreate is ok with, that is if there is no way to force it without a
backup file.

But, this should get the pv back showing up with whatever sectors that you
successfully recovered.

On Sun, Oct 17, 2021 at 10:02 PM Brian McCullough <> wrote:

> Folks,
> I have had a disk go bad on me, causing me to lose one PV.
> I seem to have retrieved the partition using ddrescue, but it also seems
> to be missing some label information, because pvscan doesn't see it.
> Using hexdump, I see the string " LVM2 " at 0x1004, but nothing before
> that.  The whole phrase is:
> 0x01000  16 d6 8e db 20 4c 56 4d  32 20 78 5b 35 41 25 72
> I find what appears to be an LVM2 configuration section at 0x1200, and
> so I was able to read the UUID that this PV should have.
> 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.
> 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
> read the LVM HOW-TO at

[-- Attachment #1.2: Type: text/html, Size: 2778 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

linux-lvm mailing list
read the LVM HOW-TO at

  reply	other threads:[~2021-10-18 19:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  2:17 Brian McCullough
2021-10-18 14:49 ` Roger Heflin [this message]
2021-10-18 19:45   ` Brian McCullough
2021-10-19 10:06     ` Roger Heflin
2021-10-20 13:38       ` Brian McCullough
2021-10-20 18:01         ` Roger Heflin
2021-10-20 18:04           ` Roger Heflin
2021-10-21  6:13             ` Brian McCullough

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \
    --subject='Re: [linux-lvm] Recovering "broken" disk ( 17th )' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).