Writing files larger than 2GB from AIX to Solaris

Writing files larger than 2GB from AIX to Solaris

Post by Griff Mill » Sun, 05 Jul 1998 04:00:00



We have a Solaris 2.6 NFS server, and some AIX 4.2 clients. The problem
is that we cannot write files to NFS-mounted filesystems larger than
2GB. Here is an excerpt from an email I got on the subject by one of
our programmers:

   I ran several tests yesterday trying to write a file over 2 GB from
   an SP2 system running AIX 4.2 to an NFS mounted disk on a Solaris
   2.6 server.  (I used a stand alone utility to do this to make life
   simpler.) The tests failed.  I opened the file using the following
   code segment

      ofd = open(fid_out, O_WRONLY | O_CREAT | O_LARGEFILE, 0777);

   and I used llseek() to set the file offset and write() to write as
   follows:

      llseek(ofd, soff, SEEK_SET);
      write(ofd, buf, bsz);

   I am not sure what to tell you.  I have used the same program to
   write files over 2GB from an AIX client to an AIX server using NFS;
   I have done the same from solaris client to solaris server using NFS
   (except that I did NOT use the O_LARGEFILE flag).  This is a
   question for the folks at IBM (I will pass this along to them as
   well).  I just spoke to one of our IBM representives and he
   suggested the possibility that AIX goes into a conservative mode of
   operation (i.e., using only the lowest common denominator so as to
   be safe) when it tries to talk to a non-AIX NFS server.

Does anyone have any ideas as to what the problem (and possible
solution or workaround) might be?

Thanks in advance. Email cc's appreciated.

--
Griff Miller II
Senior Unix/NT Sysadmin
PGS Tensor                "Never anthropomorphize computers; they hate that."

 
 
 

Writing files larger than 2GB from AIX to Solaris

Post by Casper H.S. Dik - Network Security Engine » Tue, 07 Jul 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>   I ran several tests yesterday trying to write a file over 2 GB from
>   an SP2 system running AIX 4.2 to an NFS mounted disk on a Solaris
>   2.6 server.  (I used a stand alone utility to do this to make life
>   simpler.) The tests failed.  I opened the file using the following
>   code segment
>   I am not sure what to tell you.  I have used the same program to
>   write files over 2GB from an AIX client to an AIX server using NFS;
>   I have done the same from solaris client to solaris server using NFS
>   (except that I did NOT use the O_LARGEFILE flag).  This is a
>   question for the folks at IBM (I will pass this along to them as
>   well).  I just spoke to one of our IBM representives and he
>   suggested the possibility that AIX goes into a conservative mode of
>   operation (i.e., using only the lowest common denominator so as to
>   be safe) when it tries to talk to a non-AIX NFS server.

The first thing to check is whether you've mounted the
filesystem using NFS V3 and not v2; large files won't work over
NFS V2.

If AIX is "conservative" when talking to non AIX systems, it's just
plain broken.  NFS V3 was specifically designed to handle large
files; NFS V3 servers are all newly written and are likely written
with that in mind, i.e., if he V3 server doesn't support large files
(like Solaris 2.5/2.5.1) it will fail with an error as it should.

(And if it doesn't, you could always downgrade the mount to V2
rather than crippling your own V3 client code)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Writing files larger than 2GB from AIX to Solaris

Post by SenorVenusia » Thu, 09 Jul 1998 04:00:00


Dear Griff,

In a old issue of SysAdmin I came across a topic that may relate to the
behavior you are seeing when mounting foreign filesystems. Casper's
reponse gives some possible insight but in Doug Morris's article he
discusses other potential problems with NFS mounting foreign filesystems.

Briefly he comments on common problems:

POSIX chown-restricted/unrestricted behavior
Sparse files
Program misunderstandings
Buffer-sizes
Path/filename length limits
Other sysconf/pathconf limits

Good luck,

Sincerely,

Thomas

 
 
 

Writing files larger than 2GB from AIX to Solaris

Post by Kevin Ge » Tue, 14 Jul 1998 04:00:00



> We have a Solaris 2.6 NFS server, and some AIX 4.2 clients. The problem
> is that we cannot write files to NFS-mounted filesystems larger than
> 2GB. Here is an excerpt from an email I got on the subject by one of
> our programmers:

>    I ran several tests yesterday trying to write a file over 2 GB from
>    an SP2 system running AIX 4.2 to an NFS mounted disk on a Solaris
>    2.6 server.  (I used a stand alone utility to do this to make life
>    simpler.) The tests failed.  I opened the file using the following
>    code segment

>       ofd = open(fid_out, O_WRONLY | O_CREAT | O_LARGEFILE, 0777);

>    and I used llseek() to set the file offset and write() to write as
>    follows:

>       llseek(ofd, soff, SEEK_SET);
>       write(ofd, buf, bsz);

>    I am not sure what to tell you.  I have used the same program to
>    write files over 2GB from an AIX client to an AIX server using NFS;
>    I have done the same from solaris client to solaris server using NFS
>    (except that I did NOT use the O_LARGEFILE flag).  This is a
>    question for the folks at IBM (I will pass this along to them as
>    well).  I just spoke to one of our IBM representives and he
>    suggested the possibility that AIX goes into a conservative mode of
>    operation (i.e., using only the lowest common denominator so as to
>    be safe) when it tries to talk to a non-AIX NFS server.

> Does anyone have any ideas as to what the problem (and possible
> solution or workaround) might be?

I THINK that you have to be using NFS version 3 to have large file
support; and I think that NFSV3 is only included in AIX 4.2.1 -- if
you're at AIX 4.2.0, this may be the cause.

--
Kevin Gee


IBM and UTA are not responsible for my opinions.

 
 
 

1. Problems taring up files larger than 2GB on Solaris 8

Hi,

I wonder if anyone can help?

We are running vertias volume manager 3.5 on a solaris 8 sun V880 box.

I am trying to tar up large amounts of data under volume manager
partitions (not veritas file system).  When the tar (this is using GNU
tar) gets to about 2 GB it bombs out with the following error:

/usr/local/bin/tar: Cannot write to
/data/archive/28_05_03/ver_data_images.tar:
File too large
/usr/local/bin/tar: Error is not recoverable: exiting now

Similar errors are produced with just the normal solaris tar.

I have heard people talk "Is your file system flagged largefile", how
do you check this and how do you change it if, it isn't set for large
files.

thanks

Chris

2. cannot install X-window?

3. writing to tape larger than 2Gb

4. Trouble setting up modem. Cannot connect to net from Linux

5. Writing files larger than 2 GB in Solaris 2.6

6. SPARCServer 1000 - Solaris 2.3 -> 2.4 Upgrade??

7. Is there a version of gzip that handles files larger than 2GB?

8. Help with Mysql on BSD - newbie

9. Files larger than 2Gb

10. help! taring files larger than 2GB!

11. Files larger than 2GB (Was Re: ftell/fseek vs. fsetpos/fgetpos)

12. large files (larger than 2GB)?

13. Creation of solaris package larger than 2GB fails