Subject: Re: Files larger than 1.5GB cannot be created on NetBSD/I386 1.4.xsystem?
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Steve <stevep@mccue.com>
List: port-i386
Date: 08/10/2000 21:40:02
I tried the sample program on NetBSD 1.4.2, it runs to completion-
the final output being roughly a 4GB file- 4095997952 bytes. I'm still
impressed with how fast/well 1.4.2 + UW SCSI performs. It only took
a matter of seconds to run this program. ;)
I can put the a.out up for FTP if you want to run it on your box to
see if it's a compiler/link problem with your tree.
I'd also look into any possible ulimit or shell var/quota set as well.
Warmest regards,
Steve Paul
----- Original Message -----
From: David Brownlee <abs@netbsd.org>
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
Cc: <port-i386@netbsd.org>
Sent: Thursday, August 10, 2000 2:22 AM
Subject: Re: Files larger than 1.5GB cannot be created on NetBSD/I386
1.4.xsystem?
> Works for me on 1.5_ALPHA - I don't have a 1.4 system with >1GB
> of free space right now :/
>
> (wopr ~)113% gcc -Wall -o bob bob.c
> (wopr ~)114% ./bob testink
> (wopr ~)115% ls -l testink
> -rw-rw-r-- 1 abs wheel 4095997952 Aug 10 09:56 testink
> (wopr ~)116% uname -a
> NetBSD wopr.int.purplei.com 1.5_ALPHA NetBSD 1.5_ALPHA (_WOPR_) #0: Wed
> Jul 26 22:44:14 BST 2000
>
abs@wopr.int.purplei.com:/files/transient/netbsd/src/sys/arch/i386/compile/_
WOPR_
> i386
>
>
> David/absolute
> -- www.netbsd.org: A pmap for every occasion --
>
>
> On Wed, 9 Aug 2000, Brian Buhrow wrote:
>
> > Hello. As part of some work I'm doing during my day job, I have a
> > reason to try to create files larger than 2GB on a NetBSD 1.4.x system.
> > The following program failes with a ENOSPC error when trying to create
> > such a file when the file in question is still 1.5GB in size and the
> > filesystem is only 70% full. Any idea why this would be happening?
> > If it's something silly I'm doing, let me know.
> > -thanks
> > -Brian
> >
> > /* #####################################################################
> > #
> > FILE SIZE > 2 GB.
> > # */
> >
> >
> > /* ################### INCLUDES & INITIALISATIONS
##################### */
> >
> > #include <stdio.h>
> > #include <string.h>
> > #include <stdlib.h>
> > #include <errno.h>
> >
> >
> > /* ################### MAIN PROGRAM ######################## */
> >
> > int main (argc, argv)
> >
> > int argc;
> > char *argv[];
> >
> > {
> > unsigned long cpos = 0;
> > char buf [2048];
> > FILE *fd1;
> >
> > if (argc != 2) {
> > fprintf (stdout,\
> > " ERROR: need input file name..exit!\n");
> > exit (1);
> > }
> >
> > if ((fd1 = fopen ( argv[1], "w")) == NULL) {
> > fprintf (stdout,\
> > " ERROR: can't open file %s for input\n", argv[1]);
> > exit (1);
> > }
> >
> > memset (buf, '3', sizeof buf);
> > while ( ++cpos < 2000000 )
> > {
> > if ( fwrite (buf, 2048, 1, fd1) <= 0)
> > {
> > fprintf (stdout, " error (%d) - ferror (%d)\n",\
> > errno, ferror (fd1) );
> > exit (1);
> > }
> > }
> >
> > return (0);
> > }
> >
> >
>
>