Thursday, March 18, 2010

rename volume group of the root partition

This is the process I used which worked:


1. Boot into rescue mode (no searching of installation -> skip)

2. Scan for LVM-VG's -> lvm vgscan
3. Check to not have active lvm in kernel -> lvm vgchange -a n
4. Rename VG -> lvm vgrename OldVG NewVG
5. rename LV -> lvm lvrename NewVG OldLV NewLV
6. Again, scan for VG's -> lvm vgscan
7. Activate lvm -> lvm vgchange -a y
8. Create directorys for mounting -> mkdir /mnt/sysimage/
9. Mount root-Logical Volume -> mount /dev/NewVG/NewLV /mnt/sysimage
10. Mount boot-partition -> mount /dev/cciss/c0d0p1 /mnt/sysimage/boot
11. make /dev/root: mknod /dev/root b $(lvm lvdisplay -C --noheadings --separator " " --options
lv_kernel_major,lv_kernel_minor NewVG/NewLV )
12. Mount /dev -> mount -o bind /dev /mnt/sysimage/dev
13. Change to new root -> chroot /mnt/sysimage
14. Remount /proc and /sys -> mount -o proc /proc ; mount -o sys /sys
15. Change OldVG to NewVG in /boot/grub.conf and /etc/fstab
16. Creating new initrd -> mkinitrd -f -v /boot/initrd-xyz.img xyz
17. exit
18. umount partitions
19. sync;sync;sync;exit


-b

Labels: , , ,

0 Comments:

Post a Comment

<< Home