6,534
edits
Changes
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 ==
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''
# mkdir /tmp/root
# mount /dev/sd''aB'' /tmp/root
# mount /dev/sd''aC'' /tmp/root/boot
# chroot /tmp/root
# vi /etc/fstab
== Create new initrd with proper modules ==
# 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 ==