I am running Scientific Linux 7.4

I have run vgrename to rename the volume group that contains my root filesystem. I thought this would be easy.

  • $ vgrename old_vg new_vg
  • edit /etc/fstab
  • edit /etc/default/grub to replace old_vg with new_vg
  • $ grub2-mkconfig -o /boot/grub2/grub.cfg

However, when I run grub2-mkconfig I get the following error message

/usr/sbin/grub2-probe: error: failed to get canonical path of `/dev/mapper/old_vg-root'.

I have tried changing the volume group back using vgrename but this does not seem to work. I am worried I may have done permanent damage to the logical volumes in the group. Is there a way to fix this?

  • Aren't you using UUIDs? Those would not change with vgrename, thus there would be nothing to edit. For grub it depends on what exactly the (old) grub.cfg and your default/grub looks like, also whether boot is on LVM or a separate partition. Unless vg names are hardcoded in the grub config, you would not have to change anything and it would still boot normally. Of course, grub's probe should not get confused by a vg rename regardless. – frostschutz Feb 23 '18 at 1:55
  • I don't think it is possible for book to be on a logical volume. Anyways to answer your question, no I am not using UUIDs, I know shame on me. I promise I will never do it again. – Timothy Pulliam Feb 23 '18 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.