OpenVZ Forum


Home » General » Support » yum install vzkernel (how to keep more older versions before deletion?)
yum install vzkernel [message #44094] Wed, 16 November 2011 05:42 Go to next message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
When I run "yum install vzkernel" yum offers to delete the second-oldest version. Very practical, but I'd like to keep a few older versions than just one. How do I do that? I don't see anything in openvz.repo that would do that.

Quote:

# yum install vzkernel
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vzkernel.x86_64 0:2.6.32-042stab042.1 will be installed
--> Finished Dependency Resolution
--> Running transaction check
---> Package vzkernel.x86_64 0:2.6.32-042stab037.1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

============================================================ ========================================
Package Arch Version Repository Size
============================================================ ========================================
Installing:
vzkernel x86_64 2.6.32-042stab042.1 openvz-kernel-rhel6-testing 25 M
Removing:
vzkernel x86_64 2.6.32-042stab037.1 @openvz-kernel-rhel6 110 M

Transaction Summary
============================================================ ========================================
Install 1 Package(s)
Remove 1 Package(s)

Total download size: 25 M
Is this ok [y/N]:
Exiting on user Command
Complete!

Re: yum install vzkernel [message #44096 is a reply to message #44094] Wed, 16 November 2011 07:47 Go to previous messageGo to next message
azagzin is currently offline  azagzin
Messages: 38
Registered: May 2008
Location: Vilnius
Member
"man yum" will help you
Re: yum install vzkernel [message #44100 is a reply to message #44096] Wed, 16 November 2011 11:01 Go to previous messageGo to next message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
Yeah thanks. I obviously tried that already. Can you be a little more specific. What am I looking for?
Re: yum install vzkernel [message #44101 is a reply to message #44100] Wed, 16 November 2011 11:43 Go to previous messageGo to next message
azagzin is currently offline  azagzin
Messages: 38
Registered: May 2008
Location: Vilnius
Member
try to use yum update when you want to save your previous kernel.
yum install kernel, will always delete oldest one.
Re: yum install vzkernel [message #44108 is a reply to message #44094] Thu, 17 November 2011 03:19 Go to previous messageGo to next message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
Thanks, but that makes no difference:

Quote:

# yum update vzkernel
Loaded plugins: presto
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package vzkernel.x86_64 0:2.6.32-042stab039.11 will be installed
--> Finished Dependency Resolution
--> Running transaction check
---> Package vzkernel.x86_64 0:2.6.32-042stab037.1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

============================================================ ========================================
Package Arch Version Repository Size
============================================================ ========================================
Installing:
vzkernel x86_64 2.6.32-042stab039.11 openvz-kernel-rhel6 25 M
Removing:
vzkernel x86_64 2.6.32-042stab037.1 @openvz-kernel-rhel6/6 110 M

Transaction Summary
============================================================ ========================================
Install 1 Package(s)
Remove 1 Package(s)

Total download size: 25 M
Is this ok [y/N]:
Exiting on user Command
Complete!

[Updated on: Thu, 17 November 2011 11:39]

Report message to a moderator

Re: yum install vzkernel [message #44129 is a reply to message #44108] Fri, 18 November 2011 17:53 Go to previous messageGo to next message
azagzin is currently offline  azagzin
Messages: 38
Registered: May 2008
Location: Vilnius
Member
try to run only yum update, without kernel or vzkernel
Re: yum install vzkernel [message #44132 is a reply to message #44094] Fri, 18 November 2011 23:46 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
The first thing to do when searching for general answers like this is to open Google (or whatever you use), enter 'keep more than 3 kernels' and follow some of the top hits.

But really, using yum update, install or whatever, won't make any difference without additional settings so it's probably time to put the correct answer here - what you're looking for is 'installonly_limit' in "/etc/yum.conf".
Re: yum install vzkernel [message #44133 is a reply to message #44132] Sat, 19 November 2011 04:28 Go to previous messageGo to next message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
Thank you, finally a straight answer.

Turns out installonly_limit is already set in yum.conf to 3, but not active until installonlypkgs is set to vzkernel*.

PS. What makes you think I didn't try Google? I didn't find the answer which is why I asked here.

[Updated on: Sat, 19 November 2011 05:22]

Report message to a moderator

Re: yum install vzkernel [message #44136 is a reply to message #44094] Sat, 19 November 2011 16:45 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
That's odd, I get 3 of both kernel and vzkernel packages, without any additional settings. The oldest one gets uninstalled when a new one appears, unless it's active at the moment.

I'm assuming that changing installonly_limit to 5 would get me a 5 of each, kernel and vzkernel but I didn't do that for a long time.

BTW, a setting in "/etc/sysconfig/kernel" should tell yum to always keep vzkernel as default in grub.conf. I still check before every restart (old habits...), but it's handy.
Re: yum install vzkernel [message #44138 is a reply to message #44094] Sun, 20 November 2011 07:14 Go to previous message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
I'd like to warn anyone not to try this.

I added following to /etc/yum.conf:

installonlypkgs=vzkernel*
installonly_limit=5
exclude=kernel*

Then ran yum update:

Quote:


]# yum update
openvz-kernel-rhel6 | 951 B 00:00
openvz-utils | 1.2 kB 00:00
sl | 3.2 kB 00:00
sl-security | 1.9 kB 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package bind-libs.x86_64 32:9.7.3-2.el6_1.P3.2 will be updated
---> Package bind-libs.x86_64 32:9.7.3-2.el6_1.P3.3 will be an update
---> Package bind-utils.x86_64 32:9.7.3-2.el6_1.P3.2 will be updated
---> Package bind-utils.x86_64 32:9.7.3-2.el6_1.P3.3 will be an update
---> Package kernel-firmware.noarch 0:2.6.32-131.17.1.el6 will be obsoleted
---> Package nspr.x86_64 0:4.8.7-1.el6 will be updated
---> Package nspr.x86_64 0:4.8.8-1.el6_1 will be an update
---> Package nss.x86_64 0:3.12.9-12.el6_1 will be updated
---> Package nss.x86_64 0:3.12.10-2.el6_1 will be an update
---> Package nss-sysinit.x86_64 0:3.12.9-12.el6_1 will be updated
---> Package nss-sysinit.x86_64 0:3.12.10-2.el6_1 will be an update
---> Package nss-util.x86_64 0:3.12.9-1.el6 will be updated
---> Package nss-util.x86_64 0:3.12.10-1.el6_1 will be an update
---> Package vzkernel.x86_64 0:2.6.32-042stab037.1 will be updated
---> Package vzkernel.x86_64 0:2.6.32-042stab039.3 will be updated
---> Package vzkernel.x86_64 0:2.6.32-042stab039.10 will be updated
---> Package vzkernel.x86_64 0:2.6.32-042stab039.11 will be an update
---> Package vzkernel-firmware.noarch 0:2.6.32-042stab039.11 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

============================================================ ========================================
Package Arch Version Repository Size
============================================================ ========================================
Installing:
vzkernel-firmware noarch 2.6.32-042stab039.11 openvz-kernel-rhel6 2.9 M
replacing kernel-firmware.noarch 2.6.32-131.17.1.el6
Updating:
bind-libs x86_64 32:9.7.3-2.el6_1.P3.3 sl-security 838 k
bind-utils x86_64 32:9.7.3-2.el6_1.P3.3 sl-security 176 k
nspr x86_64 4.8.8-1.el6_1 sl-security 109 k
nss x86_64 3.12.10-2.el6_1 sl-security 773 k
nss-sysinit x86_64 3.12.10-2.el6_1 sl-security 27 k
nss-util x86_64 3.12.10-1.el6_1 sl-security 45 k
vzkernel x86_64 2.6.32-042stab039.11 openvz-kernel-rhel6 25 M

Transaction Summary
============================================================ ========================================
Install 1 Package(s)
Upgrade 7 Package(s)

Total download size: 30 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): bind-libs-9.7.3-2.el6_1.P3.3.x86_64.rpm | 838 kB 00:00
(2/8): bind-utils-9.7.3-2.el6_1.P3.3.x86_64.rpm | 176 kB 00:00
(3/8): nspr-4.8.8-1.el6_1.x86_64.rpm | 109 kB 00:00
(4/8): nss-3.12.10-2.el6_1.x86_64.rpm | 773 kB 00:00
(5/8): nss-sysinit-3.12.10-2.el6_1.x86_64.rpm | 27 kB 00:00
(6/8): nss-util-3.12.10-1.el6_1.x86_64.rpm | 45 kB 00:00
(7/8): vzkernel-2.6.32-042stab039.11.x86_64.rpm | 25 MB 00:03
(8/8): vzkernel-firmware-2.6.32-042stab039.11.noarch.rpm | 2.9 MB 00:00
------------------------------------------------------------ ----------------------------------------
Total 6.3 MB/s | 30 MB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : nspr-4.8.8-1.el6_1.x86_64 1/18
Updating : nss-util-3.12.10-1.el6_1.x86_64 2/18
Updating : nss-sysinit-3.12.10-2.el6_1.x86_64 3/18
Updating : nss-3.12.10-2.el6_1.x86_64 4/18
Installing : vzkernel-firmware-2.6.32-042stab039.11.noarch 5/18
Updating : 32:bind-libs-9.7.3-2.el6_1.P3.3.x86_64 6/18
Updating : 32:bind-utils-9.7.3-2.el6_1.P3.3.x86_64 7/18
Updating : vzkernel-2.6.32-042stab039.11.x86_64 8/18
Cleanup : vzkernel.x86_64 9/18
Non-fatal POSTUN scriptlet failure in rpm package vzkernel
Cleanup : vzkernel.x86_64 10/18
warning: %postun(vzkernel-2.6.32-042stab039.10.x86_64) scriptlet failed, exit status 1
Cleanup : vzkernel.x86_64 11/18
Non-fatal POSTUN scriptlet failure in rpm package vzkernel
Cleanup : nss-3.12.9-12.el6_1.x86_64 12/18
warning: %postun(vzkernel-2.6.32-042stab039.3.x86_64) scriptlet failed, exit status 1
Cleanup : nss-sysinit-3.12.9-12.el6_1.x86_64 13/18
Cleanup : nss-util-3.12.9-1.el6.x86_64 14/18
Cleanup : 32:bind-utils-9.7.3-2.el6_1.P3.2.x86_64 15/18
Erasing : kernel-firmware-2.6.32-131.17.1.el6.noarch 16/18
Cleanup : 32:bind-libs-9.7.3-2.el6_1.P3.2.x86_64 17/18
Cleanup : nspr-4.8.7-1.el6.x86_64 18/18

Installed:
vzkernel-firmware.noarch 0:2.6.32-042stab039.11

Updated:
bind-libs.x86_64 32:9.7.3-2.el6_1.P3.3 bind-utils.x86_64 32:9.7.3-2.el6_1.P3.3
nspr.x86_64 0:4.8.8-1.el6_1 nss.x86_64 0:3.12.10-2.el6_1
nss-sysinit.x86_64 0:3.12.10-2.el6_1 nss-util.x86_64 0:3.12.10-1.el6_1
vzkernel.x86_64 0:2.6.32-042stab039.11

Replaced:
kernel-firmware.noarch 0:2.6.32-131.17.1.el6

Complete!


But when all is said and done all but the latest kernel rpm was removed.

Quote:

# rpm -qa | grep kernel
vzkernel-2.6.32-042stab039.11.x86_64
dracut-kernel-004-53.el6.noarch
vzkernel-firmware-2.6.32-042stab039.11.noarch
kernel-2.6.32-131.17.1.el6.x86_64


I had to manually force-install the previous kernel rpms to at least have one backup in case of a problem after rebooting.

Quote:


# wget http://download.openvz.org/kernel/branches/rhel6-2.6.32/042s tab039.10/vzkernel-2.6.32-042stab039.10.x86_64.rpm
--2011-11-20 07:07:01-- http://download.openvz.org/kernel/branches/rhel6-2.6.32/042s tab039.10/vzkernel-2.6.32-042stab039.10.x86_64.rpm
Resolving download.openvz.org... 64.131.90.11
Connecting to download.openvz.org|64.131.90.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26424091 (25M) [application/x-rpm]
Saving to: âvzkernel-2.6.32-042stab039.10.x86_64.rpmâ

100%[======================================================= === >] 26,424,091 9.75M/s in 2.6s

2011-11-20 07:07:04 (9.75 MB/s) - âvzkernel-2.6.32-042stab039.10.x86_64.rpmâ

# wget http://download.openvz.org/kernel/branches/rhel6-2.6.32/042s tab039.10/vzkernel-firmware-2.6.32-042stab039.10.noarch.rpm
--2011-11-20 07:07:13-- http://download.openvz.org/kernel/branches/rhel6-2.6.32/042s tab039.10/vzkernel-firmware-2.6.32-042stab039.10.noarch.rpm
Resolving download.openvz.org... 64.131.90.11
Connecting to download.openvz.org|64.131.90.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3082298 (2.9M) [application/x-rpm]
Saving to: âvzkernel-firmware-2.6.32-042stab039.10.noarch.rpmâ

100%[======================================================= === >] 3,082,298 4.51M/s in 0.7s

2011-11-20 07:07:14 (4.51 MB/s) - âvzkernel-firmware-2.6.32-042stab039.10.noarch.rpmâ

# rpm -ivh vzkernel* --force
Preparing... ########################################### [100%]
1:vzkernel-firmware ########################################### [ 50%]
2:vzkernel ########################################### [100%]
[root@server15 ~]# rpm -qa | grep kernel
vzkernel-2.6.32-042stab039.11.x86_64
vzkernel-2.6.32-042stab039.10.x86_64
dracut-kernel-004-53.el6.noarch
vzkernel-firmware-2.6.32-042stab039.11.noarch
vzkernel-firmware-2.6.32-042stab039.10.noarch
kernel-2.6.32-131.17.1.el6.x86_64

...

[Updated on: Sun, 20 November 2011 07:15]

Report message to a moderator

Previous Topic: Centos6 and OpenVZ memory problems
Next Topic: kernel warning/error message when booting the openvz kernel
Goto Forum:
  


Current Time: Fri Nov 08 21:06:40 GMT 2024

Total time taken to generate the page: 0.03281 seconds