Original Question:
> I have a DBM file of information on our employees which resides on a HP
> system running HP-UX 10. I would like to NFS mount the file to an
> AlphaServer 1000 running DU 4.0B and read it there. However, when I try
> this I cannot get it to work. The same program which can read the file on
> the HP will not read it on the AlphaServer (dbm_fetch returns NULL). Can
> this be done? Or am I going to have to make a DBM file on the AlphaServer
> also?
Thanks to all who replied:
Michael Smith
Steven W. Orr
Robert L. McMillin
Dr. Tom Blinn
Jude T. Cruz
Eric Z. Ayers
Tim Mooney
and suggested:
>
>The problem proabaly has to do with locking. Maybe your HP or alpha isn't
>configured for locks over NFS (try nfssetup on DU, or look in rc.config
>to enable it)
>
>In case you didn't know already, locking over NFS is painfully slow and
>full of gotchas. (many programs that work reliably on a local file
>system will not work correctly when run on an nfs file system). You can
>expect about 1% of the performance you might have gotten over a disk
>file if you have any contention on the file.
>
> DBM files might
>be architecture specific (more precisely, endian-specific). This would mean
>reading a big-endian created file from a little-endian machine wouldn't
>work.
>
>There are currently three different dbm interfaces. I'm not sure whether
>the files produced by all three are equal. The three are dbm (vanilla),
>gdbm (from GNU FSF), and ndbm which is not available on all systems. I
>know that the functional difference between {g,}dbm and ndbm is that ndbm
>allows the accessing program to have multiple files open at a time. The
>point is that a perl program can access a dbm file and might give you a
>quicker way to resolve experiments. Good luck.
>
> you probably want to use gdbm to at least give the files a chance
>of being consistent across the machines. Second, you might want to
>check into whether the dbm file format is itself byte-order dependent.
>(Is HP PA big- or little-endian?)
>
>
>There are two possibilities. One is that the dbm implementation on Digital
>UNIX is somehow incompatible with that on HP. That's possible, but it seems
>unlikely. The more likely problem is that although Digital's Alpha systems
>are "little end" machines like Intel x86 processors (and like VAX systems
>and PDP-11 systems were before them), that the HP-UX systems are "big end"
>like IBM mainframes or Sun SPARC systems.
>
>Unless the dbm software somehow KNEW that the database it was reading was in
>the opposite endian representation and corrected for it, there's no way it
>would be likely to be able to operate correctly.
>
>I'm not certain that the HP systems are big-endian, but that's what I think
>they are, and that would explain why the NFS mount isn't working; if there
>is a mix of binary and text data in the database (as I believe is the case)
>then you can't just read it as a byte stream, stuff it into memory, and get
>the right results when you try to interpret stuff that's supposed to be the
>binary fields.
>
>So you are probably going to either have to implement a server on the HP
>systems to provide application level access (should not be really hard to do
>if you think about it a bit), or replicate the database (which you probably
>would have to do with a unload/reload kind of copying).
>
>
>What you may want to look at is converting your dbm files to using Berkeley
>DB, which is binary compatible across various platforms. There are a lot
>of other good reasons to use Berkeley DB too, above and beyond the binary
>compatibility. An old version of it is even shipped as a standard part of
>Digital Unix 4.x.
>
>If you have a recent version of `perl' installed on your machine, take a
>look at the man page for `AnyDBM_File', which is part of Perl's man page
>library (it's probably in /usr/local/lib/perl5/man/man3, if you have it).
>That man page has a nice comparison of the various DB formats.
>
The problem in my case seemed to be that I was working with different
endian machines. I am looking at using Berkeley DB. But right now I have
other problems to deal with. The AlphaServer seems to have a hardware
problem. I won't mount my users_domain and is logging disk errors.
Digital is looking at it right now.
Ellen Davis
Received on Thu May 22 1997 - 22:23:28 NZST