Changes

Jump to: navigation, search

028 to 042 kernel upgrade

377 bytes added, 03:54, 21 November 2013
improvements all over the place (apparently live cd is optional)
This article describes a way to upgrade your old OpenVZ system with RHEL5-based
(028stabNNN kernel) to RHEL6-based (042stabNNN) kernel, and convert /vz
from ext3 to ext4, while keeping RHEL/CentOS 5 as a host OS.
Assumptions:
yum update
 
Install required software:
 
yum install e4fsprogs.x86_64
== Add rhel6 kernel repos ==
== Convert /vz to ext4 ==
Boot If your /vz is a separate file system, you need to stop all containersand umount it first:  for ve in $(vzlist -1); do vzctl stop $ve; done umount /vz Alternatively, boot the node from a live-CD (such as, CentOS 6 live CD) and perform the following steps.
Check file system:
Turn on ext4 features:
# tune2fs tune4fs -O extents,uninit_bg,dir_index /dev/sd''xY''
Check the new file system again, as ext4 this time:
# fsck.ext4 -fD /dev/sd''xY''
You If you have booted from the live CD, you can do the same for root filesystem, too.
NowIf you have booted from the live CD, do this:* mount your ROOT (<code>/</code>, not <code>/vz</code>) and BOOT partitions:
# mkdir /tmp/root
# mount /dev/sd''aB'' /tmp/root
# mount /dev/sd''aC'' /tmp/root/boot
 Finally, * chroot into it:
# chroot /tmp/root
Edit its Finally, edit <code>/etc/fstab</code>, replacing <code>ext3</code> with <code>ext4</code> for <code>/vz</code> (and <code>/</code> if you converted it as well).
# vi /etc/fstab
== Create new initrd with proper modules ==
This assumes you are still entered chroot: # KV=042stab083.2
# mkinitrd -v -f --with=ext4 --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd \
/boot/initrd-2.6.32-042stab81.8${KV}.img 2.6.32-042stab081.8${KV}
Notes:
/dev/sda2 ext3 496M 46M 425M 10% /boot
/dev/sdb1 ext4 1.8T 196M 1.7T 1% /vz
 
== Next steps ==
 
You can now install [[ploop]] and enjoy all its benefits.
 
Also, it makes sense to convert your containers to [[VSwap]].
== See also ==

Navigation menu