[Rpm-maint] Re: RPM database on NFS root
Panu Matilainen
pmatilai at redhat.com
Mon Aug 6 09:52:40 UTC 2007
On Sun, 5 Aug 2007, Axel Thimm wrote:
> Hi,
>
> On Sat, Jul 21, 2007 at 07:24:36AM +0000, Panu Matilainen wrote:
>> On Fri, 20 Jul 2007, Mark Hatle wrote:
>>
>>> Jeremy Sanders wrote:
>>>> Are there any plans to be able to host an RPM database over NFS? See
>>>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=141614
>>>
>>> In my experience (due to NFS locking), it's not possible to do an RPM
>>> database over NFS. However you do have some options.
>>>
>>>> For our manchines which use remote root over nfs, we use an ext3 filesystem
>>>> mounted over gnbd network block devices to place the rpm database, which
>>>> appears to work (except gnbd is missing from Fedora...) It would be nice
>>>> not to have to do this.
>>>
>>> You can either use sqlite (which is probably a bit slower, and I'm not
>>> sure if it's still available in the rpm-maint 4.4.2.X branch. It _WAS_
>>> in stock 4.4.2 and the rpm5.org's tree.) If you go down the route of
>>> the sqlite database, it's still only key/value pair driven, and is much
>>> slower the the berkleyDB interface. You may also STILL encounter
>>> locking issues w/ sqlite (but in practice I never encountered them...)
>>
>> Sqlite is available in rpm.org tree as well, no intention to remove it.
>
> Is the conversion to sqlite painful, and if not how does one go about
> it? Would it also work on RHEL3,4,5? Is there anyone really running
> any RHEL with sqlite rpmdbs or would I become a guinea pig ;)?
This should give you the idea:
[pmatilai at turre tmp]$ cp -a /var/lib/rpm/ /tmp/rpmdb-sqlite
[pmatilai at turre tmp]$ rm -f /tmp/rpmdb-sqlite/__db.00*
[pmatilai at turre tmp]$ rpm -v --rebuilddbapi 4 --dbpath /tmp/rpmdb-sqlite/
--rebuilddb
[pmatilai at turre tmp]$ file rpmdb-sqlite/Packages
rpmdb-sqlite/Packages: SQLite 3.x database
[pmatilai at turre tmp]$ rpm --dbapi 4 --dbpath /tmp/rpmdb-sqlite/ -qa|wc -l
1460
So, it works at least to the point of conversion and queries. I personally
haven't tested it any further and dunno if people are actually using the
sqlite db so .. proceed with caution :)
>>> Or you can use RPC for the berkley DB interface. I don't have details
>>> on this, but this will use a more reliable network interface to go back
>>> to the host for the RPM database access. This is probably be more
>>> reliable then sqlite.
>>
>> Probably the best available documentation on the subject is here:
>> https://www.redhat.com/archives/rpm-list/2003-May/msg00383.html
>
> Ouch! I don't want a say solaris server having to run rpmdb_svc ... :/
Heh :)
> I think the safest/easiest way to deal with rpmdb over NFS is to pull
> a copy onto a local filesystem before querying.
...and also the fastest way I'd guess.
- Panu -
More information about the Rpm-maint
mailing list