LVM not found on startup

General support questions
Post Reply
angelosn
Posts: 19
Joined: 2016/10/16 07:51:45

LVM not found on startup

Post by angelosn » 2016/10/30 19:01:19

Hello,
I just install centos 7 and partitioned with 2 LVM (swap, / ). I changed the volume group and logical group names and now it cannot find the old names to boot.
Old names. vggroup = cl
lg=01 and 02

New names vgroup = Centos
lg=system and swap

Now I am wondering if there is a way to
a) Revert the changes or
b) Change the settings so it will load with the new values! I prefer this one but I just started with LVM I have no idea where to search!

Thank you for your time!

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: LVM not found on startup

Post by hunter86_bg » 2016/10/31 11:25:59

I think you can do the following:
1. Get the Installation DVD and boot from it.
2.Select "Rescue installed system"
3. Get a recovery console and mount the logical volumes manually.
4. Use

Code: Select all

chroot /<mount_point_of_moved_LVs>
5. Regenerate initramfs with

Code: Select all

dracut -f
6.Type "exit"
7.Reboot and try booting with the regenerated initramfs.

As I haven't tested this , I'm not sure that it will work.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: LVM not found on startup

Post by TrevorH » 2016/10/31 14:32:11

VG and LV names are also in /boot/grub2/grub.cfg or its EFI equivalent.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

angelosn
Posts: 19
Joined: 2016/10/16 07:51:45

Re: LVM not found on startup

Post by angelosn » 2016/10/31 20:58:19

Thank you for your replies.
I have also Luks encryption to my drive.
What should I change? And how I do that?
I boot from centos live USB but I do not know what to do further!
Any help is welcome!

angelosn
Posts: 19
Joined: 2016/10/16 07:51:45

Re: LVM not found on startup

Post by angelosn » 2016/10/31 21:04:38

hunter86_bg wrote:I think you can do the following:

3. Get a recovery console and mount the logical volumes manually.
I think I miss this step. How do I do this?

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: LVM not found on startup

Post by hunter86_bg » 2016/11/01 13:43:45

Well here is a step by step:
1. Select Troubleshooting
Image
2.Rescue a CentOS System
Image
3.Mount Root partition (1):
Image
4.Proceed:
Image

If it fails to mount the LVMs , you have a console to do that and after mounting you can do something like:

Code: Select all

chroot /mountpoint

Code: Select all

dracut -f

Code: Select all

grub2-mkconfig -o /etc/sysconfig/grub

Code: Select all

less /etc/sysconfig/grub

Code: Select all

exit

angelosn
Posts: 19
Joined: 2016/10/16 07:51:45

Re: LVM not found on startup

Post by angelosn » 2016/11/01 23:55:13

Thank you so much for your detailed walk through.
First of all I tried with the live gnome I do which did not have the option rescue a system. I found that option with the everything iso.

I follow all the steps but the problem persisted, so I chroot again and changed to the default names and booted normally.

Thank you again!

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: LVM not found on startup

Post by hunter86_bg » 2016/11/02 07:15:50

I forgot to mention , that you have to verify the information in the "/etc/fstab".

Post Reply