FedoraThis forum is for the discussion of the Fedora Project.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Help. I had Fedora Core 3, and wanted to upgrade to Fedora Core 5. I bought a new hard drive and installed FC5 on it. That is all fine. I was struggling to transfer my old files across to the new hard drive as both FC3 and FC5 both use LVM and the VolGroups and the LVs are both the same.
On FC5 I could see that the physical drive was there, but it couldn't see the VolGroup or the LogicalVolume. LVM could see the VolGroup and LogVolumes of the running filesystem just fine.
So following the advice of a website I created a VolGroup for my old drive, named 'main'. This was likely a huge mistake, but everything I read from that site and others seemed to make it look like everything was going to be virtual and wouldn't write to the physical drive.
Then I tried booting the old system and it found 'main' which is horrible as the old VolGroup is gone. It of course can't boot. Creating a new LogicalVol didn't help (I was grasping at straws).
Is there a way to reset my old VolGroup and LV info to what it should be, VolGroup00/LogVol00, or is all my old data lost forever?
And assuming (Lord willing) that I am able to get my old data back, is there a way to mount a LVM'ed drive to another LVM filesystem when they both have the same name?
Was your old root filesystem on the LVM partition ?
If you can get your /etc/lvm/archive folder , and as long as you haven't formatted your disk ,everything else shouldn't have destroyed your data.
Coz all the LVM metadata is stored separately and and the actual data is not changed when the metadata is altered.
Thank you for your quick reply. Yes, my root "/" directory is on the LVM as that is the standard Fedora install. I'm wondering if I could just boot from a LiveCD or anything other than Fedora (as it has the matching VolGroup info) and artifically plug in the data. Problem is - I'm not too sure what that data should be. I'm a slight beginner when it comes to Linux, but a complete noobie when it comes to LVM. I can see why a sysadmin would use it, but I'm just using it for a home computer.
Any ideas on what info I would want to plug in? Even if I could just mount the drive (partition), then I could just cp the files over to the new drive. If that were possible I would be jumping with glee.
I had a similar problem. Here's my solution, which has been working well.
The problem is not your LVM rename, but that the initrd generated for you FC3 needs to be changed to reference the new name instead of the (hard coded at the time of the install) old name. My solution was to activate ALL the logical volumes, so GRUB could specify the actual /root at boot time, but the mkinitrd maintainer did not accept the suggestion as a bug to be fixed.
I might have a glimmer of hope. When I was setting up my FC5 at first I threw a copy of my /etc folder on a CD-ROM and placed that on my FC5 Desktop. Looking at etc/lvm I find that the archive and backup folders are empty. The lvm.conf file has lots of info but I can't find anything regarding VolGroups or LV's on it. This has me worried.
I found that the Gentoo LiveCD has lvm2 support so I will be downloading that. If all I have to do is load into Gentoo and change the VolGroup name and LV name back that would be great - but from what I see it seems that the LogicalVol needs input on size etc, and I wouldn't know what to put in.
I had FC5 isos downloaded on my FC3 system. I burned all the CD's except the emergency disk.
Now I've really done it. I think that I have now made it even harder (imposible) to recover my data. Decided to try mounting the FC3 drive into the FC5 filesystem. First I extended the LV to the whole drive. Then I tried to mount it, but it kept asking for a filesystem type - as would be expected. But with the new LVM'ing it never assigned itself a filesystem type. So like a fool I assigned it one (ext2). Now when I look at what is mounted all that is inside is "lost+fount". Ouch. I think my only option now is a data recovery company.
Anyone have any ideas? Do I need to take the expensive route?
If you have the backup of /etc/lvm , I think you can get back your data ( again , unless you have formatted any of the partitions) .
I have done this once , but I don't remember the step by step process of that.Wish I had begun blogging then itself.
This blog looks something similar. http://codeworks.gnomedia.com/archiv.../lvm_recovery/
But basically you will need to create the PVs once more , and then reconfigure the VGs with the latest you will find in the /etc/lvm/archive folder using vgcfgrestore command.Open up the vg files in vi , you will be able to find some details to figure out which is the config that you had when it was last working fine.
Last edited by nabeelmoidu; 06-07-2006 at 05:34 AM.
I have a new disk with no LVM but the old disk has one, to mount the old disk all I did was this:
mount -t auto /dev/VolGroup00/LogVol00 /media/hda
/media/hda is a mount point that I created.
Your situation might be different with regard to the location of each VolGroup, I would have thought it not neccessary to alter LVM extents just to mount the volume.
The other thing I have done is edit /etc/grub.conf so that I can choose which system to boot ( I still have FC3 on my old drive)
It's also a good Idea to have a small (100MB) boot Partition as the 1st partition because grub basically identifies things by hd numbers & partition numbers and not by directory.
Any way I hope this might help you.
laxisusous, everyone seems to be ignoring my comment, above, so maybe it was off the mark.
Have you done a pvscan with your HDs connected? From what you said, it should show two different volume groups: VolGrp000 and main. If it doesn't, the you didn't actually change the name of your FC3 logical volume to main.
If you did make the change, the only way you can boot to the OS on that drive, as far as I know, is to have you initial ram drive actually use that drive. On the other hand, if you just want to access the data on the drive, there should be an entry in dev/mapper/main for each logical drive in the LV main that you can mount in your FC5 system. As an example, here're a few lines from my /etc/fstab
Well, I can understand your reluctance to pay that much for data recovery, although that's fairly inexpensive, and -- if you data contained, for example, the results of expensive experiments -- the price might be quite reasonable. (Before I retired, I worked as a biostatistician for a drug company, and the results for a single patient trying a new drug could cost more than 5000 Swiss Franks. Loss of the results for a whole experiment could cost several millon. [Of course, we alwyes had multiple back-ups for that kind of data.])
If your data are all in lost+found, it may, in fact, still be available. It's possible that all that was lost was the directory file, and an examination of the files in the lost+found directory might let you recover at least your critical data. (Of course, if lost+found is enpty you're lost.)
If your data are, in part, text files, something as simple as grep (or the find application in KDE, if you use KDE) can identify specific files containing specific text strings or patterns. Once identified, they can, of course, be copied to wherever you want.
Edit: By the way, you can do a grep on the output of a dd of the whole drive, but reconstricting the file chains can be rather difficult.
If you just want to chalk it you to a learning experiance, the value of frequent back-up is one thing to be considered.
Last edited by PTrenholme; 06-08-2006 at 12:42 PM.