Bug 433669 - yum fails installing packages on an NFS root system with Input/Output error
yum fails installing packages on an NFS root system with Input/Output error
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
8
other All
low Severity high
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
ARRAY(0x8bcb70)
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-20 14:24 EST by IBM Bug Proxy
Modified: 2014-01-21 18:02 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-25 07:34:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 42537 None None None Never

  None (edit)
Description IBM Bug Proxy 2008-02-20 14:24:37 EST
=Comment: #0=================================================
Jochen Roth <jroth@de.ibm.com> - 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>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
    disabled_plugins=opts.disableplugins)
  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,
startupconf.distroverpkg)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 707, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
Comment 1 IBM Bug Proxy 2008-02-20 14:40:36 EST
------- Comment From joseferr@br.ibm.com 2008-02-20 14:35 EDT-------
Red Hat,

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:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=433665
Comment 2 Panu Matilainen 2008-02-25 07:34:58 EST
This is to be expected really, Berkeley DB and NFS don't really go together well
at all:
http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/remote.html

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: 
http://www.mail-archive.com/rpm-maint@lists.rpm.org/msg00392.html

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 3 IBM Bug Proxy 2008-02-28 09:40:35 EST
------- Comment From joseferr@br.ibm.com 2008-02-28 09:38 EDT-------
Thanks Panu for all the info.

Note You need to log in before you can comment on or make changes to this bug.