| sysslack |
06-21-2010 01:35 PM |
LVM2, Is it possible recover LV_BACKUP
Hi
Yesterday I had a functioning system but needed to do an reinstall of ubuntu because of missing dependencies. Then I installed /dev/sda5 as normal (no lvm)
When I ran vgchange -ay after installation it did not find my missing logic volume. Instead got a whole bunch of error messages. I googled and followed the advice below vgreduce --removemissing UBUNTU. I did this vgreduce command because when running pvs I got /dev/sda5 unknown device.
ran vgs pvs lvs
Volme Group UBUNTU
Logic Volume LV_UBUNTU
but
LV_BACKUP is missing
vs
PV VG Fmt Attr PSize PFree
/dev/sda11 UBUNTU lvm2 a- 129.15G 129.15G
/dev/sda2 UBUNTU lvm2 a- 68.36G 48.36G
/dev/sda3 UBUNTU lvm2 a- 23.64G 23.64G
/dev/sda6 UBUNTU lvm2 a- 8.79G 8.79G
/dev/sda7 UBUNTU lvm2 a- 6.83G 6.83G
/dev/sda8 UBUNTU lvm2 a- 5.86G 5.86G
/dev/sda9 UBUNTU lvm2 a- 4.88G 4.88G
Read LVM HOWTO, but I dont understand this part . How can I know which pvs belongs to which LV
"Use pvcreate to restore the metadata: pvcreate --uuid "<some_long_string>" --restorefile /etc/lvm/archive/VolumeGroupName_XXXXX.vg <PhysicalVolume>"
below:
etc/lvm/archive/VolumeGroupName_XXXXX.vg
I
Code:
# Generated by LVM2 version 2.02.39 (2008-06-27): Mon Jun 21 19:07:54 2010
contents = "Text Format Volume Group"
version = 1
description = "Created *before* executing 'vgreduce --removemissing UBUNTU'"
creation_host = "j-desktop" # Linux j-desktop 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686
creation_time = 1277140074 # Mon Jun 21 19:07:54 2010
UBUNTU {
id = "CMOreA-Tm1m-q0CC-K0Dt-FWiW-bvIz-5KcoRM"
seqno = 7
status = ["RESIZEABLE", "PARTIAL", "READ"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "5q7iNU-5Ex3-OFGt-ehgM-Mj5k-gRGm-tGJDUm"
device = "/dev/sda2" # Hint only
status = ["ALLOCATABLE"]
dev_size = 143364060 # 68.3613 Gigabytes
pe_start = 384
pe_count = 17500 # 68.3594 Gigabytes
}
pv1 {
id = "2uNw81-TK55-LY7O-vYZo-wo9f-CwGg-Se0ENi"
device = "/dev/sda3" # Hint only
status = ["ALLOCATABLE"]
dev_size = 49576590 # 23.64 Gigabytes
pe_start = 384
pe_count = 6051 # 23.6367 Gigabytes
}
pv2 {
id = "O3j10h-bi48-DKf5-UFQf-TY41-aypS-ucurez"
device = "unknown device" # Hint only
status = ["ALLOCATABLE"]
dev_size = 43005942 # 20.5068 Gigabytes
pe_start = 384
pe_count = 5249 # 20.5039 Gigabytes
}
pv3 {
id = "ebqJ9i-l9XG-OT0c-Zd2V-YXvN-z1jI-nmjjiX"
device = "/dev/sda7" # Hint only
status = ["ALLOCATABLE"]
dev_size = 14329917 # 6.83304 Gigabytes
pe_start = 384
pe_count = 1749 # 6.83203 Gigabytes
}
pv4 {
id = "IpyObx-n765-XbGy-Btm3-GwBa-7pmi-V0ZBbe"
device = "/dev/sda6" # Hint only
status = ["ALLOCATABLE"]
dev_size = 18426492 # 8.78644 Gigabytes
pe_start = 384
pe_count = 2249 # 8.78516 Gigabytes
}
pv5 {
id = "2OeHQF-Y28j-RUA1-lTM0-DYNW-ySOi-a6ofNe"
device = "/dev/sda8" # Hint only
status = ["ALLOCATABLE"]
dev_size = 12289662 # 5.86017 Gigabytes
pe_start = 384
pe_count = 1500 # 5.85938 Gigabytes
}
pv6 {
id = "tHgncp-hADk-0N2n-jDXn-5NbU-AkR1-8m2etE"
device = "/dev/sda9" # Hint only
status = ["ALLOCATABLE"]
dev_size = 10233342 # 4.87964 Gigabytes
pe_start = 384
pe_count = 1249 # 4.87891 Gigabytes
}
pv7 {
id = "bZen3p-EeHw-zRuZ-aFEq-3xf4-ZFmH-hEDlqR"
device = "/dev/sda11" # Hint only
status = ["ALLOCATABLE"]
dev_size = 270855837 # 129.154 Gigabytes
pe_start = 384
pe_count = 33063 # 129.152 Gigabytes
}
}
logical_volumes {
LV_UBUNTU {
id = "PFYsIX-KmVK-O34I-LanO-4HO1-Mu1S-ZXxRB5"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 5120 # 20 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
LV_BACKUP {
id = "0jBxGj-Fmkk-AkDl-3Q9n-sTFD-A8v7-Y3uIuJ"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 8
segment1 {
start_extent = 0
extent_count = 33063 # 129.152 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv7", 0
]
}
segment2 {
start_extent = 33063
extent_count = 12380 # 48.3594 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 5120
]
}
segment3 {
start_extent = 45443
extent_count = 6051 # 23.6367 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv1", 0
]
}
segment4 {
start_extent = 51494
extent_count = 5249 # 20.5039 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv2", 0
]
}
segment5 {
start_extent = 56743
extent_count = 2249 # 8.78516 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv4", 0
]
}
segment6 {
start_extent = 58992
extent_count = 1749 # 6.83203 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv3", 0
]
}
segment7 {
start_extent = 60741
extent_count = 1500 # 5.85938 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv5", 0
]
}
segment8 {
start_extent = 62241
extent_count = 1249 # 4.87891 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv6", 0
]
}
}
}
}
|