Difference between revisions of "User talk:Denis Hohryakov"
m (Welcome!) |
|||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
You will probably want to read the [[Help:Contents|help pages]]. | You will probably want to read the [[Help:Contents|help pages]]. | ||
Again, welcome and have fun! [[User:Kir|Kir]] ([[User talk:Kir|talk]]) 15:31, 29 October 2013 (EDT) | Again, welcome and have fun! [[User:Kir|Kir]] ([[User talk:Kir|talk]]) 15:31, 29 October 2013 (EDT) | ||
+ | |||
+ | == HowTo Upgrade OVZ CentOS-5.x-based host-node from vzkernel-2.6.18(stab) to vzkernel-2.6.32(stab) and convert fs from ext3 to ext4 == | ||
+ | |||
+ | |||
+ | It is very simple. | ||
+ | |||
+ | 1. Update your system | ||
+ | |||
+ | 2. At /etc/yum.repos.d/openvz.repo do this changes. | ||
+ | |||
+ | [openvz-kernel-rhel6] | ||
+ | name=OpenVZ RHEL6-based stable kernels | ||
+ | #baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/ | ||
+ | mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32 | ||
+ | '''enabled=1''' | ||
+ | gpgcheck=1 | ||
+ | gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ | ||
+ | '''#exclude=vzkernel-firmware''' | ||
+ | |||
+ | [openvz-kernel-rhel5] | ||
+ | name=OpenVZ RHEL5-based kernel | ||
+ | #baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ | ||
+ | mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18 | ||
+ | '''enabled=0''' | ||
+ | gpgcheck=1 | ||
+ | gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ | ||
+ | |||
+ | |||
+ | 3. Install new 2.6.32 kernlel | ||
+ | |||
+ | # yum install vzkernel.x86_64 | ||
+ | |||
+ | 4. Check grub.conf | ||
+ | |||
+ | cat /boot/grub/grub.conf | ||
+ | |||
+ | # | ||
+ | # Hetzner Online AG - installimage | ||
+ | # GRUB bootloader configuration file | ||
+ | # | ||
+ | timeout 5 | ||
+ | default 0 | ||
+ | title OpenVZ (2.6.32-042stab081.5) | ||
+ | root (hd0,1) | ||
+ | kernel /vmlinuz-2.6.32-042stab081.5 ro root=/dev/sda3 vga=0x317 selinux=0 sysfs.deprecated=1 | ||
+ | initrd /initrd-2.6.32-042stab081.5.img | ||
+ | title OpenVZ (2.6.18-348.16.1.el5.028stab108.1) | ||
+ | root (hd0,1) | ||
+ | kernel /vmlinuz-2.6.18-348.16.1.el5.028stab108.1 ro root=/dev/sda3 vga=0x317 selinux=0 | ||
+ | initrd /initrd-2.6.18-348.16.1.el5.028stab108.1.img | ||
+ | |||
+ | If all are correct reboot to new kernel | ||
+ | |||
+ | 5. Time to convert FS. Boot node from live-CD or in Rescue system and perform the following steps | ||
+ | |||
+ | fsck.ext3 -f /dev/sda(x) | ||
+ | Turn on ext4 features | ||
+ | |||
+ | tune2fs -O extents,uninit_bg,dir_index /dev/sda(x) | ||
+ | Check new ext4 FS | ||
+ | |||
+ | fsck.ext4 -fD /dev/sda(x) | ||
+ | After that mount partition and edit /etc/fstab, then rebuild initrd image whith ext4 support. | ||
+ | NOTE! For 2.6.32 kernels no suitable modules ehci-hcd, ohci-hcd, uhci-hcd. You must specify it in rebuild! | ||
+ | |||
+ | mkinitrd -v -f --with=ext4 --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd initrd-2.6.32-042stab81.5.img 2.6.32-042stab081.5 | ||
+ | 6. Reboot to running kernel and enjoy new kernel and FS. | ||
+ | |||
+ | [root@CentOS-58-64-minimal ~]# cat /etc/issue | ||
+ | CentOS release 5.10 (Final) | ||
+ | Kernel \r on an \m | ||
+ | [root@CentOS-58-64-minimal ~]# uname -a | ||
+ | Linux CentOS-58-64-minimal 2.6.32-042stab081.5 #1 SMP Mon Sep 30 16:52:24 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux | ||
+ | [root@CentOS-58-64-minimal ~]# df -Th | ||
+ | Filesystem Type Size Used Avail Use% Mounted on | ||
+ | /dev/sda3 ext4 259G 1.5G 244G 1% / | ||
+ | tmpfs tmpfs 16G 0 16G 0% /dev/shm | ||
+ | /dev/sda2 ext3 496M 46M 425M 10% /boot | ||
+ | /dev/sdb1 ext4 1.8T 196M 1.7T 1% /vz | ||
+ | [root@CentOS-58-64-minimal ~]# |
Latest revision as of 21:25, 29 October 2013
Welcome to OpenVZ Linux Containers Wiki! We hope you will contribute much and well. You will probably want to read the help pages. Again, welcome and have fun! Kir (talk) 15:31, 29 October 2013 (EDT)
HowTo Upgrade OVZ CentOS-5.x-based host-node from vzkernel-2.6.18(stab) to vzkernel-2.6.32(stab) and convert fs from ext3 to ext4[edit]
It is very simple.
1. Update your system
2. At /etc/yum.repos.d/openvz.repo do this changes.
[openvz-kernel-rhel6] name=OpenVZ RHEL6-based stable kernels #baseurl=http://download.openvz.org/kernel/branches/rhel6-2.6.32/current/ mirrorlist=http://download.openvz.org/kernel/mirrors-rhel6-2.6.32 enabled=1 gpgcheck=1 gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ #exclude=vzkernel-firmware
[openvz-kernel-rhel5] name=OpenVZ RHEL5-based kernel #baseurl=http://download.openvz.org/kernel/branches/rhel5-2.6.18/current/ mirrorlist=http://download.openvz.org/kernel/mirrors-rhel5-2.6.18 enabled=0 gpgcheck=1 gpgkey=http://download.openvz.org/RPM-GPG-Key-OpenVZ
3. Install new 2.6.32 kernlel
# yum install vzkernel.x86_64
4. Check grub.conf
cat /boot/grub/grub.conf # # Hetzner Online AG - installimage # GRUB bootloader configuration file # timeout 5 default 0 title OpenVZ (2.6.32-042stab081.5) root (hd0,1) kernel /vmlinuz-2.6.32-042stab081.5 ro root=/dev/sda3 vga=0x317 selinux=0 sysfs.deprecated=1 initrd /initrd-2.6.32-042stab081.5.img title OpenVZ (2.6.18-348.16.1.el5.028stab108.1) root (hd0,1) kernel /vmlinuz-2.6.18-348.16.1.el5.028stab108.1 ro root=/dev/sda3 vga=0x317 selinux=0 initrd /initrd-2.6.18-348.16.1.el5.028stab108.1.img
If all are correct reboot to new kernel
5. Time to convert FS. Boot node from live-CD or in Rescue system and perform the following steps
fsck.ext3 -f /dev/sda(x)
Turn on ext4 features
tune2fs -O extents,uninit_bg,dir_index /dev/sda(x)
Check new ext4 FS
fsck.ext4 -fD /dev/sda(x)
After that mount partition and edit /etc/fstab, then rebuild initrd image whith ext4 support. NOTE! For 2.6.32 kernels no suitable modules ehci-hcd, ohci-hcd, uhci-hcd. You must specify it in rebuild!
mkinitrd -v -f --with=ext4 --builtin=ehci-hcd --builtin=ohci-hcd --builtin=uhci-hcd initrd-2.6.32-042stab81.5.img 2.6.32-042stab081.5
6. Reboot to running kernel and enjoy new kernel and FS.
[root@CentOS-58-64-minimal ~]# cat /etc/issue CentOS release 5.10 (Final) Kernel \r on an \m [root@CentOS-58-64-minimal ~]# uname -a Linux CentOS-58-64-minimal 2.6.32-042stab081.5 #1 SMP Mon Sep 30 16:52:24 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux [root@CentOS-58-64-minimal ~]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/sda3 ext4 259G 1.5G 244G 1% / tmpfs tmpfs 16G 0 16G 0% /dev/shm /dev/sda2 ext3 496M 46M 425M 10% /boot /dev/sdb1 ext4 1.8T 196M 1.7T 1% /vz [root@CentOS-58-64-minimal ~]#