#/dev/vg0/2 /mnt/junk ext4 acl,relatime 1 2
No, I haven't backed this up so I'm wondering if I have enough information to recover the volume group 'vg0', the physical volume 'pv0' and then the logical volume '2' where all the data (including my vbox VM's) and if there is, what commands do I need to do? I've researched a few posts but they don't quite match my condition.
The file "vg0" from /etc/lvm/backup:
- Code: Select all
# Generated by LVM2 version 2.02.103(2) (2013-10-04): Sat Mar 28 21:46:29 2015
contents = "Text Format Volume Group"
version = 1
description = "Created *after* executing 'vgchange -a y --sysinit'"
creation_host = "louielouie" # Linux louielouie 3.12.21-desktop-2.mga4 #1 SMP Thu Jun 5 21:33:44 UTC 2014 x86_64
creation_time = 1427604389 # Sat Mar 28 21:46:29 2015
vg0 {
id = "9y2hb4-wST3-kers-6oP1-ZpDv-otkg-6Priue"
seqno = 19
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 = "fkna4R-sGi9-1ESB-w9yJ-TyLD-euf1-8Uf2hR"
device = "/dev/sda6" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 927625167 # 442.326 Gigabytes
pe_start = 2048
pe_count = 113235 # 442.324 Gigabytes
}
}
logical_volumes {
2 {
id = "ktsiBh-MuBD-66Y3-Qnns-NxIr-jOD3-Z1IvFJ"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
segment_count = 2
segment1 {
start_extent = 0
extent_count = 112723 # 440.324 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 512
]
}
segment2 {
start_extent = 112723
extent_count = 512 # 2 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
}
}
From "fdisk -l /dev/sda"
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000754e7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 30812669 15405311 83 Linux
/dev/sda2 30816198 976768064 472975933+ 5 Extended
/dev/sda5 30816256 49142834 9163289+ 82 Linux swap / Solaris
I'm thinking that I would re-create /dev/sda6 with fdisk:
Partition type:
p primary (1 primary, 1 extended, 2 free)
l logical (numbered from 5)
Select (default p): l
Adding logical partition 6
First sector (49144883-976768064, default 49145856):
At this point, do I run "pvscan" or do I run pvcreate using the UUID from the backup file 'vg0'?