LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-15-2011, 07:33 PM   #1
Earl3
LQ Newbie
 
Registered: Jun 2011
Posts: 3

Rep: Reputation: Disabled
zypper update makes /var/lib/rpm/Packages grow and grow and grow...


Each time I run "zypper update" on a SUSE 11.1 server it causes /var/lib/rpm/Packages to grow by a few KB even though there are no new updates. Since a cron runs this a couple of times a day the file is almost 400MB on one of my servers. I'd like to shrink the file back to a reasonable size before I run out of space on my /var partition, so I ran this:

# zypper clean --all
# rpmdb --rebuilddb

Any suggestions on how to shrink /var/lib/rpm/Packages?

... but that had no effect. Here's what it looks like at the moment when I run "zypper update: manually:

[00:26:36] # ls -al /var/lib/rpm/Packages
-rw-r--r-- 1 root root 391577600 2011-06-16 00:22 /var/lib/rpm/Packages

[00:26:46] # zypper update
Loading repository data...
Reading installed packages...
Nothing to do.

[00:27:23] # ls -al /var/lib/rpm/Packages
-rw-r--r-- 1 root root 391593984 2011-06-16 00:27 /var/lib/rpm/Packages

[00:27:28] # zypper update
Loading repository data...
Reading installed packages...
Nothing to do.

[00:29:28] # ls -al /var/lib/rpm/Packages
-rw-r--r-- 1 root root 391610368 2011-06-16 00:29 /var/lib/rpm/Packages
 
Old 06-16-2011, 12:16 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
If you really think that you have something funny going on, you can back up the files, then rebuild from scratch.

Have you tried to back up the /var/lib/rpm directory then

Code:
rpm --initdb
rpm --rebuilddb

If that fails, then this is a link to a more complex procedure.

http://www.informatimago.com/linux/rpm-rebuilddb.html
 
Old 06-27-2011, 11:29 AM   #3
Earl3
LQ Newbie
 
Registered: Jun 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
The problem appears to be affecting a number of different servers running OpenSUSE 11.1. I tried the same thing on an OpenSUSE 11.4 server and did not have the problem.

The problem is not causing any errors, just using an excessive amount of /var volume space, and the servers are scheduled to be upgraded to 11.4 (bare metal upgrade), so I think I'm going to leave this alone for now and let the upgrade solve the problem for me.

Thanks for the pointer to the detailed rebuild script. If zypper starts spewing errors I'll try that fix.
 
Old 06-27-2011, 02:07 PM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by Earl3 View Post
The problem is not causing any errors, just using an excessive amount of /var volume space, and the servers are scheduled to be upgraded to 11.4 (bare metal upgrade), so I think I'm going to leave this alone for now and let the upgrade solve the problem for me.
Probably a good idea.

Quote:
Originally Posted by Earl3 View Post
Thanks for the pointer to the detailed rebuild script. If zypper starts spewing errors I'll try that fix.
You're welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Growing (really grow) a raid1 (mdadm --grow) didiw Linux - Software 1 01-20-2011 05:39 PM
LXer: Sometimes We Grow Up LXer Syndicated Linux News 0 11-13-2010 12:30 AM
When I Grow Up ...... johnmc98683 LinuxQuestions.org Member Intro 1 10-30-2010 03:17 AM
LXer: Linux desktops grow and grow and grow LXer Syndicated Linux News 0 11-23-2007 01:00 PM
Huge log file grow since "yum update" on 29 April cubensys Fedora 1 05-21-2006 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration