2

EDIT: the system boots off a 16 gigabyte USB key.

Apparently, at some point, the 'device name' (sorry if I'm using that term incorrectly) of the boot device changed.from /dev/sde to /dev/sdb to /dev/sdc

The oldest .vg files (from before I added the new 4 terabyte drive) in /etc/lvm/archives show that the LV is made up of /dev/sda /dev/sdb /dev/sdc /dev/sdd

a slightly-less-old .vg (after adding the new 4 terabyte drive) file shows /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sdf

from which I infer that at one point the boot USB Key had device name /dev/sde

When I examine the 'pointers' to the devices in /dev/disk/by-id, I see that what is obviously the boot USB key is now /dev/sdc

here's the contents of /dev/disk/by-id

ata-ST2000DL003-9VT166_5YD6LVYG -> ../../sdb
ata-ST2000DM001-1ER164_Z4Z0MPSR -> ../../sde
ata-ST2000DM006-2DM164_Z5609YHK -> ../../sdd
ata-ST4000DM000-2AE166_WDH0ZQSE -> ../../sdf
ata-WDC_WD40EFRX-68N32N0_WD-WCC7K3NKYTA1 -> ../../sda
lvm-pv-uuid-2d5MB9-J6xH-B80B-lVoQ-Nde9-9CQ1-jxIusp -> ../../sdf
lvm-pv-uuid-hYlB6v-Vkrn-hUNa-JVRK-zbOf-9Lca-Ps1JDL -> ../../sde
lvm-pv-uuid-Nl0vqx-Dggu-4d2I-h5MB-NuoV-CIoM-9Lk7Ye -> ../../sdb
lvm-pv-uuid-VDTFqS-vjAB-kBdf-LI5i-310v-Hs2c-KX9jYs -> ../../sdd
lvm-pv-uuid-YKOqsg-Wkx7-f0f3-ko2J-UeX3-YgFO-6ow0QL -> ../../sda
usb-Generic-_SD_MMC_20090815198100000-0:0 -> ../../sdc
usb-Generic-_SD_MMC_20090815198100000-0:0-part1 -> ../../sdc1
usb-Generic-_SD_MMC_20090815198100000-0:0-part2 -> ../../sdc2
usb-Generic-_SD_MMC_20090815198100000-0:0-part5 -> ../../sdc5

Without knowing or caring at this point how this happened, I would like to know if the UUIDS somehow 'baked in' to the physical drives or in the logical volumes? Do I have to worry that what's listed in /dev/disk/by-id is somehow 'not the same as on the disks'? Can I be confident that what is 'assigned' is correct, or is it just that whatever the system shows here is what is assigned? If the drives just exist, and this mapping is how the UUIDs are assigned etc., if I properly craft the .vg file can I get everything working again?

---original text follows---

I set up an Open Media Vault server with 4 physical discs, a single physical volume and single volume group, and a single logical volume, all called "Fantasia". This isn't RAID and isn't encrypted.

I tried adding an external 4-drive enclosure via eSATA, and discovered the hard way that the eSATA on the motherboard doesn't support port replication.

At any rate, the current state of things is: - pvscan returns promising results - vgscan returns promising results - lvscan returns no output: just a command prompt no message of any kind.

vgscan returns "Found volume group Fantasia" using metadata type lvm2"

when I attempt to vgchange -a y on the "Fantasia" logical volume, it returns

"0 logical volume(s) in volume group "Fantasia" now active"

I'm pretty sure I want that number to be greater than zero.

At risk of making this post unreadable and useless, I haven't posted the output of various commands... if anyone could help me out here, I'm confident that the data is still on the disks: they weren't formatted just disconnected and when reconnected, aren't recognized. I've spent a lot of hours googling etc. and while I do find some useful information i.e. commands to get status etc., I'm wary of executing certain commands that I'm not certain will leave the data on the disk recoverable.

I'm hopeful that all that's wrong is some config file got wiped out, but the data is still in tact, and would sure appreciate it if someone could guide me through the steps from scratch... I think the kind of process that might work would be as though I was moving physical drives from one system to another and wanted all the disks, physical volumes, volume group, and logical volumes to be accessed on that new system.

It's not videos of baby's first steps or anything irreplaceable, but better to recover it go through the effort to replace it, if it can be recovered... so any help would be greatly appreciated.

edit: here is the output of pvscan, pvs, vgscan, and vgs. lvscan and lvs have no output.

# pvscan
  PV /dev/sda   VG Fantasia        lvm2 [1.82 TiB / 1.82 TiB free]
  PV /dev/sdc   VG Fantasia        lvm2 [1.82 TiB / 1.82 TiB free]
  PV /dev/sdd   VG Fantasia        lvm2 [1.82 TiB / 1.82 TiB free]
  PV /dev/sde   VG Fantasia        lvm2 [3.64 TiB / 3.64 TiB free]
  PV /dev/sdf   VG Fantasia        lvm2 [3.64 TiB / 3.64 TiB free]
  Total: 5 [12.74 TiB] / in use: 5 [12.74 TiB] / in no VG: 0 [0   ]

# pvs
  PV         VG       Fmt  Attr PSize PFree
  /dev/sda   Fantasia lvm2 a--  1.82t 1.82t
  /dev/sdc   Fantasia lvm2 a--  1.82t 1.82t
  /dev/sdd   Fantasia lvm2 a--  1.82t 1.82t
  /dev/sde   Fantasia lvm2 a--  3.64t 3.64t
  /dev/sdf   Fantasia lvm2 a--  3.64t 3.64t

# vgscan
  Reading volume groups from cache.
  Found volume group "Fantasia" using metadata type lvm2

# vgs
  VG       #PV #LV #SN Attr   VSize  VFree
  Fantasia   5   0   0 wz--n- 12.74t 12.74t

here's what testdisk shows:

Select a media (use Arrow keys, then press Enter):
>Disk /dev/sda - 2000 GB / 1863 GiB - ST2000DL003-9VT166
 Disk /dev/sdb - 15 GB / 14 GiB - Generic- SD/MMC
 Disk /dev/sdc - 2000 GB / 1863 GiB - ST2000DM006-2DM164
 Disk /dev/sdd - 2000 GB / 1863 GiB - ST2000DM001-1ER164
 Disk /dev/sde - 4000 GB / 3726 GiB - ST4000DM000-2AE166
 Disk /dev/sdf - 4000 GB / 3726 GiB - WDC WD40EFRX-68N32N0

"Analyze" on one disk (all disks return similar result)

Disk /dev/sda - 2000 GB / 1863 GiB - ST2000DL003-9VT166

Please select the partition table type, press Enter when done.
 [Intel  ] Intel/PC partition
 [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
 [Humax  ] Humax partition table
 [Mac    ] Apple partition map
>[None   ] Non partitioned media
 [Sun    ] Sun Solaris partition
 [XBox   ] XBox partition
 [Return ] Return to disk selection
Disk /dev/sda - 2000 GB / 1863 GiB - CHS 243201 255 63
     Partition               Start        End    Size in sectors
>P Linux LVM2               0   0  1 243201  80 63 3907029168

Structure: OK

Doing a "Deeper search" takes quite a while but returns these results immediately:

Disk /dev/sda - 2000 GB / 1863 GiB - CHS 243201 255 63
Analyse cylinder   280/243200: 00%


  Linux LVM2               0   0  1 243201  80 63 3907029168
  ext2                     0  38 13     4  58 28      65536
  ext2                     0  38 13     4  58 28      65536
  ext2                     0  38 15     4  58 30      65536
  ext2                    32   7 16    36  27 31      65536

contents of the /dev/mapper/ directory:

/dev/mapper# ls -la
total 0
drwxr-xr-x  2 root root      60 Jun  3 01:44 .
drwxr-xr-x 18 root root    3420 Jun  3 01:46 ..
crw-------  1 root root 10, 236 Jun  3 09:01 control

pvdisplay -m output:

# pvdisplay -m
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               Fantasia
  PV Size               1.82 TiB / not usable 936.00 KiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               476932
  Allocated PE          0
  PV UUID               Nl0vqx-Dggu-4d2I-h5MB-NuoV-CIoM-9Lk7Ye

  --- Physical Segments ---
  Physical extent 0 to 476931:
    FREE

  --- Physical volume ---
  PV Name               /dev/sdd
  VG Name               Fantasia
  PV Size               1.82 TiB / not usable 1.09 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               476932
  Allocated PE          0
  PV UUID               VDTFqS-vjAB-kBdf-LI5i-310v-Hs2c-KX9jYs

  --- Physical Segments ---
  Physical extent 0 to 476931:
    FREE

  --- Physical volume ---
  PV Name               /dev/sde
  VG Name               Fantasia
  PV Size               1.82 TiB / not usable 1.09 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               476932
  Allocated PE          0
  PV UUID               hYlB6v-Vkrn-hUNa-JVRK-zbOf-9Lca-Ps1JDL

  --- Physical Segments ---
  Physical extent 0 to 476931:
    FREE

  --- Physical volume ---
  PV Name               /dev/sdf
  VG Name               Fantasia
  PV Size               3.64 TiB / not usable 3.84 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              953861
  Free PE               953861
  Allocated PE          0
  PV UUID               2d5MB9-J6xH-B80B-lVoQ-Nde9-9CQ1-jxIusp

  --- Physical Segments ---
  Physical extent 0 to 953860:
    FREE

  --- Physical volume ---
  PV Name               /dev/sda
  VG Name               Fantasia
  PV Size               3.64 TiB / not usable 2.84 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              953861
  Free PE               953861
  Allocated PE          0
  PV UUID               YKOqsg-Wkx7-f0f3-ko2J-UeX3-YgFO-6ow0QL

  --- Physical Segments ---
  Physical extent 0 to 953860:
    FREE

output of what I believe to be the last known good lvm file, from /etc/lvm/archive:

# Generated by LVM2 version 2.02.168(2) (2016-11-30): Sat May  4 17:08:11 2019

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing 'vgextend Fantasia /dev/sdf'"

creation_host = "fantasia"      # Linux fantasia 4.19.0-0.bpo.4-amd64 #1 SMP Debian 4.19.28-2~bpo9+1 (2019-03-27) x86_64
creation_time = 1557004091      # Sat May  4 17:08:11 2019

Fantasia {
        id = "TPmx5a-MY9Y-gtTS-RwTU-wNFG-EXwU-4PhQDt"
        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 = "Nl0vqx-Dggu-4d2I-h5MB-NuoV-CIoM-9Lk7Ye"
                        device = "/dev/sda"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 3907027120   # 1.81935 Terabytes
                        pe_start = 2048
                        pe_count = 476932       # 1.81935 Terabytes
                }

                pv1 {
                        id = "VDTFqS-vjAB-kBdf-LI5i-310v-Hs2c-KX9jYs"
                        device = "/dev/sdb"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 3907027120   # 1.81935 Terabytes
                        pe_start = 2048
                        pe_count = 476932       # 1.81935 Terabytes
                }

                pv2 {
                        id = "hYlB6v-Vkrn-hUNa-JVRK-zbOf-9Lca-Ps1JDL"
                        device = "/dev/sdc"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 3907029168   # 1.81935 Terabytes
                        pe_start = 2048
                        pe_count = 476932       # 1.81935 Terabytes
                }

                pv3 {
                        id = "2d5MB9-J6xH-B80B-lVoQ-Nde9-9CQ1-jxIusp"
                        device = "/dev/sde"     # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 7814037168   # 3.63869 Terabytes
                        pe_start = 2048
                        pe_count = 953861       # 3.63869 Terabytes
                }

                pv4 {
                        id = "YKOqsg-Wkx7-f0f3-ko2J-UeX3-YgFO-6ow0QL"
                        device = "[unknown]"    # Hint only

                        status = ["ALLOCATABLE"]
                        flags = ["MISSING"]
                        dev_size = 7814037168   # 3.63869 Terabytes
                        pe_start = 2048
                        pe_count = 953861       # 3.63869 Terabytes
                }
        }

        logical_volumes {

                Fantasia {
                        id = "lhBS6X-W01J-0iyK-cDpN-Unl9-ALtS-dTMm1t"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        creation_time = 1490757300      # 2017-03-28 23:15:00 -0400
                        creation_host = "Fantasia"
                        segment_count = 5

                        segment1 {
                                start_extent = 0
                                extent_count = 953861   # 3.63869 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv3", 0
                                ]
                        }
                        segment2 {
                                start_extent = 953861
                                extent_count = 476932   # 1.81935 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 0
                                ]
                        }
                        segment3 {
                                start_extent = 1430793
                                extent_count = 476932   # 1.81935 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv1", 0
                                ]
                        }
                        segment4 {
                                start_extent = 1907725
                                extent_count = 476932   # 1.81935 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv2", 0
                                ]
                        }
                        segment5 {
                                start_extent = 2384657
                                extent_count = 953861   # 3.63869 Terabytes

                                type = "striped"
                                stripe_count = 1        # linear

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

}
2
  • This post is useless without the output of various commands. You should include them. Start with the output of pvs and of vgs. Also include anything else that might be relevant. Jun 3, 2019 at 6:19
  • Thanks, I wasn't sure what was or wasn't relevant, so thanks for the direction on which commands to start with. I've included what I think is relevant, hope it's not overkill... Jun 4, 2019 at 2:56

1 Answer 1

1

Your output indicates that a volume group named Fantasia exists, spanning all six disks, but doesn't contain any logical volumes.

The archive file seems to describe a logical volume named Fantasia in a volume group of the same name.

I can't say how your LV got deleted, but since you have the archive file you should be able to use vgcfgrestore to restore it, for example:

vgcfgrestore -f /etc/lvm/archive/Fantasia-00000-whatever.vg Fantasia
2
  • One thing I've noticed that may be a symptom of the cause is that after I've done a few commands, eventually "pvdisplay", "lvdisplay" and "vgdisplay" return no output. I have to restart the machine for them to return output again. Jun 8, 2019 at 14:03
  • I've made some progress but now I'm getting this error: mount: wrong fs type, bad option, bad superblock Jun 13, 2019 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .