Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - cannot create file larger than 2GB on qnx6fs: (5 Items)
   
cannot create file larger than 2GB on qnx6fs  
Hi,

i'm trying to zip a hdd image to a file using the following command:

dd if=/dev/hd2 bs=2048k | gzip > /tmp/hdd_img.gz

when the filesize of the image file reaches 2,147,483,647 ( which is apparently 2GB ), i get the error:
 
gzip: stdout: File too large

i'm using qnx 6.4.1 with qnx6fs, which i thought doesn't have the 2GB filesize limitation.

am i wrong ?
Re: cannot create file larger than 2GB on qnx6fs  
> i'm trying to zip a hdd image to a file using the following command:
> 
> dd if=/dev/hd2 bs=2048k | gzip > /tmp/hdd_img.gz
> 
> when the filesize of the image file reaches 2,147,483,647 ( which is apparently 2GB ), i get the error:
>  
> gzip: stdout: File too large
> 
> i'm using qnx 6.4.1 with qnx6fs, which i thought doesn't have the 2GB filesize limitation.
> 
> am i wrong ?

fs-qnx6 does support >2GB files, provided the client app is suitably
built with largefile support (O_LARGEFILE, _FILE_OFFSET_BITS=64, etc).
Otherwise it'll get EOVERFLOW (hmm, which is "Value too large to be
stored in datatype", whereas "File too large" is actually EFBIG).

Check that all the utilities involved are largefile (they will link
against the open64() instead of open()); they appear to be to me:

   $ nm -D /bin/sh | grep open
            U fopen64
            U open64
            U opendir
   $ nm -D /bin/gzip | grep open
            U open64
            U opendir
   $ nm -D /bin/dd | grep open
            U open64

Check that /tmp is indeed a fs-qnx6 filesystem:

   $ df -n /tmp
   Filesystem           Mounted on        Type
   /dev/hd0t177         /                 qnx6

The only place fs-qnx6 raises EFBIG is if 3 levels of indirect blocks
are exceeded.  This imposes a limit of 256GB for a single file if
formatted at 1k blocks.  If you used "mkqnx6fs -b512" then that limit
would be much lower, 16GB, but is still >2GB observed.

So the best guess is that you are not writing to a fs-qnx6.  The
"df -n /tmp" bit would show that ... (are you sure you don't have
/dev/shmem mounted at /tmp, for example?)
Re: cannot create file larger than 2GB on qnx6fs  
thank you for your answers.

i've now done the tests and here's the result:

# nm -D /bin/sh | grep open
         U fopen
         U open
         U opendir
# nm -D /bin/gzip | grep open
         U open64
         U opendir
# nm -D /bin/dd | grep open
         U open64

# df -n /tmp
Filesystem           Mounted on        Type
/dev/hd0t179         /                 qnx6
Re: cannot create file larger than 2GB on qnx6fs  
I fixed the shell but I'm not sure that's the
issue here.

-seanb
RE: cannot create file larger than 2GB on qnx6fs  
The filesystem doesn't have that limitation but most programs do.

> -----Original Message-----
> From: - - [mailto:community-noreply@qnx.com]
> Sent: Thursday, November 05, 2009 11:58 AM
> To: general-filesystems
> Subject: cannot create file larger than 2GB on qnx6fs
> 
> Hi,
> 
> i'm trying to zip a hdd image to a file using the following command:
> 
> dd if=/dev/hd2 bs=2048k | gzip > /tmp/hdd_img.gz
> 
> when the filesize of the image file reaches 2,147,483,647 ( which is
> apparently 2GB ), i get the error:
> 
> gzip: stdout: File too large
> 
> i'm using qnx 6.4.1 with qnx6fs, which i thought doesn't have the 2GB
> filesize limitation.
> 
> am i wrong ?
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post41433
>