Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=207470
Guymon <guy+RH(a)photografius.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |guy+RH(a)photografius.com
--- Comment #19 from Guymon <guy+RH(a)photografius.com> 2010-01-28 16:20:50 EST ---
"One potential option that is relatively easy and gets us a little further is
this. Modify vgrename to have a "--force" option on it and allow renames into
duplicate VG names."
I'll second that!
My story:
After doing a vgrename, I was able to mount it and go in and fix some files,
but on doing vgrename to set it back to VolGroup00, I ran into this problem...
Arrrggggg.
Here's my bad remedy all from Dom0, it prevented me from rebuilding from
scratch. This worked for me, so do at your own risk. I'm also breezing over
stuff quick as if you got yourself in this mess, you should be pretty
conferable as a sysadmin.
My mess up started with
I had vgrename VolGroup00 to --> VolGroup00_WET
To make it work again in Xen We have to change the grub.conf and the initrd.img
(my case initrd-2.6.18-164.10.1.el5xen.img) along with the /etc/fstab as it
will try to fsck VolGroup00 and fail on boot.
1st. We need to mount the boot partition with the initrd*.img and the grub.conf
files.
I used:
mount -o loop,offset=32256 /dev/VolGroup_Wet/LogVol_Wet /mnt/LogVol_WET (love
offset!)
/mnt/LogVol_WET being my mnt space on Dom0.
In here we will find /grub/grub.conf. Vim in and change the VolGroup00 to
VolGroup00_WET(what my NEW VolGroup got vgrename too) Next grab the
initrd*.img. My current one was called initrd-2.6.18-164.10.1.el5xen.img. I
found out how to change this here
[
http://www.fedoraforum.org/forum/showthread.php?t=114819] Thanks!!!! heres a
quick copy paste from there.
---------------------------------------------------------------------------
the problem is that the intrd was indeed in the gzip format and further in the
cpio format, but the cpio format is not the default "bin" format used by cpio
but a "newc" format, so the extraction part was perfect, but when you put it
back you change the cpio format and hence the kernel hangs
(collection of files and directories) -> cpio archives -> gzip -> final
initrd.img
that means you can give the following commands -
mkdir ~/tmp
cd ~/tmp
cp /boot/initrd.img ./initrd.gz
gunzip initrd.gz
mkdir tmp2
cd tmp2
cpio -id < ../initrd.img
now you should have a lot of files in ~/tmp/tmp2 directories, including a lot
of subdirectories like sbin,lib
now do the required changes to the files
then pack the files back into the archive using the following command
cd ~/tmp/tmp2
find . | cpio --create --format='newc' > ~/tmp/newinitrd
cd ~/tmp
gzip newinitrd
now you would have a newinitrd.gz
rename this now -
mv newinitrd.gz as newinitrd.img
this is the new boot image now !!
----------------------------------------------------------------------------
Move this new image back to your mounted partition. I renamed the old one,
just incase.
Whew thats done! unmount.
umount /mnt/LogVol_WET
2nd. Lets Mount root / . Unfortunately offset won't work on this.
I did this like this from the Dom0.
/sbin/kpartx -a /dev/VolGroup_Wet/LogVol_Wet
/usr/sbin/pvscan
/usr/sbin/lvscan
/usr/sbin/vgchange -a y
## Mount it on /mnt/LogVol_WET
mount /dev/VolGroup00_WET/LogVol00 /mnt/LogVol_WET
now go in vim /mnt/LogVol_WET/etc/fstab and change VolGroup00 to
VolGroup00_WET(My new volgrp)
DON'T edit your Dom0 fstab.. I did that but luckily noticed and fixed my
mistake!!!!
phew... I think that's everything. Now unmount and clean up your kpartx stuff
umount /mnt/LogVol_WET
/usr/sbin/vgchange -a n
/sbin/kpartx -d /dev/VolGroup_Wet/LogVol_Wet
Now I can
/usr/sbin/xm create WET
and I'm golden!
I know this seems like a lot and I learned a lot. I mostly put this here
knowing I will loose my notes some time in the future. You have to love Google.
I would have been hosed!
Oh yea as I state before all this could have been avoided if vgrename had a
"--force" option!!!!!!
--
Configure bugmail:
https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.