View previous topic :: View next topic |
Author |
Message |
foux Tux's lil' helper
Joined: 04 Jul 2004 Posts: 89 Location: Rennes, France
|
Posted: Thu Dec 09, 2004 10:46 pm Post subject: Problem with LVM at startup |
|
|
Hello, I badly removed my old LVM disk, an now I've got the following error on boot :
Code: | Found volume group "vg" using metadata type lvm2
Couldn't find device with uuid '3e8f1M-8uTd-o3Tb-et9Q-cgVG-A48u-lhEC6P'.
Couldn't find all physical volumes for volume group lvm_vg.
Volume group "lvm_vg" not found |
lvm_vg is my old lvm volume group and vg is my new volume group.
Here are my two questions :
- Is it possible to remove the bad group (vgremove lvm_vg returns me that the group doesn't exists)
- Because of this error, lvm isn't activating my other vg at boot, so I have to type after boot, to mount partitions on my vg
Thanks,
FX |
|
Back to top |
|
|
Windfall n00b
Joined: 30 Apr 2004 Posts: 15 Location: Krakow, PL
|
Posted: Fri Dec 10, 2004 1:11 am Post subject: |
|
|
Hello.
I guess you used pvremove with force or some such thing? I've done this once myself. If I recall correctly, I fixed it by recreating the pv with the correct uuid (pvcreate --uuid the_uuid_from_the_error_message /dev/your_disk) and then running vgcfgrestore (the `restore point' was created by lvm before carrying out the pvremove). _________________ Michal Marczyk |
|
Back to top |
|
|
foux Tux's lil' helper
Joined: 04 Jul 2004 Posts: 89 Location: Rennes, France
|
Posted: Fri Dec 10, 2004 6:27 am Post subject: |
|
|
Unfortunately I can't do that, because the disk knows has a different partitionning,
Regards,
FX |
|
Back to top |
|
|
hybrid Apprentice
Joined: 22 Dec 2003 Posts: 224 Location: Lyon, France
|
Posted: Fri Dec 10, 2004 6:41 am Post subject: |
|
|
hmmm, i think this comes from your partitionning, if i understood you well, you changed your partitions in the disk with the lvm_vg group, i think that you forgot to mark the new partition as being lvm ...
as a workaround you can simply use the /etc/lvm/lvm.conf (i think) to disable the scanning of the old HD, this is not a solution, but a workaround |
|
Back to top |
|
|
Windfall n00b
Joined: 30 Apr 2004 Posts: 15 Location: Krakow, PL
|
Posted: Fri Dec 10, 2004 5:45 pm Post subject: |
|
|
Well, I wonder if it would work if you just created another pv with the old pv's uuid and use it to fool lvm about the state of your vg. I've been looking at lvm's vg backups and they do contain the information about the device the pv's using, but there's always a comment on such lines saying it's only a hint. So, maybe this could help a bit. (Seems rather likely that some lvs will still be screwed, but maybe you can simply lvremove them then; no idea, never tried.)
Anyway, why don't you describe what you did in a little more detail? I mean, what was your original partitioning scheme, what is your current partitioning scheme and what exactly did you do to change it from the old one to the new one. _________________ Michal Marczyk |
|
Back to top |
|
|
foux Tux's lil' helper
Joined: 04 Jul 2004 Posts: 89 Location: Rennes, France
|
Posted: Fri Dec 10, 2004 6:33 pm Post subject: |
|
|
Thanks for your answers, but they are not applicable
Here is exactly what I've done. I have two sata drives and one IDE.
I used to have my /home on a lvm on the two sata and my / on the IDE.
To speed up my system, I've decided to put my / on the sata, so, I delete the lvm, repartition my first sata (I've done nothing on the second).
Then, I have recreated my lvm on the second partition of the first sata drives, and the entire second sata.
lvm is complaining about the second sata disk (the one for wich the partitionning hasn't changed)
Thanks,
FX |
|
Back to top |
|
|
Windfall n00b
Joined: 30 Apr 2004 Posts: 15 Location: Krakow, PL
|
Posted: Sat Dec 11, 2004 12:23 am Post subject: |
|
|
When you say "I delete the lvm" you mean that you delete the physical volume, right? Then you can do as I suggested, create a pv with the right uuid somewhere. Thing is, you probably need to recreate it at least as large as it used to be; see man 8 lvm under the option -P, which you should read anyway; so maybe it's best that you temporarily remove your new vg, then recreate the old state of affairs, then do things nicely using pvmove to restructure your old vg or vgremove to get rid of it altogether and start afresh. The -P option to lvm may be of some use to you; you should be able to access the working part of your old vg with it, and who knows, maybe even delete it (though probably not).
Hm, it just occured to me that maybe you can use dmsetup remove to get rid of the old vg; see man 8 dmsetup for more info. Should this work, it would be the easiest and cleanest solution, so give it a try. If you succeed, you'll probably want to remove the backup files for the old vg from /etc/lvm; I don't think lvm will do that.
On a side note, if you have a fast controller (like what they call UltraATA 133) for your ide disk, I don't think you'll experience much of a speedup by transfering your system files to the sata disks. Maybe you could use striped logical volumes using some space on each of the drives; then it might indeed be faster. (You probably don't want your /lib, /bin, /sbin and /root on an lvm volume, but you could certainly have /usr, /var, /tmp and /opt on a striped lv.)
Hope this helps (somewhat). If it doesn't, provide more detail; like how much space you have on the drives, how much data you need to keep on those disks (mention what's under / and what's under /home separately), whatever might be relevant, in detail. And do what you did by naming the exact commands; "removing the lvm" might mean a couple of things (like using pvremove, vgremove, fdisking the disk to remove the lvm's partition and so on). Well, anyway, I hope the above works and you can just post the success story. _________________ Michal Marczyk |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|