20150806 renaming an lvm volume group on fedora 21 - plembo/onemoretech GitHub Wiki

title: Renaming an LVM volume group on Fedora 21 link: https://onemoretech.wordpress.com/2015/08/06/renaming-an-lvm-volume-group-on-fedora-21/ author: phil2nc description: post_id: 9986 created: 2015/08/06 17:13:05 created_gmt: 2015/08/06 21:13:05 comment_status: closed post_name: renaming-an-lvm-volume-group-on-fedora-21 status: publish post_type: post

Renaming an LVM volume group on Fedora 21

The Internet is awash with bad, or imprecise, advice. I wanted to rename the single LVM2 Volume Group on my Fedora 21 desktop. Problem was that the root partition was in it. After much googling and several tries my conclusion is: Don't do it. That's right. Just leave it alone. Any advice you might see out on the Internets is wrong, at least for anything running on the 4.0 Linux kernel with all services controlled by systemd. Here's what I tried: 1. Used vgrename to rename the volume. In my case from test1_fedora to fedora. 2. Searched and replaced through /etc/fstab and /boot/grub2/grub.cfg to to change test1_fedora to fedora. 3. Rebuilt the intramfs file for the active kernel using mkinitrd. 4. Rebooted. After rebooting the system would go into fsck mode and eventually drop down into the dracut emergency shell. Getting things working again wasn't straightforward, partly due to my Acer C720 Chromebook's firmware lack of support for booting Fedora 21 from a usb stick (I've since updated with the custom firmware created by John Lewis, resolving that issue). What I finally had to do was boot with the Fedora 20 Live DVD, mount the LVM volumes, do a chroot and change everything back. So what went wrong? At the moment I'm just not sure. If I had to guess I'd say it has something to do with systemd somehow retaining the old volume mappings, because everything else was changed as required. The only thing my sources on the Internet didn't mention was systemd, _because all their comments were made before systemd was integrated into the operating system.

Copyright 2004-2019 Phil Lembo