LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2013, 10:39 AM   #1
kta
LQ Newbie
 
Registered: Jul 2013
Location: Hungary
Distribution: Debian Wheezy
Posts: 2

Rep: Reputation: Disabled
Data recovery from missing LVM logical volume


First I would like to say hello to everyone as this is my first post on LinuxQuestions.org.

I need help with data recovery from a lost LVM logical volume.

My OS is Debian 7.1.0 amd64. Here is the output of parted -l after connecting the disk to my machine and opening the encypted sdb3 partition with cryptmount. Unnecessary lines belonging to sda are removed.

Code:
$ parted -l
Model: WD A MK506 External (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name      Flags
 1      1049kB  8389kB  7340kB               biosgrub  bios_grub
 2      8389kB  209MB   200MB   xfs          boot
 3      209MB   500GB   500GB                crypto


Error:                                                                    
dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000:
unrecognised disk label
The partition sdb3 is a pysical volume for dm-crypt encryption. Inside the encrypted volume, there is a physical volume for LVM, with one volume group which is called vg1. In vg1, there are fsroot, home, swap, level1 and level2 logical volumes. I don't know the exact size and the order of the partitions. This setup was created using the debian wheezy installer some time in 2013 when wheezy was still in testing.

What I need is the contents of vg1-home. By the way, the os can not be booted from the drive, after unlocking the encrypted partition (wihch is called sda3 when I try to boot from it on another machine) the OS complains about not finding the root filesystem and gives me busybox prompt.

The problems came after removing the disk from its original place and mounting the lvm volumes while attached to another machine. After one successful mount, I could not boot from the disk or mount any of the logical volumes anymore. I can still unlock sdb3, access the files on sdb2 and according to S.M.A.R.T. there are no pending or reallocated sectors on the drive.

The last successful mount attempt was made with the help of this thread: http://ubuntuforums.org/showthread.php?t=1683579

Here are the output of some commands. Note that sda contains a very similar filesystem structure. vg0 is on sda3, vg1 is on sdb3. I need the contents of vg1-home.

Code:
$ pvdisplay
  --- Physical volume ---
  PV Name               /dev/dm-0
  VG Name               vg0
  PV Size               232.69 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              59568
  Free PE               0
  Allocated PE          59568
  PV UUID               ******-****-****-****-****-****-z4MGEg
   
  "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000" is a new physical volume of "465.56 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000
  VG Name               
  PV Size               465.56 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               ******-****-****-****-****-****-8Z4tOj
Code:
$ vgdisplay
  --- Volume group ---
  VG Name               vg0
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               232.69 GiB
  PE Size               4.00 MiB
  Total PE              59568
  Alloc PE / Size       59568 / 232.69 GiB
  Free  PE / Size       0 / 0   
  VG UUID               ******-****-****-****-****-****-RbhxHd
Code:
$ lvdisplay
  --- Logical volume ---
  LV Path                /dev/vg0/*******
  LV Name                private
  VG Name                vg0
  LV UUID                ******-****-****-****-****-****-3161Oo
  LV Write Access        read/write
  LV Creation host, time [host], [time]
  LV Status              available
  # open                 0
  LV Size                952.00 MiB
  Current LE             238
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
   
  --- Logical volume ---
  LV Path                /dev/vg0/swap
  LV Name                swap
  VG Name                vg0
  LV UUID                ******-****-****-****-****-****-mdpGQ7
  LV Write Access        read/write
  LV Creation host, time [host], [time]
  LV Status              available
  # open                 2
  LV Size                952.00 MiB
  Current LE             238
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:2
   
  --- Logical volume ---
  LV Path                /dev/vg0/fsroot
  LV Name                fsroot
  VG Name                vg0
  LV UUID                ******-****-****-****-****-****-tmHR01
  LV Write Access        read/write
  LV Creation host, time [host], [time]
  LV Status              available
  # open                 1
  LV Size                18.62 GiB
  Current LE             4768
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3
   
  --- Logical volume ---
  LV Path                /dev/vg0/home
  LV Name                home
  VG Name                vg0
  LV UUID                ******-****-****-****-****-****-mAOzlx
  LV Write Access        read/write
  LV Creation host, time [host], [time]
  LV Status              available
  # open                 1
  LV Size                212.20 GiB
  Current LE             54324
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4
Code:
$ dd if=/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000 bs=512 count=64 | strings
LABELONE
LVM2 001W3lge1cd8Qq08Gh0tS2ff0eZqf8Z4tOj
N$k@ 
crj-
0Hvq
pSM	3'kQ
ba}T
xv<P
Hu	]
	q){;
iX?w
?)w~
m_5 G
 lXpq
d.=;	$
5VSs
BKrh
b'iM
)I_3
/sf#%
E6gfg
3FGI
RAPP
v(*j(;t
d=#<
+!4a
<Zu>
 LVM2 x[5A%r0N*>
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
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 = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 2
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
fsroot {
id = "8fU4Qx-STqF-JbDG-aSnf-d2vb-70iD-chmo73"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 7152
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 0
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 3
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
fsroot {
id = "8fU4Qx-STqF-JbDG-aSnf-d2vb-70iD-chmo73"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 7152
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 0
home {
id = "d6DeG7-Jk6l-7XY3-v6Jj-3T6R-6uIh-58V3MA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 110864
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 7152
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
Eot5
<r=l
`,][
|bS	f
J{%'`V
.vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 4
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
fsroot {
id = "8fU4Qx-STqF-JbDG-aSnf-d2vb-70iD-chmo73"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 7152
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 0
home {
id = "d6DeG7-Jk6l-7XY3-v6Jj-3T6R-6uIh-58V3MA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 110864
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 7152
level1 {
id = "RyteUF-5O3r-ayRV-fbrF-UBcm-8vER-eeCX3F"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118016
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
?nC	
DicAv3
3qavg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 5
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
fsroot {
id = "8fU4Qx-STqF-JbDG-aSnf-d2vb-70iD-chmo73"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 7152
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 0
home {
id = "d6DeG7-Jk6l-7XY3-v6Jj-3T6R-6uIh-58V3MA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 110864
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 7152
level1 {
id = "RyteUF-5O3r-ayRV-fbrF-UBcm-8vER-eeCX3F"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118016
level2 {
id = "0F25BD-12vr-Gii9-bV8L-uETe-0Wlg-u9mp88"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118039
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
d]O)jB
~o*a6
kvg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 6
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/sda3_crypt"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
fsroot {
id = "8fU4Qx-STqF-JbDG-aSnf-d2vb-70iD-chmo73"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 7152
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 0
home {
id = "d6DeG7-Jk6l-7XY3-v6Jj-3T6R-6uIh-58V3MA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 110864
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 7152
level1 {
id = "RyteUF-5O3r-ayRV-fbrF-UBcm-8vER-eeCX3F"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118016
level2 {
id = "0F25BD-12vr-Gii9-bV8L-uETe-0Wlg-u9mp88"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118039
swap {
id = "U9IQMA-ifea-0tSP-xCcv-bUSV-m6mw-xQJSFw"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1122
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118062
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64
creation_time = **********	# [date time]
	=9(i
R`g|]3
;Tag
-wX&
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 7
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
home {
id = "d6DeG7-Jk6l-7XY3-v6Jj-3T6R-6uIh-58V3MA"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 110864
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 7152
level1 {
id = "RyteUF-5O3r-ayRV-fbrF-UBcm-8vER-eeCX3F"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118016
level2 {
id = "0F25BD-12vr-Gii9-bV8L-uETe-0Wlg-u9mp88"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118039
swap {
id = "U9IQMA-ifea-0tSP-xCcv-bUSV-m6mw-xQJSFw"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1122
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118062
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
creation_time = **********	# [date time]
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 8
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
level1 {
id = "RyteUF-5O3r-ayRV-fbrF-UBcm-8vER-eeCX3F"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118016
level2 {
id = "0F25BD-12vr-Gii9-bV8L-uETe-0Wlg-u9mp88"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118039
swap {
id = "U9IQMA-ifea-0tSP-xCcv-bUSV-m6mw-xQJSFw"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1122
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118062
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
creation_time = **********	# [date time]
c.,n)S
)M]K*D
/9/L
F2ix
s(_o(O
	kEg
/^dwK
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 9
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
logical_volumes {
level2 {
id = "0F25BD-12vr-Gii9-bV8L-uETe-0Wlg-u9mp88"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 23
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118039
swap {
id = "U9IQMA-ifea-0tSP-xCcv-bUSV-m6mw-xQJSFw"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1122
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118062
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
creation_time = **********	# [date time]
uP!LJ&u
pVBc
vvg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 10
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000"
64+0 records in
64+0 records out
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
32768 bytes (33 kB) copiedlogical_volumes {
swap {
id = "U9IQMA-ifea-0tSP-xCcv-bUSV-m6mw-xQJSFw"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_host = "localhost"
creation_time = **********
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1122
, 2.97038 s, 11.0 kB/s
type = "striped"
stripe_count = 1	# linear
stripes = [
"pv0", 118062
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
creation_time = **********	# [date time]
b$GG/S'
YSn`
QE-a
y>/T
vg1 {
id = "ajitqz-EWVe-GvFR-jDXw-6iV4-BaJO-4hXOgU"
seqno = 11
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "W3lge1-cd8Q-q08G-h0tS-2ff0-eZqf-8Z4tOj"
device = "/dev/mapper/udisks-luks-uuid-770503ef-50cc-486d-bf46-ecf296f83ec6-uid1000"
status = ["ALLOCATABLE"]
flags = []
dev_size = 976359424
pe_start = 2048
pe_count = 119184
# Generated by LVM2 version 2.02.95(2) (2012-03-06): [date time]
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost"	# Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
creation_time = **********	# [date time]
2;H#
3c/&"
4N#it`
9[sp
a&A@u
=pPfm
Ch9o
Jc{=
B=~Jf
x{V
Ln`Z
'82u
M K27>aA
s9v*
uHcc
?u V
A9>7cW
EMlI~'
EwhV
;JR;
X{_@
|@p
3i[le
{2u_
03wd
Ydro!
Od!'
,7}Y
Ua2|
[#tOg
11%$
IS87n
:sptVp6w
f#EI
<A:v<i
aYSLO
W@Jg
yg[-
pNz$
<0&8$
ar}Q
Qo76
GXK[Bh}
qx=F#
l7#t6
gA<	
)bp,
NC'E
7Ce$Is
}#{}e~$j
S%Y'
[k*J
GFV(
w(DF
oX<5
FbIH
Ul}
Y^H>'
E	D$/1>/
>9M~
$-61}
pW$s
 ~,6z
:!P[6M
Q(_H
)S:H
BNaw
)D{Q
paRo
q0RoF?
?&lNq
pEiOj
uSQ6
r}{cu
;Q'	]8
$W!F
0WgE#)
{H.g
Q&"a
?CnR
u6[t`
w YU
cg(?;
OHd:H
52=n
WeB+0*
s6Q3
Xv+(
p_H;
xcz3
Ve@Z
#Yu^
h,T]
J*%"
4,]P
8'`)
gzUh
n@=I
^Mu6
&1 J
WB]w
,?Zq;R
U}0!
1~wq
ag~l:
|g:Q
SPC T!
:.g'
Q}4'H
=O^wx;
With some information from the following thread:
https://www.linuxquestions.org/quest...-group-845424/
I tried this:

Code:
echo 0 974359424 linear /dev/sda2 2048 | dmsetup create LQ00
mount /dev/mapper/LQ00 /mnt/recoverydir/
As a result I could access the files on vg1-fsroot, but still no access to vg1-home. Please someone help, im stuck with this.

Thanks

Last edited by kta; 07-18-2013 at 10:45 AM. Reason: oops...
 
Old 07-20-2013, 08:14 AM   #2
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
http://www.novell.com/coolsolutions/appnote/19386.html
http://www.tldp.org/HOWTO/LVM-HOWTO/...rmetadata.html

These pages helped me a LOT when somehow my LVM partition was deleted. I was able to regain access to everything without having to restore from a backup.

And another found via Google, just in case:
http://mbroz.fedorapeople.org/talks/...,d.dmg&cad=rja
 
Old 07-20-2013, 06:07 PM   #3
kta
LQ Newbie
 
Registered: Jul 2013
Location: Hungary
Distribution: Debian Wheezy
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the links. I successfully restored LVM metadata from backup, but this doesn't help. vgscan still can't find the missing vg. But I dont't care about repairing my LVM setup, I just need to copy the data from one of the logical volumes. I can still mount the first lv in the corrupted vg this way:

Code:
echo 0 974359424 linear /dev/mapper/lvm 2048 | dmsetup create test
mount /dev/mapper/test /media/test
The problem is, I dont know how to calculate the values so I can mount a lv other than the first one in the vg. Can someone point me in the right direction?

Last edited by kta; 07-22-2013 at 07:47 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
[SOLVED] HELP! Restoring a LVM Logical Volume Checksumfail Linux - Hardware 1 12-18-2012 07:45 AM
Extended LVM Volume group and Logical Volume. But space not usable linuxlover.chaitanya Linux - Server 1 11-19-2012 09:37 AM
RAID5 missing volume data recovery yimbot Linux - Software 3 05-24-2011 02:52 PM
Logical Volume recovery plythgam Linux - Software 2 03-27-2006 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration