Need advice with data restoration after proxmox 7 installation attempt on LVM 'data' drive

kothar

New Member
Nov 15, 2021
2
0
1
44
Hi There,
I need advice as I made a really stupid thing today and I do not want it to become even worse.

During planned upgrade of my home media server (openmedia vault based on debian 10) I was thinking I could benefit from using hypervisor-based lab.
So the plan was to take an existing system with a separate SSD drive (sda) and switch openmediavault to proxmox VE 7 keeping all data intact.

Unfortunately, it looks I put a different SATA cable in the 1st slot a day before so it was a 8TB primary data drive (initially mapped to the storage group).
When I didn't see details of the drive (size, etc) I stopped the installation procedure to double-check and even unmount data drives.
But it was too late in my case.

So now I see a new virtual group pve added.

lvs
Couldn't find device with uuid jVxtmB-qv9c-Qcuh-vGZ4-BsXs-21Aq-EFe8Ae.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- <7.13t 0.00 0.28
lvol0 pve -wi-a----- 15.81g
root pve -wi-a----- 96.00g
swap pve -wi-a----- 8.00g
storage storage -wi-----p- <10.92t

I am not a big expert in LVM partitions so I would appreciate any advice on where to look to restore the original LVM structure. I am not sure if it is possible at all. I did some restoration with regular disks using tesdisk utility but I do not know if it is possible with lvm.
 
There is original lvm2 storage configuration

Code:
# Generated by LVM2 version 2.03.02(2) (2018-12-18): Thu Nov 12 18:28:11 2020

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'lvextend --size 11721007104K /dev/mapper/storage-storage'"

creation_host = "mirk.mirkwood.net"     # Linux mirk.mirkwood.net 5.8.0-0.bpo.2-amd64 #1 SMP Debian 5.8.10-1~bpo10+1 (2020-09-26) x86_64
creation_time = 1605223691      # Thu Nov 12 18:28:11 2020

storage {
        id = "JEQlLM-kjCk-nFKz-23bG-VOOe-KpCD-1JC4PW"
        seqno = 4
        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 = "p9vf8b-5ukd-a6c6-Ll00-AkgO-s57e-0VBnfx"
                        device = "/dev/sdb"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 7813971633   # 3.63866 Terabytes
                        pe_start = 2048
                        pe_count = 953853       # 3.63866 Terabytes
                }

                pv1 {
                        id = "jVxtmB-qv9c-Qcuh-vGZ4-BsXs-21Aq-EFe8Ae"
                        device = "/dev/sdc"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 15628053168  # 7.27738 Terabytes
                        pe_start = 2048
                        pe_count = 1907721      # 7.27738 Terabytes
                }
        }

        logical_volumes {

                storage {
                        id = "knj45t-mtOS-WWfy-RTjO-T2cy-7IDS-QJq19h"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1603922781      # 2020-10-28 18:06:21 -0400
                        creation_host = "mirk.mirkwood.net"
                        segment_count = 2

                        segment1 {
                                start_extent = 0
                                extent_count = 953853   # 3.63866 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 0
                                ]
                        }
                        segment2 {
                                start_extent = 953853
                                extent_count = 1907721  # 7.27738 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv1", 0
                                ]
                        }
                }
        }

}

new configuration created by proxmos:


Code:
# Generated by LVM2 version 2.03.02(2) (2018-12-18): Mon Nov 15 08:57:12 2021

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'pvscan --cache --activate ay 8:48'"

creation_host = "mirk"  # Linux mirk 5.10.0-0.bpo.8-amd64 #1 SMP Debian 5.10.46-4~bpo10+1 (2021-08-07) x86_64
creation_time = 1636984632      # Mon Nov 15 08:57:12 2021

pve {
        id = "gUi20r-3r2v-j1is-D5hL-ySk9-wjQV-jXkW2G"
        seqno = 6
        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 = "AET8Za-HAd2-a3yf-bmxH-oqpQ-C8Ym-09llk7"
                        device = "/dev/sda3"    # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 15627002511  # 7.27689 Terabytes
                        pe_start = 2048
                        pe_count = 1907592      # 7.27689 Terabytes
                }
        }

        logical_volumes {

                swap {
                        id = "PnxkZh-GzLW-My75-YMmf-2H2w-csKR-HqdVRf"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1636984406      # 2021-11-15 08:53:26 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 2048     # 8 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 0
                                ]
                        }
                }

                root {
                        id = "ek1g9V-92Ju-TGWd-922N-dkbp-zbvp-QpbpZ0"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1636984406      # 2021-11-15 08:53:26 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 24576    # 96 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 2048
                                ]
                        }
                }

                data {
                        id = "QYQAke-m2dV-xDXY-WhBL-FNMx-v8kW-aZQ2aL"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1636984543      # 2021-11-15 08:55:43 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 1868681  # 7.12845 Terabytes

                                type = "thin-pool"
                                metadata = "data_tmeta"
                                pool = "data_tdata"
                                transaction_id = 0
                                chunk_size = 128        # 64 Kilobytes
                                discards = "passdown"
                                zero_new_blocks = 1
                        }
                }

                lvol0 {
                        id = "szcmqi-whDS-d9ZS-4gIC-3akT-9VGc-zzXv7z"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1636984543      # 2021-11-15 08:55:43 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 4048     # 15.8125 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 1899353
                                ]
                        }
                }

                data_tdata {
                        id = "nQOlry-oOQh-MNz5-Rojc-onPI-DGGN-S2UeNw"
                        status = ["READ", "WRITE"]
                        flags = []
                        creation_time = 1636984407      # 2021-11-15 08:53:27 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 1868681  # 7.12845 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 26624
                                ]
                        }
                }

                data_tmeta {
                        id = "QC2C7h-44m1-cuML-Eqnh-1wqR-GiMa-CPTxeT"
                        status = ["READ", "WRITE"]
                        flags = []
                        creation_time = 1636984407      # 2021-11-15 08:53:27 -0500
                        creation_host = "proxmox"
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 4048     # 15.8125 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 1895305
                                ]
                        }
                }
        }

}

From this, I see that a new physical volume for my 8TB drive has been created and a new id has been assigned to it.
I do not know if it is possible to reassign id back to try to mount the original lvm volume.
Please advise, how to attack this problem.