AIX & Large File Support Problem (+ Solution)
Eric M. Johnston
emj at postal.net
Thu Sep 5 18:15:01 EST 2002
Would that really change the behavior of mkstemp()? My problem was not the
ability to have or manipulate large files; in fact, I could use rsync to
pull them off of the AIX machine onto a Solaris machine. In other words, I
concluded from my experiments that rsync worked just fine on large files in
the instances where it didn't have to create a temporary file >2GB.
That said, I have no idea if the filesystems were created with bf=true. (Is
there some way to figure that out?)
Thanks,
Eric
P.S. After poking around some more, I found that there are implementations
of mkstemp64() for glibc and Solaris, but none that I can find for AIX.
Sriram Ramkrishna wrote:
>
> Alternatively, you can re-create your filesystem on mkfs with the big
> file option turned on. (ie -a bf=true) and that should help also.
> We frequently have large files over 2G.
>
> sri
>
> On Wed, Sep 04, 2002 at 08:27:03PM -0700, Eric M. Johnston wrote:
> > Hi,
> >
> > I just wanted to relate the solution to a problem I was having to hopefully
> > save someone else a day of frustration. I'm using rsync-2.5.5 on AIX 4.3,
> > compiled with gcc 2.95.3. The file I was sync'ing was very large (>2GB).
> > Despite being configured with --enable-largefiles (which #defines
> > _LARGE_FILES properly for AIX), and despite the fact that the initial
> > transfer of said file worked fine, I would always get the following error
> > when trying to sync up the file:
> >
> > write failed on myfile.txt.3 : Error 0
> > rsync error: error in file IO (code 11) at receiver.c(272)
> > rsync: connection unexpectedly closed (48 bytes read so far)
> > rsync error: error in rsync protocol data stream (code 12) at io.c(150)
> >
> > This would always happen when rsync had transferred >2GB. It seems that
> > AIX's write() doesn't like to set errno until the second time you try to
> > call write(). So, after adding in an additional call to write(), I saw the
> > following:
> >
> > write failed on myfile.txt.3 : File too large
> > rsync error: error in file IO (code 11) at receiver.c(272)
> > rsync: connection unexpectedly closed (48 bytes read so far)
> > rsync error: error in rsync protocol data stream (code 12) at io.c(150)
> >
> > After verifying ulimit wasn't the problem, adding a variety of rprintf()'s,
> > searching the Web in vain, writing a test program, etc., I finally figured
> > it out: mkstemp() on AIX 4.3 doesn't appear to support large files. Since
> > the call to mkstemp() replaces a call to open(), rsync would fail when the
> > temporary file it creates for the transfer exceeds 2GB.
> >
> > My solution to this problem was to simply #undef HAVE_SECURE_MKSTEMP in the
> > config.h created for AIX. rsync is much happier with this. It seems bad to
> > me that AIX's mkstemp() exhibits this behavior; perhaps someone who knows
> > how to report such a problem would tell IBM?
> >
> > Eric
> > --
> > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
> --
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
More information about the rsync
mailing list