Question regarding writing file > 4GB on NT 4.0 
Author Message
 Question regarding writing file > 4GB on NT 4.0

I was wondering if there is any special API that needs to be used to
write to a file that can grow bigger than 4GB?

Currently I am using WriteFile() but it seems it stops after writing 4GB
of data. Any help or suggestions are welcome. I believe there is some
extended 32bit APIs that need to be used to do data writes bigger than
4GB. Anyone having seen or heard about it before?

I am using vc++ 4.0 on NT 4.0.  Email responses are also welcome.

Thanks.
Samir



Sun, 15 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0

Quote:

>I was wondering if there is any special API that needs to be used to
>write to a file that can grow bigger than 4GB?

>Currently I am using WriteFile() but it seems it stops after writing 4GB
>of data. Any help or suggestions are welcome. I believe there is some
>extended 32bit APIs that need to be used to do data writes bigger than
>4GB. Anyone having seen or heard about it before?

>I am using vc++ 4.0 on NT 4.0.  Email responses are also welcome.

If your target is Windows NT 4.0,

You can specify the address for an OVERLAPPED structure as the WriteFile()
which contains 64 bit addressing.

You cannot do this on Windows 95/98.

Read the help on WriteFile().

------------------------------------------------------------------------
Andy Yee                   Corporate E-Mail:    See Above
Software Engineer          Coporate Web Page:   http://www.jasc.com

                           Personal Web Page:   http://www.visi.com/~nde

Question authority...and the authorities will question YOU!
------------------------------------------------------------------------



Sun, 15 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0

Quote:

>I was wondering if there is any special API that needs to be used to
>write to a file that can grow bigger than 4GB?

Well, if I recall correctly, the maximum size of an NTFS partition is 4GB.
Bummer huh?

Actually, I am a little bit surprised (peeved) that MS has not done something
about this in a service pack.  It would also be really nice if NT understood
Fat32 for us dual booters out here.

    -Trey



Mon, 16 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0

Quote:
>Well, if I recall correctly, the maximum size of an NTFS partition is 4GB.
>Bummer huh?

That's not correct.  It is true that NT requires that the *BOOT* partition
be less 4GB.  The reason for this is that when installing NT, it actually
formats the drive as FAT first (and FAT in NT can be up to 4GB) then
converts the partition to NTFS on the next boot.  This restriction doesn't
apply to non-boot partitions and they can be up to some ungodly huge 64 bit
size.

Quote:
>Actually, I am a little bit surprised (peeved) that MS has not done
something
>about this in a service pack.  It would also be really nice if NT
understood
>Fat32 for us dual booters out here.

There is a read-only FAT32 driver for NT, and I think someone is offering a
read/write driver for sale.

The problem though, is that NT doesn't natively understand Fat32.  A service
pack can't adequately fix this, since the main installation program
(Winnt.exe) has to be able to understand Fat32 in order to install NT on a
FAT32 drive or repair an installation that exists on a FAT32 drive.  Since
you install NT (or repair NT) from a CD-Rom, there is no way to patch this.

So in effect, if MS allowed you to install NT on a FAT drive, then run the
service pack to convert to FAT32, you'd be up a creek without a paddle if
you ever needed to repair the installation.



Mon, 16 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0
I would be satisfied with just having NT able to read and write FAT32, with
a restriction against using it on the boot partition. I always have my OSes
on separate partitions anyway, but this would allow me (and all other
dual booters) to avoid having a huge stack of 2GByte data partitions just
so that Win9x and NT can share them.

This could be supported in a service pack.

Quote:



> >Well, if I recall correctly, the maximum size of an NTFS partition is 4GB.
> >Bummer huh?

> That's not correct.  It is true that NT requires that the *BOOT* partition
> be less 4GB.  The reason for this is that when installing NT, it actually
> formats the drive as FAT first (and FAT in NT can be up to 4GB) then
> converts the partition to NTFS on the next boot.  This restriction doesn't
> apply to non-boot partitions and they can be up to some ungodly huge 64 bit
> size.

