files >4gig [WAS Adding more than 8 swap partitions]

Uncle George (gatgul@voicenet.com)
Fri, 04 Jun 1999 19:45:12 -0400


So I created a 17 gig file using Linux 2.2.9 & a file in /tmp. Interestingly
enough at 17 gig I get an error 22 ( still have space & inodes available ) .
YOU ALSO NOW HAVE A CORRUPT / BUSTED-SUPER-BLOCK in the partition.
fsck wants to use an alternate superblock, and suggests using 8192(?), which
doesn't work. :-\
this is the little pgm used to create the 17gig sparse file.
So I guess its not a 2/4gig boundary problem anymore.
gat

BTW it may be that fsck cant handle it ( redhat 5.0 vintage ), but I dunno at the
moment :( It just at reboot time, i always force a fsck. Removeing the 17gig file
didn't help :-(

Pgm used:
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
/******************** BE CAREFULL ******************************/
/* This can kill the superblock on the partition the file is written on */
/* Which may not be recoverable gat 6/5/99 */
/******************** BE CAREFULL *******************************/

main()
{
long l,r;
int e, w;
int fd;
fd = open("c",O_RDWR|O_CREAT|O_TRUNC);

for ( l=0; l < 64000000000L; l+=1000000) {
r = lseek(fd, l, 0);
w = write(fd,"a",1);
fprintf(stderr,"r=%lx, w=%d, l=%ld\n", r,w,l);
}
}

Uncle George wrote:

> Gee, looks like 15gig.
>
> Ok, is this a feature of 2.2.x ? right ? or on on a diff os?
>
> Wes Bauske wrote:
>
> > Uncle George wrote:
> > >
> > > I dont know what u mean by "capable", but partition size may be >2gig ( at
> > > the time I had only a 4 gig drive ), but file size was still 2gig. This was
> > > with a 2.0linux on a redhat 4.0 compilation CD for the alpha.
> > > Discussions since then about this limitation, only suggested that it was
> > > possible to do, but not yet done so. After ALL why hold back?
> > > Now u say its always been here ? I'd like to believe u, but my empirical
> > > experience says thats just not true.
> > >
> > > ANYBODY out there can create a file >2gig on linux/alpha ?
> > > gat
> >
> > Sure.
> >
> > -rw-r--r-- 1 wsb pds 15039538080 May 16 23:01 junk
> >
> > Just having troubles lseek()'ing into it past 2GB. Still
> > testing though so hopefully I can determine if it's
> > something I did wrong, or glibc/kernel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/