2

I recovered a failed array, which has an LVM2 on it, how do I mount it? Here's what I've done:

lvmdiskscan /dev/md0
/dev/loop0 [     873.62 MiB]
/dev/md0   [       7.28 TiB] LVM physical volume
/dev/sde1  [       7.44 GiB]
0 disks
2 partitions
0 LVM physical volume whole disks
1 LVM physical volume

Okay, so that's my LVM, now:

root@debian:/home/user >: vgdisplay
--- Volume group ---
VG Name               backupvol1
System ID
Format                lvm2
Metadata Areas        1
Metadata Sequence No  1
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                1
Act PV                1
VG Size               7.28 TiB
PE Size               4.00 MiB
Total PE              1907283
Alloc PE / Size       0 / 0
Free  PE / Size       1907283 / 7.28 TiB
VG UUID               PUWpCT-3Irs-M2E8-3ASZ-V4Fa-7WpW-6qcKfT

But I don't get any LVM's when I try to activate it:

root@debian:/home/user >: vgchange -ay backupvol1
0 logical volume(s) in volume group "backupvol1" now active

Doesn't quite look right

pvscan
PV /dev/md0   VG backupvol1   lvm2 [7.28 TiB / 7.28 TiB free]
Total: 1 [7.28 TiB] / in use: 1 [7.28 TiB] / in no VG: 0 [0    ]

What am I missing? If I understand this vgdisplay, I have something corrupt:

vgdisplay -v backupvol1
DEGRADED MODE. Incomplete RAID LVs will be processed.
Using volume group(s) on command line
Finding volume group "backupvol1"
--- Volume group ---
VG Name               backupvol1
System ID
Format                lvm2
Metadata Areas        1
Metadata Sequence No  1
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                1
Act PV                1
VG Size               7.28 TiB
PE Size               4.00 MiB
Total PE              1907283
Alloc PE / Size       0 / 0
Free  PE / Size       1907283 / 7.28 TiB
VG UUID               PUWpCT-3Irs-M2E8-3ASZ-V4Fa-7WpW-6qcKfT

--- Physical volumes ---
PV Name               /dev/md0
PV UUID               sCWOI9-guTg-HDOg-BZ9d-z4Cv-5VhS-9Xjuf1
PV Status             allocatable
Total PE / Free PE    1907283 / 1907283

Here's what's in /etc/lvm/backup/backupvol1

root@debian:/etc/lvm/backup >: cat backupvol1
# Generated by LVM2 version 2.02.111(2) (2014-09-01): Thu Mar  1 22:22:01 2018
contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'vgcfgbackup'"

creation_host = "debian"    # Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.51-2 (2017-12-03) x86_64
creation_time = 1519942921  # Thu Mar  1 22:22:01 2018

backupvol1 {
    id = "PUWpCT-3Irs-M2E8-3ASZ-V4Fa-7WpW-6qcKfT"
    seqno = 1
    format = "lvm2"         # informational
    status = ["RESIZEABLE", "READ", "WRITE"]
    flags = []
    extent_size = 8192      # 4 Megabytes
    max_lv = 0
    max_pv = 0
    metadata_copies = 0

    physical_volumes {
        pv0 {
            id = "sCWOI9-guTg-HDOg-BZ9d-z4Cv-5VhS-9Xjuf1"
            device = "/dev/md0" # Hint only

            status = ["ALLOCATABLE"]
            flags = []
            dev_size = 15624466432  # 7.27571 Terabytes
            pe_start = 2048
            pe_count = 1907283  # 7.27571 Terabytes
        }
    }
}
batflaps
  • 179
  • 1
  • 3
  • 10
  • That volume group hasn't got any logical volumes. All of it is showing as free space. I think you will need to [read this](https://serverfault.com/q/223361/126632). – Michael Hampton Mar 01 '18 at 22:57
  • since I'm booting from a live USB, the contents of /etc/lvm/backup/backupvol1 show the creation date of `# Generated by LVM2 version 2.02.111(2) (2014-09-01): Thu Mar 1 22:22:01 2018` which is just today, is there anyplace else that the data to rebuild would be located? – batflaps Mar 01 '18 at 23:06
  • Try whatever filesystem was the root of that server. – Michael Hampton Mar 01 '18 at 23:31
  • Be sure to post the contents of `/etc/lvm/archive/` relevant to this volume group if you're lost. That data will let us know if there is another PV member that might be missing from this volume group, as well as what device it would be. – Spooler Mar 02 '18 at 01:05

0 Answers0