Red Hat Bugzilla – Bug 433669
yum fails installing packages on an NFS root system with Input/Output error
Last modified: 2014-01-21 18:02:05 EST
Jochen Roth <firstname.lastname@example.org> - 2008-02-20 05:24 EDT
yum fails to install, search, update, .. packages on an NFS root file system
(diskless Cell based system).
Removing the __db.00* files in /var/lib/rpm/ works as a workaround.
Running the command three times in a row may sometimes also help.
This bug may happen because the NFS root filesystem is running over the udp
protocol. Unfortunately we are not able to mount the NFS root file system with
tcp because of some other problems in the mkinitrd package (check links bellow).
[root@localhost ~]# yum search libstdc++
rpmdb: mmap: Input/output error
error: db4 error(5) from dbenv->open: Input/output error
error: cannot open Packages index using db3 - Input/output error (5)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
File "/usr/share/yum-cli/yummain.py", line 85, in main
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 162, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.5/site-packages/yum/config.py", line 640, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot,
File "/usr/lib/python2.5/site-packages/yum/config.py", line 707, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
------- Comment From email@example.com 2008-02-20 14:35 EDT-------
Running "rpmdb --rebuilddb" is also a workaround, but after yum is used a few
times (if not once), this bug will be reached again. So, the process of removing
the dbs has to be redone.
We did not see this issue on machines with disks.
There are known performance problems with NFS over UDP in fast networks, which
we think might be related to this issue. But, we are unable to use TCP. The bug
number for this is:
This is to be expected really, Berkeley DB and NFS don't really go together well
If rpmdb on NFS is a must, you can either try the alternative sqlite rpmdb
backend or try configuring BDB to survive with NFS:
Some info on the sqlite backend available here:
BDB over NFS should be possible too by disabling the shared memory db
environment of BDB (private / fcntl based locks, see the %_dbi* configuration
bits in /usr/lib/rpm/macros), but that has other consequences like disabling
concurrent rpmdb access which IIRC some packages in Fedora rely on. See
http://www.wideopen.com/archives/rpm-list/2003-November/msg00053.html for a
"success story" and more detailed information.
------- Comment From firstname.lastname@example.org 2008-02-28 09:38 EDT-------
Thanks Panu for all the info.