[CentOS] vgrename, lvrename

Sat Sep 11 20:55:49 UTC 2010
Robert Heller <heller at deepsoft.com>

At Sat, 11 Sep 2010 13:45:55 -0600 CentOS mailing list <centos at centos.org> wrote:

> Hi,
> I want to rename some volume groups and logical volumes.
> I was not surprised when it would not let me rename active volumes.
> So I booted up the system using the CentOS 5.5 LiveCD,
> but the LiveCD makes the logical volumes browsable using Nautilus,
> so they are still active and I can't rename them.
> Tried:
> /usr/sbin/lvchange -a n VolGroup00/LogVol00
> but it still says:
>    LV VolGroup00/LogVol00 in use: not deactivating
> Did some googling and found out that other folks have had
> problems with mkinitrd, but I haven't gotten that far yet.
> Made a wild guess and killed my nautilus process, a lot of stuff
> disappeared from the desktop, then reappeared along with a new
> nautilus process.
> Still googling, but haven't found anything useful so far.
> Any idea?

*Don't* boot the GUI!  Boot into text mode.  Nautilus, etc. is not
started and won't be restarted.  Sometimes the GUI is not really easier,
it can in fact be much harder.

You should be able to login as root and use the CLI to do what you need
to do.

Note: in the case of mkinitrd, you will need to rebuild your initrd if
you expect to actually boot the machine after renaming the volume group
and logical volumes. You'll need to *manually* mount the root and /boot
(at least) someplace (eg under /sysroot), then chroot there. Don't
forget to fix /etc/fstab and /boot/grub/grub.conf (root=...).

Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/