Re: Unable to restore LVM metadata.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The vgarchive file 00000 is the first archive file ever from that vg,
so it would most likely be an empty new vg at that time.

Are you sure 00000 is the file you want?

Suggest doing this:
grep -i before /etc/lvm/archive/vg_debussy*

and see what the newest file is before you did the remove missing.

I have also had to copy the archive file over and edit the file and
remove the "missing" part in the file and replace it with what looks
normal, as it seem to refuse to restore a archive file with missing in
the file.
On Fri, Aug 31, 2018 at 11:22 PM David Scriven via users
<users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> I'm afraid this is a very long post, but I need to describe the situation:
>
> I had one disk fail out of two and in trying to restore the home directory on the primary I erased the lvm directory data I was trying to keep:
>
> root@localhost-live ~]# pvscan
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   PV /dev/sda2   VG vg_debussy      lvm2 [931.00 GiB / 0    free]
>   PV [unknown]   VG vg_debussy      lvm2 [931.50 GiB / 0    free]
>   Total: 2 [<1.82 TiB] / in use: 2 [<1.82 TiB] / in no VG: 0 [0   ]
> [root@localhost-live ~]# vgscan
>   Reading volume groups from cache.
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   Found volume group "vg_debussy" using metadata type lvm2
> [root@localhost-live ~]# lvs
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   LV      VG         Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
>   lv_home vg_debussy -wi-----p-   1.75t
>   lv_root vg_debussy -wi-a-----  50.00g
>   lv_swap vg_debussy -wi-ao---- <17.69g
> [root@localhost-live ~]# lvscan
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   ACTIVE            '/dev/vg_debussy/lv_root' [50.00 GiB] inherit
>   inactive          '/dev/vg_debussy/lv_home' [1.75 TiB] inherit
>   ACTIVE            '/dev/vg_debussy/lv_swap' [<17.69 GiB] inherit
> [root@localhost-live ~]# pvdisplay
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   --- Physical volume ---
>   PV Name               /dev/sda2
>   VG Name               vg_debussy
>   PV Size               931.02 GiB / not usable 24.00 MiB
>   Allocatable           yes (but full)
>   PE Size               32.00 MiB
>   Total PE              29792
>   Free PE               0
>   Allocated PE          29792
>   PV UUID               KSk5KO-Su5d-H8LO-a8t0-s8gH-WdWA-DXQZTr
>
>   --- Physical volume ---
>   PV Name               [unknown]
>   VG Name               vg_debussy
>   PV Size               931.51 GiB / not usable 12.00 MiB
>   Allocatable           yes (but full)
>   PE Size               32.00 MiB
>   Total PE              29808
>   Free PE               0
>   Allocated PE          29808
>   PV UUID               F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1
>
> So at this point I tried to get rid of the disk that was no longer there - BIG MISTAKE!
>
> root@localhost-live ~]# vgreduce --removemissing --force vg_debussy
>   WARNING: Device for PV F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1 not found or rejected by a filter.
>   WARNING: Removing partial LV vg_debussy/lv_home.
>   Logical volume "lv_home" successfully removed
>   Wrote out consistent volume group vg_debussy.
> [root@localhost-live ~]# pvdisplay
>   --- Physical volume ---
>   PV Name               /dev/sda2
>   VG Name               vg_debussy
>   PV Size               931.02 GiB / not usable 24.00 MiB
>   Allocatable           yes
>   PE Size               32.00 MiB
>   Total PE              29792
>   Free PE               27626
>   Allocated PE          2166
>   PV UUID               KSk5KO-Su5d-H8LO-a8t0-s8gH-WdWA-DXQZTr
>
> [root@localhost-live ~]# lvscan
>   ACTIVE            '/dev/vg_debussy/lv_root' [50.00 GiB] inherit
>   ACTIVE            '/dev/vg_debussy/lv_swap' [<17.69 GiB] inherit
>
> OK I got a blank disk and tried to recreate the missing PV:
>
> [root@localhost-live ~]# pvcreate --uuid "F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1" --restorefile /etc/lvm/archive/vg_debussy_00000-611197733.vg /dev/sdc1
>   Couldn't find device with uuid F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1.
> WARNING: ext4 signature detected on /dev/sdc1 at offset 1080. Wipe it? [y/n]: y
>   Wiping ext4 signature on /dev/sdc1.
>   Physical volume "/dev/sdc1" successfully created.
> [root@localhost-live ~]# pvscan
>   PV /dev/sda2   VG vg_debussy      lvm2 [931.00 GiB / 863.31 GiB free]
>   PV /dev/sdc1                      lvm2 [<1.82 TiB]
>   Total: 2 [<2.73 TiB] / in use: 1 [931.00 GiB] / in no VG: 1 [<1.82 TiB]
> [root@localhost-live ~]# pvdisplay
>   --- Physical volume ---
>   PV Name               /dev/sda2
>   VG Name               vg_debussy
>   PV Size               931.02 GiB / not usable 24.00 MiB
>   Allocatable           yes
>   PE Size               32.00 MiB
>   Total PE              29792
>   Free PE               27626
>   Allocated PE          2166
>   PV UUID               KSk5KO-Su5d-H8LO-a8t0-s8gH-WdWA-DXQZTr
>
>   "/dev/sdc1" is a new physical volume of "<1.82 TiB"
>   --- NEW Physical volume ---
>   PV Name               /dev/sdc1
>   VG Name
>   PV Size               <1.82 TiB
>   Allocatable           NO
>   PE Size               0
>   Total PE              0
>   Free PE               0
>   Allocated PE          0
>   PV UUID               F3lvXa-42cI-6Tx2-hmSr-3E0M-0PFE-W7kLj1
>
> So - vgcfgrestore should work now? - NO!
>
> [root@localhost-live ~]# vgcfgrestore vg_debussy  -f /etc/lvm/archive/vg_debussy_00000-611197733.vg
>   Cannot restore Volume Group vg_debussy with 1 PVs marked as missing.
>   Restore failed.
>
> So there is nothing missing but the PV is still marked as missing??
>
> I'm stuck I have simply no idea how to proceed.
>
> DS
>
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux