Editing 028 to 042 kernel upgrade
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This article describes a way to upgrade your old OpenVZ system with RHEL5-based | This article describes a way to upgrade your old OpenVZ system with RHEL5-based | ||
(028stabNNN kernel) to RHEL6-based (042stabNNN) kernel, and convert /vz | (028stabNNN kernel) to RHEL6-based (042stabNNN) kernel, and convert /vz | ||
− | from ext3 to ext4 | + | from ext3 to ext4. |
Assumptions: | Assumptions: | ||
Line 16: | Line 16: | ||
yum update | yum update | ||
− | |||
− | |||
− | |||
− | |||
== Add rhel6 kernel repos == | == Add rhel6 kernel repos == | ||
Line 73: | Line 69: | ||
and make sure the system is up and running. | and make sure the system is up and running. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Convert /vz to ext4 == | == Convert /vz to ext4 == | ||
− | + | Boot node from a live-CD (such as, CentOS 6 live CD) and perform the following steps. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Check file system: | Check file system: | ||
Line 93: | Line 78: | ||
Turn on ext4 features: | Turn on ext4 features: | ||
− | # | + | # tune2fs -O extents,uninit_bg,dir_index /dev/sd''xY'' |
Check the new file system again, as ext4 this time: | Check the new file system again, as ext4 this time: | ||
− | # fsck.ext4 - | + | # fsck.ext4 -fD /dev/sd''xY'' |
− | + | You can do the same for root filesystem, too. | |
− | + | Now, mount your ROOT (<code>/</code>, not <code>/vz</code>) and BOOT partitions: | |
− | |||
# mkdir /tmp/root | # mkdir /tmp/root | ||
# mount /dev/sd''aB'' /tmp/root | # mount /dev/sd''aB'' /tmp/root | ||
# mount /dev/sd''aC'' /tmp/root/boot | # mount /dev/sd''aC'' /tmp/root/boot | ||
− | + | ||
+ | Finally, chroot into it: | ||
# chroot /tmp/root | # chroot /tmp/root | ||
− | + | Edit its <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 | # vi /etc/fstab | ||
== Create new initrd with proper modules == | == Create new initrd with proper modules == | ||
− | + | This assumes you are still entered chroot: | |
− | # mkinitrd -v -f --with=ext4 -- | + | |
+ | # mkinitrd -v -f --with=ext4 --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd \ | ||
+ | /boot/initrd-2.6.32-042stab81.8.img 2.6.32-042stab081.8 | ||
Notes: | Notes: | ||
* you have to add ext4 explicitly | * you have to add ext4 explicitly | ||
− | * in RHEL6 kernels USB modules | + | * in RHEL6 kernels some USB stuff (that used to be in ehci-hcd, ohci-hcd, uhci-hcd modules) is built-in |
== Reboot and enjoy == | == Reboot and enjoy == | ||
Line 137: | Line 124: | ||
/dev/sda2 ext3 496M 46M 425M 10% /boot | /dev/sda2 ext3 496M 46M 425M 10% /boot | ||
/dev/sdb1 ext4 1.8T 196M 1.7T 1% /vz | /dev/sdb1 ext4 1.8T 196M 1.7T 1% /vz | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == | ||
Line 150: | Line 131: | ||
== Acknowledgements == | == Acknowledgements == | ||
− | This article was originally written by [[ | + | This article was originally written by [[Denis Hohryakov]]. |
[[Category: HOWTO]] | [[Category: HOWTO]] |