Thursday, March 18, 2010

rename volume group of the root partition

https://bugzilla.redhat.com/show_bug.cgi?id=230190
the above doc has some errors. What worked is below:
1. Boot into rescue mode (no searching of installation -> skip)
2. Scan for LVM-VG's -> lvm vgscan
3. Check to not have activ lvm in kernel -> lvm vgchange -a n
4. Rename VG -> lvm vgrename VolGroup00 VG00
5. Again, scan for VG's -> lvm vgscan
6. Activate lvm -> lvm vgchange -a y
7. Create directorys for mounting -> mkdir /mnt/sysimage/
8. Mount root-Logical Volume -> mount /dev/VolGroup00/LogVol00 /mnt/sysimage
9. Mount boot-partition -> mount /dev/cciss/c0d0p1 /mnt/sysimage/boot
 
10. make /dev/root: mknod /dev/root b $(lvm lvdisplay -C --noheadings --separator " " --options
lv_kernel_major,lv_kernel_minor VolGroup00/LogVol00 )
 
11. Mount /dev -> mount -o bind /dev /mnt/sysimage/dev
 
12. Change to new root -> chroot /mnt/sysimage
13. Remount /proc and /sys
14. Change VolGroup00 to VG00 in /boot/grub.conf and /etc/fstab
15. Creating new initrd -> mkinitrd -f -v /boot/initrd-xyz.img xyz

16. make sure the default in /boot/grub/grub.conf refers to the entry with /boot/initrd-xyz.img
17. exit
18. umount partitions
19. sync;sync;sync;exit    

Labels: , , ,

0 Comments:

Post a Comment

<< Home