lost my FC5 LVM volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I was going to give Ubuntu a try and started an install. Since I wanted to leave my FC5 intact and dual-boot, I was using the Ubuntu LVM tools to set up LVM and walked on the FC5 LVM headers or whatever they are called.
My partition setup:
hda1:	boot FC5 base partition
hda2: LVM volume, leftovers of FC4 that I've been too lazy to take a backup of, still intact hda3: the lost LVM volumes of FC5, /usr et. al., except for one volume on hde5
hda4:	unused (freeBSD install currently sitting idle)

hde1: base partition, failed installing Ubuntu boot here, installed FC6 instead for LVM tools
hde2:	FC6 /usr et. al., in LVM (which I am now sure was a mistake)
hde3 or hde4, I don't remember which:	DOS extended
hde5:	LVM PV which was used as shared volume on FC5
hde6:	swap
hde7:	FAT32 share

I think that where things went south was when I added another volume group on hde using the Ubuntu LVM tools. I saw on

a few warning words to the effect that one shouldn't add physical partitions (hde5) from a second drive to a volume group on one drive (in hda3), and then set up a separate volume group (the Ubuntu volumes) on the second drive. After partitioning, at the step where Ubuntu would start actually installing, it complained that LVM could no longer find the PV that had been in hde5 in the FC5 volume group.
I found this in a blog by one jalal, apparently of gnomedia.com (now
apparently only in google cache):
Here is what I did: First find out the old UID’s of the partitions, this is in the /etc/lvm/backup/system file. They are quite long… make sure you get the UID for the physical volumes.
$pvcreate -u sdSD-2343-SD939-adIda2 /dev/hda6
$pvcreate -u dk33kd-929293nd-adfja298a /dev/hdd1
$vgcreate -v system /dev/hda7 /dev/hdd1
$vgcfgrestore -f /etc/lvm/backup/system system

and lo!, all data present and correct!

In fact, I just rebooted the system and was back where I had started with the additional benefit of an extra 60Gb of disk space, because now I had the extra partition properly included.
[Note: in the lines using pvcreate... above I could have used:
$ pvcreate –restorefile /etc/lvm/backup/system
to automatically find the ID’s but I hadn’t realized that at the time. Without the UID’s then the vgcfgrestore will not find the physical volumes that it needs to recreate the volume group.]
I tried following that but forget the vgcfgrestore step, and
apparently have lost what headers remained. vgscan no longer sees the
FC5 volume group at all. I do still have FC5's /etc/lvm in the boot
partition (which will try to boot and fail, of course). (Kind of wish
the lvm commands had been under /sbin instead of /usr/sbin .)
Any pointers where I can go to find information that might help me
recover the data?
I'm thinking maybe I should install another FC5 in hda4, just enough
to use the command-line pvcreate tools, and all in one partition, so
I can scrub the FC6 install and get that other LVM volume off of hde .

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux