0

Many years ago, I created a RAID1 LVM data disk. During a re-installation, I deleted the volume group under cockatoo--vg-data associated with sdb1 and sdc1 and just have the partitions left.

sudo vgck 
  WARNING: wrong checksum 0 in mda header on /dev/sdb1 at 4096
  WARNING: wrong magic number in mda header on /dev/sdb1 at 4096
  WARNING: wrong version 0 in mda header on /dev/sdb1 at 4096
  WARNING: wrong start sector 0 in mda header on /dev/sdb1 at 4096
  WARNING: bad metadata header on /dev/sdb1 at 4096.
  WARNING: scanning /dev/sdb1 mda1 failed to read metadata summary.
  WARNING: repair VG metadata on /dev/sdb1 with vgck --updatemetadata.
  WARNING: scan failed to get metadata summary from /dev/sdb1 PVID M79lVqgFLXRVIH2I37SFvAZuVn2WK1an
  WARNING: wrong checksum 0 in mda header on /dev/sdc1 at 4096
  WARNING: wrong magic number in mda header on /dev/sdc1 at 4096
  WARNING: wrong version 0 in mda header on /dev/sdc1 at 4096
  WARNING: wrong start sector 0 in mda header on /dev/sdc1 at 4096
  WARNING: bad metadata header on /dev/sdc1 at 4096.
  WARNING: scanning /dev/sdc1 mda1 failed to read metadata summary.
  WARNING: repair VG metadata on /dev/sdc1 with vgck --updatemetadata.
  WARNING: scan failed to get metadata summary from /dev/sdc1 PVID 8c8tc8YQp3usUGAKZjJIIBvq8MpJa8Pn
sudo blkid
/dev/mapper/cockatoo--vg-swap_1: UUID="aca2a570-a1c3-43e7-90d0-62c962b039b1" TYPE="swap"
/dev/sdb1: UUID="M79lVq-gFLX-RVIH-2I37-SFvA-ZuVn-2WK1an" TYPE="LVM2_member" PARTUUID="0001da39-01"
/dev/mapper/cockatoo--vg-root: UUID="c3caa8d3-144d-4931-8a46-ddc9e0e1bc17" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sdc1: UUID="8c8tc8-YQp3-usUG-AKZj-JIIB-vq8M-pJa8Pn" TYPE="LVM2_member" PARTUUID="00028915-01"
/dev/sda5: UUID="oH6Wrt-Weui-2dgF-kmc0-cdjC-mN9k-RJc74H" TYPE="LVM2_member" PARTUUID="a555c2a7-05"
/dev/sda1: UUID="de5546d8-f3cd-43d8-bd16-2cd3e112d4eb" BLOCK_SIZE="1024" TYPE="ext2" PARTUUID="a555c2a7-01"
sudo head -c 1M /dev/sdb1 | strings -w

LABELONE
LVM2 001M79lVqgFLXRVIH2I37SFvAZuVn2WK1an
data_vol {
id = "Az8yjq-yS76-8D07-9dGe-Cf6x-gc9l-ci2roA"
seqno = 1
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0

physical_volumes {

pv0 {
id = "M79lVq-gFLX-RVIH-2I37-SFvA-ZuVn-2WK1an"
device = "/dev/sdb1"

status = ["ALLOCATABLE"]
flags = []
dev_size = 3907026944
pe_start = 2048
pe_count = 476931
}

pv1 {
id = "8c8tc8-YQp3-usUG-AKZj-JIIB-vq8M-pJa8Pn"
device = "/dev/sdc1"

status = ["ALLOCATABLE"]
flags = []
dev_size = 3907026944
pe_start = 2048
pe_count = 476931
}
}

}
# Generated by LVM2 version 2.02.104(2) (2013-11-13): Mon Mar  3 21:53:40 2014

contents = "Text Format Volume Group"
version = 1

description = ""

creation_host = "cockatoo"  # Linux cockatoo 3.13-1-amd64 #1 SMP Debian 3.13.4-1 (2014-02-22) x86_64
creation_time = 1393883620  # Mon Mar  3 21:53:40 2014


bitm
sudo head -c 4M /dev/sdc1 | strings -w
LABELONE
LVM2 0018c8tc8YQp3usUGAKZjJIIBvq8MpJa8Pn
data_vol {
id = "Az8yjq-yS76-8D07-9dGe-Cf6x-gc9l-ci2roA"
seqno = 1
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0

physical_volumes {

pv0 {
id = "M79lVq-gFLX-RVIH-2I37-SFvA-ZuVn-2WK1an"
device = "/dev/sdb1"

status = ["ALLOCATABLE"]
flags = []
dev_size = 3907026944
pe_start = 2048
pe_count = 476931
}

pv1 {
id = "8c8tc8-YQp3-usUG-AKZj-JIIB-vq8M-pJa8Pn"
device = "/dev/sdc1"

status = ["ALLOCATABLE"]
flags = []
dev_size = 3907026944
pe_start = 2048
pe_count = 476931
}
}

}
# Generated by LVM2 version 2.02.104(2) (2013-11-13): Mon Mar  3 21:53:40 2014

contents = "Text Format Volume Group"
version = 1

description = ""

creation_host = "cockatoo"  # Linux cockatoo 3.13-1-amd64 #1 SMP Debian 3.13.4-1 (2014-02-22) x86_64
creation_time = 1393883620  # Mon Mar  3 21:53:40 2014


bitm

How can I recover any data from these disks? Any help would be greatly appreciated.

Many thanks.

5
  • testdisk alone might help if LVs were linear and unfragmented (created directly, never removed, never resized, ...). In this case you could map LVs to regular partitions. Otherwise, do you have backup LVM metadata (usually under /etc/lvm/{backup,archive}/...)? Does head -c 1M /dev/sdx1 | strings -w show any LVM metadata? If the rootfs /etc was inside the LVM itself and not encrypted, you could strings the entire drive to search for it (# Generated by LVM2 or similar). Commented Apr 15 at 12:10
  • Added output of your suggestion "head -c 1M /dev/sdb1 | strings -w" above. Many thanks frostschutz. Unfortunately, this was a pure data disk with OS installed on another physical drive. Commented Apr 15 at 12:20
  • Unfortunately no logical_volumes { ... shown here. Same for the other drive? Commented Apr 15 at 12:37
  • Added output associated with "head -c 1M /dev/sdc1 | strings -w" above. Does the "data_vol { ... }" help in any way? Many thanks @frostschutz. Commented Apr 15 at 13:05
  • 1
    No, basically you have to proceed without metadata. Unless the OS this was at some point connected to still exists and has metadata in /etc/lvm. If the LV was not fragmented you could possibly treat this as a "lost partition table" with testdisk. Otherwise it's a puzzle. I don't have a specific answer here, sorry. See if you can find any filesystem headers, and into the rabbit hole from there. Or see if photorec finds anything (regardless of filesystem). Commented Apr 15 at 14:04

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.