> >Actually, I am a little bit surprised (peeved) that MS has not done
> something
> >about this in a service pack.  It would also be really nice if NT
> understood
> >Fat32 for us dual booters out here.

> There is a read-only FAT32 driver for NT, and I think someone is offering a
> read/write driver for sale.

> The problem though, is that NT doesn't natively understand Fat32.  A service
> pack can't adequately fix this, since the main installation program
> (Winnt.exe) has to be able to understand Fat32 in order to install NT on a
> FAT32 drive or repair an installation that exists on a FAT32 drive.  Since
> you install NT (or repair NT) from a CD-Rom, there is no way to patch this.

> So in effect, if MS allowed you to install NT on a FAT drive, then run the
> service pack to convert to FAT32, you'd be up a creek without a paddle if
> you ever needed to repair the installation.

--
.Bruce Dawson, Cavedog Entertainment.
Makers of Total Annihilation - http://www.cavedog.com


Mon, 16 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0
This feature is planned for NT 5.0.

Quote:

>I would be satisfied with just having NT able to read and write FAT32, with
>a restriction against using it on the boot partition. I always have my OSes
>on separate partitions anyway, but this would allow me (and all other
>dual booters) to avoid having a huge stack of 2GByte data partitions just
>so that Win9x and NT can share them.

>This could be supported in a service pack.




>> >Well, if I recall correctly, the maximum size of an NTFS partition is 4GB.
>> >Bummer huh?

>> That's not correct.  It is true that NT requires that the *BOOT* partition
>> be less 4GB.  The reason for this is that when installing NT, it actually
>> formats the drive as FAT first (and FAT in NT can be up to 4GB) then
>> converts the partition to NTFS on the next boot.  This restriction doesn't
>> apply to non-boot partitions and they can be up to some ungodly huge 64 bit
>> size.

>> >Actually, I am a little bit surprised (peeved) that MS has not done
>> something
>> >about this in a service pack.  It would also be really nice if NT
>> understood
>> >Fat32 for us dual booters out here.

>> There is a read-only FAT32 driver for NT, and I think someone is offering a
>> read/write driver for sale.

>> The problem though, is that NT doesn't natively understand Fat32.  A service
>> pack can't adequately fix this, since the main installation program
>> (Winnt.exe) has to be able to understand Fat32 in order to install NT on a
>> FAT32 drive or repair an installation that exists on a FAT32 drive.  Since
>> you install NT (or repair NT) from a CD-Rom, there is no way to patch this.

>> So in effect, if MS allowed you to install NT on a FAT drive, then run the
>> service pack to convert to FAT32, you'd be up a creek without a paddle if
>> you ever needed to repair the installation.

------------------------------------------------------------------------
Andy Yee                   Corporate E-Mail:    See Above
Software Engineer          Coporate Web Page:   http://www.jasc.com

                           Personal Web Page:   http://www.visi.com/~nde

Question authority...and the authorities will question YOU!
------------------------------------------------------------------------



Tue, 17 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0

Quote:

>That's not correct.  It is true that NT requires that the *BOOT* partition
>be less 4GB.  The reason for this is that when installing NT, it actually
>formats the drive as FAT first (and FAT in NT can be up to 4GB) then
>converts the partition to NTFS on the next boot.  This restriction doesn't
>apply to non-boot partitions and they can be up to some ungodly huge 64 bit
>size.

Good thing to know!  I did not know this.  Yeah, I was really surprised one time
when I was installing NT on a machine and it would not let me make the partition
any bigger than 4GB.  I had no idea that it was making it a FAT in the first
place.  But, now that you mention it.  I do remember the conversion process on
first boot.

Is there any way to grow a partition using NT tools?  I am sure that the
partitioning tool that comes with Linux might work since it understands all file
systems.

   -Trey



Tue, 17 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0

Quote:
>>That's not correct.  It is true that NT requires that the *BOOT* partition
>>be less 4GB.  The reason for this is that when installing NT, it actually
>>formats the drive as FAT first (and FAT in NT can be up to 4GB) then
>>converts the partition to NTFS on the next boot.  This restriction doesn't
>>apply to non-boot partitions and they can be up to some ungodly huge 64
bit
>>size.

