Red Hat Bugzilla – Bug 33849
db2 is not LFS capable
Last modified: 2013-07-02 18:54:19 EDT
On the Intel IA32 architecture, db2 uses normal open(), lseek(), ...
calls which renders it useless as a backend (e.g. for openldap) if database
files get larger than 2 GB. I have verified this with the version shipped
with Red Hat Linux 7 (2.4.14-4) as well as the one shipped with wolverine
(or qa0325 for that matter), 2.4.14-5.
The solution for this is quite simple, just build it like this:
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64" CPPFLAGS="-D_GNU_SOURCE -D_LARGEFILE_SOURCE
after applying the patch I'll attach immediately.
Created attachment 14105 [details]
Patch needed so that db2 uses open64()
There is a similar problem with mysql on both fisher and wolverine (both are intel architecture). Only with mysql the max files
size for a table appears to be 4GB.
The same issue is also with db3 (I wouldn't mind about db1 -- we compiled
it to use LFS, but it didn't work out), only that you don't need a patch but you
just have to set the macros accordingly.
Applied since db4-4.3.29-2.
The db-4.3.29-lfs.patch change applied to db-4.3.29 is not needed and does not
affect db behaviour.