Changes
no edit summary
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 ==
and make sure the system is up and running.
== For linux swraid (mdadm) users with bitmap enabled and low IO write speed, you might need to redo bitmap
cat /proc/mdstat , if chunk size is small , try (example for internal bitmap) :
mdadm --grow --bitmap=none /dev/md2 ;
mdadm --grow --bitmap=internal --bitmap-chunk=16384 /dev/md2
== 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 fpD /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 ==
Notes:
* you have to add ext4 explicitly
* in RHEL6 kernels some USB stuff (that used to be in ehci-hcd, ohci-hcd, uhci-hcd modules) is are built-in
== Reboot and enjoy ==
/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 ==