>Good thing to know!  I did not know this.  Yeah, I was really surprised one
time
>when I was installing NT on a machine and it would not let me make the
partition
>any bigger than 4GB.  I had no idea that it was making it a FAT in the
first
>place.  But, now that you mention it.  I do remember the conversion process
on
>first boot.

>Is there any way to grow a partition using NT tools?  I am sure that the
>partitioning tool that comes with Linux might work since it understands all
file
>systems.

I'm fairly sure that you can install NT4 into an NTFS partition greater than
4 gig as long as the NTFS partition already exists prior to that
installation of NT4. And you should be able to use Partition Magic to grow a
partition (but if you have SP4 installed, then you should wait until
PowerQuest release v4.01 of Partition Magic - and we've been waiting for
this for 3 months, though there are signs that its release may be imminent).


Thu, 19 Jul 2001 03:00:00 GMT  
 Question regarding writing file > 4GB on NT 4.0
On Thu, 28 Jan 1999 14:54:49 -0600, "Erik Funkenbusch"

Quote:



>>Well, if I recall correctly, the maximum size of an NTFS partition is 4GB.
>>Bummer huh?

>That's not correct.  It is true that NT requires that the *BOOT* partition
>be less 4GB.  The reason for this is that when installing NT, it actually
>formats the drive as FAT first (and FAT in NT can be up to 4GB) then
>converts the partition to NTFS on the next boot.  This restriction doesn't
>apply to non-boot partitions and they can be up to some ungodly huge 64 bit
>size.

>>Actually, I am a little bit surprised (peeved) that MS has not done
>something
>>about this in a service pack.  It would also be really nice if NT
>understood
>>Fat32 for us dual booters out here.

>There is a read-only FAT32 driver for NT, and I think someone is offering a
>read/write driver for sale.

>The problem though, is that NT doesn't natively understand Fat32.  A service
>pack can't adequately fix this, since the main installation program
>(Winnt.exe) has to be able to understand Fat32 in order to install NT on a
>FAT32 drive or repair an installation that exists on a FAT32 drive.  Since
>you install NT (or repair NT) from a CD-Rom, there is no way to patch this.

>So in effect, if MS allowed you to install NT on a FAT drive, then run the
>service pack to convert to FAT32, you'd be up a creek without a paddle if
>you ever needed to repair the installation.

This is not really correct I know of no max size on the BOOT partition
it could be many gig. The SYSTEM partition is limited to the size
addressable by the bios (~ 2gig to ~4 gig depending on specific bios).
Note that Windows NT can run with separate BOOT and SYSTEM partitions
but the Windows NT setup does not support generating these
configurations. However if you have other bootable drives you can
build these configuration by hand. For instance I have a 2 meg SYSTEM
partition and a 9 gig BOOT partition. Note that the BOOT and SYSTEM
terminology is reversed in NT terminology (one tech note calls this
unfortunate...). See the Windows NT resource kit for explanation of
the Windows NT boot process to understand how to build alternate
custom configurations. All of this presupposes that you use SCSI
drives as one of the keys to very large BOOT partions is NTLDR use of
the renamed SCSI driver during the initial image load and proper use
of ARC names in the BOOT.INI file.


Thu, 19 Jul 2001 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Question regarding writing file > 4GB on NT 4.0

2. write AVI files larger than 4GB

3. write AVI files larger than 4GB

4. VC Bug: locking files > 4Gb

5. Question regarding writing to a file (fwrite)

6. Writing DLL for VB4 under NT 4.0 and Win95

7. Prob w/MSVC++ 4.1, NT 4.0 and CreateFile/BackupRead/Write

8. REPOST: Help writing network PACKET FILTER for NT 4.0

9. Help Win9X -> NT 4.0

10. Question regarding ADO with NT Services

11. Question regarding C->C++ and linked lists.

12. Asynchronous file I/O > 4GB broken in NT?

 

 
Powered by phpBB® Forum Software