Tuesday, February 3, 2009

rpmdb: Lock table is out of available locker entries

rpmdb: Lock table is out of available locker entries

If up2date throws some horrible Python errors and rpm says “rpmdb: Lock table is out of available locker entries”, you can restore your system to normality with the following:

The errors:
rpmdb: Lock table is out of available locker entries
error: db4 error(22) from db->close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm

Make a backup of /var/lib/rpm in case you break something:
tar cvzf rpmdb-backup.tar.gz /var/lib/rpm

Remove the Berkeley databases that rpm uses:
rm /var/lib/rpm/__db.00*

Make rpm rebuild the databases from scratch (may take a short while):
rpm --rebuilddb

Now, check rpm to make sure everything is okay:
rpm -qa | sort

Why does this happen?
When rpm accesses the Berkeley database files, it makes temporary locker entries within the tables while it searches for data. If you control-c your rpm processes often, this issue will occur much sooner because the locks are never cleared.

Saturday, January 24, 2009

Monday, January 12, 2009

Installing kernel-debuginfo on RHEL 5.2

#yum --enablerepo=rhel-debuginfo install kernel-debuginfo

Thursday, January 8, 2009

Finding Version of linux installed

#cat /etc/*release

Starting virtual server in a single user mode

From root domain:
#xm create {domain-name} -c
Example:- xm create rhel5b2-pv2 -c

-> follow the same steps to boot in single user mode as usual.

Tuesday, December 16, 2008

Displaying Total hard disk size (in Linux)

[root@test4 ~]# fdisk -l | grep Disk
Disk /dev/hda: 60.0 GB, 60022480896 bytes
Disk /dev/hdb: 200.0 GB, 200049647616 bytes