ABHIONLINUX
Site useful for linux administration and web hosting

2011/03/23

Yum update failed.


Yum update failed.
===================================
"-bash-3.1# yum update
Loading “installonlyn” plugin
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.main(sys.argv[1:])
File “/usr/share/yum-cli/yummain.py”, line 82, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 206, in getOptionsConfig
errorlevel=opts.errorlevel)
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 132, in
doConfigSetup
self.conf = config.readMainConfig(startupconf)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 598, in
readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 661, in
_getsysver
idx = ts.dbMatch(‘provides’, distroverpkg)
TypeError: rpmdb open failed"
==========================


If you are getting this error, you need to clear the database.

Yum clean all
rm -f /var/lib/rpm/_db*
rpm -rebuilddb
yum update

If this doesnt fix your issue, try the following steps also.

rm /dev/urandom
mknod -m 644 /dev/urandom c 1 9
yum clean all.


This should fix your issue.

2011/03/21

Command to check the performance of the hard disk.


Command to check the performance of the hard disk.

You can use the command given below to check the hard disk performance.

hdparm /dev/sda

/dev/sda:
 multcount     = 16 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 19457/255/63, sectors = 312581808, start = 0


You can replace /dev/sda with the name of your disk device.