LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HELP! Fixing logical volume problem (https://www.linuxquestions.org/questions/linux-newbie-8/help-fixing-logical-volume-problem-4175464991/)

yaximik 06-06-2013 11:34 AM

HELP! Fixing logical volume problem
 
Hi,

It appears I accidentally renamed my main logical volume and now RHEL58 machine cannot boot normally. The original logvolume names were VolGroup00 and LogVol01, LogVol02, etc. The last command I used was
Code:

vgrename -t VolGroup00 SysVolume
which should not change records but should only make and keep the change during the current session (if this is correct understanding). Then I rebooted to erase any modifications. However, this is what I got upon reboot:
Code:

Reading all physical volumes. This may take a while...
 Found volume group "SysVolume" using metadata type lvm2
 Volume group "VolGroup00" not found
Unable to access resume device (/dev/VolGroup00/LogVol01
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
setuproot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
_

I guess I need to rename SysVolume back to LogVolume00, but I do not know how from the point the the system is stuck at, or how to proceed after logging in with a rescue disc or liveDVD. Please advise...

spazticclown 06-06-2013 03:54 PM

Booting to a live media and starting with a 'vgscan' to see what the volume is now called. If it just needs to be renamed "VolGroup00" that should be straight forward, you already know the command (minus the -t). You can also use your time in the live environment to back up any important data to an external device or network location just in case something goes wrong.

yaximik 06-06-2013 08:06 PM

[SOLVED] HELP! Fixing logical volume problem
 
Thanks! I was able to use the rescue mode from the installation disk, which put me into a shell, where all vg-related commands could be used with prefix lvm, like "lvm vgrename" instead of just "vgrename". I had first to deactivate the entire renamed logical volume "SysVolume" by using "lvm vgchange -an SysVolume", then "lvm vgrename SysVolume VolGroup00" and activate it back "lvm vgchange -ay VolGroup00" and reboot. Wheeew!


All times are GMT -5. The time now is 06:23 PM.