Increasing sector / cluster size in fat32

Here’s what I would like to do:

Format a drive with the FAT32 file system and large allocation units
(clusters).

format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
(128k,256k for sector size > 512 bytes).
Also, 65526 < Number or clusters < 268435446

So, if I wanted to use cluster sizes of 1MB what would be involved?

I have the W2K IFS kit with the fastfat sample code.
I do not however have the source code for the Microsoft format utility.
I do however, have the source to FormatX (www.sysinternals.com) and mkdosfs
(linux utility for creating FAT32 file system).
FormatX, however seems to simply call the (undocumented, AFAIK) FormatEx
function exported from the fmifs.dll library.

Is what I am trying to do possible?
Could someone please point me in the right direction if they have any ideas?

Thanks,
Darragh

n.b. AFAIK = as fas as i know :slight_smile:


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

SectorsPerCluster in the volume’s “BIOS” parameter block (FATs
superblock equivalent) is UCHAR. Clusters are always 2^n sectors,
therefore SPC maxes at 128 and physically caps cluster size at 64KB for
512B/s media. The theoretical 1MB cluster would require at least 8KB
sectors.

No, it isn’t possible, and I’m actually not aware of an existing
filesystem which would allow that large an allocation unit. UDF
(http://www.osta.org) could physically represent up to a 2GB cluster,
but carries implementation restrictions which limit it to sector size =
cluster size.


This posting is provided “AS IS” with no warranties, and confers no
rights. You assume all risk for your use.

-----Original Message-----
From: Darragh Jones [mailto:darragh.jones@cs.tcd.ie]
Sent: Monday, January 14, 2002 8:40 AM
To: File Systems Developers
Subject: [ntfsd] Increasing sector / cluster size in fat32

Here’s what I would like to do:

Format a drive with the FAT32 file system and large allocation units
(clusters).

format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
(128k,256k for sector size > 512 bytes).
Also, 65526 < Number or clusters < 268435446

So, if I wanted to use cluster sizes of 1MB what would be involved?

I have the W2K IFS kit with the fastfat sample code.
I do not however have the source code for the Microsoft format utility.
I do however, have the source to FormatX (www.sysinternals.com) and
mkdosfs
(linux utility for creating FAT32 file system).
FormatX, however seems to simply call the (undocumented, AFAIK) FormatEx
function exported from the fmifs.dll library.

Is what I am trying to do possible?
Could someone please point me in the right direction if they have any
ideas?

Thanks,
Darragh

n.b. AFAIK = as fas as i know :slight_smile:


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Ok, now i see where the 64k limit on cluster size comes from.
However, would it be possible to alter the Bios Parameter Block structure
to increase the SectorsPerCluster type to USHORT? (If I made the changes in
both the fastfat source code and format utility source code?)

Where is the 512 byte limit on sectors imposed? Is this limit imposed by
hardware, or a lower level driver?

On 01/14/02, ““Daniel Lovinger” ” wrote:
> SectorsPerCluster in the volume’s “BIOS” parameter block (FATs
> superblock equivalent) is UCHAR. Clusters are always 2^n sectors,
> therefore SPC maxes at 128 and physically caps cluster size at 64KB for
> 512B/s media. The theoretical 1MB cluster would require at least 8KB
> sectors.
>
> No, it isn’t possible, and I’m actually not aware of an existing
> filesystem which would allow that large an allocation unit. UDF
> (http://www.osta.org) could physically represent up to a 2GB cluster,
> but carries implementation restrictions which limit it to sector size =
> =3D
> cluster size.
>
> –
> This posting is provided “AS IS” with no warranties, and confers no
> rights. You assume all risk for your use.
>
> -----Original Message-----
> From: Darragh Jones [mailto:darragh.jones@cs.tcd.ie]=20
> Sent: Monday, January 14, 2002 8:40 AM
> To: File Systems Developers
> Subject: [ntfsd] Increasing sector / cluster size in fat32
>
> Here’s what I would like to do:
>
> Format a drive with the FAT32 file system and large allocation units
> (clusters).
>
> format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
> (128k,256k for sector size > 512 bytes).
> Also, 65526 < Number or clusters < 268435446
>
> So, if I wanted to use cluster sizes of 1MB what would be involved?
>
> I have the W2K IFS kit with the fastfat sample code.
> I do not however have the source code for the Microsoft format utility.
> I do however, have the source to FormatX (www.sysinternals.com) and
> mkdosfs
> (linux utility for creating FAT32 file system).
> FormatX, however seems to simply call the (undocumented, AFAIK) FormatEx
> function exported from the fmifs.dll library.
>
> Is what I am trying to do possible?
> Could someone please point me in the right direction if they have any
> ideas?
>
> Thanks,
> Darragh
>
> n.b. AFAIK =3D as fas as i know :slight_smile:
>
> —
> You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You could certainly redefine the BPB; the result would not be a FAT
filesystem. You would need to have your own format *and* chkdsk utility
set and make sure that no existing FAT utilities, Microsoft or
otherwise, would think your new format looked enough like FAT that they
would “fix” it. I’m sure that would require more changes to the BPB.

There is no 512B/s limit. That’s just what virtually all current
magnetic spinning media exposes these days. Rumors are afoot that will
be changing in the next few years, but even now MO and DVD-RAM media
exist with 1KB and 2KB sectors. These work perfectly fine with our
current FAT.

If there is a limit its more like 4KB, but that’s a whole different
story.

I should note that in this case especially I’m no legal eagle, and
anything I say here is not an indication that the IFSKit license covers
such reuse of the code and FAT specification. You should check this
through your IFSKit contact directly if you do intend to go down this
road.


This posting is provided “AS IS” with no warranties, and confers no
rights. You assume all risk for your use.

-----Original Message-----
From: darragh.jones@cs.tcd.ie [mailto:darragh.jones@cs.tcd.ie]
Sent: Monday, January 14, 2002 5:00 PM
To: File Systems Developers
Subject: [ntfsd] RE: Increasing sector / cluster size in fat32

Ok, now i see where the 64k limit on cluster size comes from.
However, would it be possible to alter the Bios Parameter Block
structure
to increase the SectorsPerCluster type to USHORT? (If I made the changes
in
both the fastfat source code and format utility source code?)

Where is the 512 byte limit on sectors imposed? Is this limit imposed by

hardware, or a lower level driver?

On 01/14/02, ““Daniel Lovinger” ” wrote:
> SectorsPerCluster in the volume’s “BIOS” parameter block (FATs
> superblock equivalent) is UCHAR. Clusters are always 2^n sectors,
> therefore SPC maxes at 128 and physically caps cluster size at 64KB
for
> 512B/s media. The theoretical 1MB cluster would require at least 8KB
> sectors.
>
> No, it isn’t possible, and I’m actually not aware of an existing
> filesystem which would allow that large an allocation unit. UDF
> (http://www.osta.org) could physically represent up to a 2GB cluster,
> but carries implementation restrictions which limit it to sector size
=
> =3D
> cluster size.
>
> –
> This posting is provided “AS IS” with no warranties, and confers no
> rights. You assume all risk for your use.
>
> -----Original Message-----
> From: Darragh Jones [mailto:darragh.jones@cs.tcd.ie]=20
> Sent: Monday, January 14, 2002 8:40 AM
> To: File Systems Developers
> Subject: [ntfsd] Increasing sector / cluster size in fat32
>
> Here’s what I would like to do:
>
> Format a drive with the FAT32 file system and large allocation units
> (clusters).
>
> format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
> (128k,256k for sector size > 512 bytes).
> Also, 65526 < Number or clusters < 268435446
>
> So, if I wanted to use cluster sizes of 1MB what would be involved?
>
> I have the W2K IFS kit with the fastfat sample code.
> I do not however have the source code for the Microsoft format
utility.
> I do however, have the source to FormatX (www.sysinternals.com) and
> mkdosfs
> (linux utility for creating FAT32 file system).
> FormatX, however seems to simply call the (undocumented, AFAIK)
FormatEx
> function exported from the fmifs.dll library.
>
> Is what I am trying to do possible?
> Could someone please point me in the right direction if they have any
> ideas?
>
> Thanks,
> Darragh
>
> n.b. AFAIK =3D as fas as i know :slight_smile:


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>If there is a limit its more like 4KB, but that’s a whole different

story.

A page size?

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Yep.

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, January 15, 2002 1:09 PM
To: File Systems Developers
Subject: [ntfsd] RE: Increasing sector / cluster size in fat32

If there is a limit its more like 4KB, but that’s a whole different
story.

A page size?

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hello Darragh,

Monday, January 14, 2002, 9:39:36 PM, you wrote:

DJ> format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
DJ> (128k,256k for sector size > 512 bytes).
DJ> Also, 65526 < Number or clusters < 268435446

Is the size of the variable for storing the cluster size in boot
record more then 2 bytes?
And also, the sector size is 1 byte.

Best regards,
??? mailto:xxxxx@perm.raid.ru


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

http://www.nondot.org/sabre/os/files/FileSystems/FatFormat.pdf

Hope this will give some idea.

Regards,
Satish K.S

----- Original Message -----
From: “Àíäðåé Êîêîóëèí”
To: “File Systems Developers”
Sent: Thursday, January 17, 2002 8:14 PM
Subject: [ntfsd] Re: Increasing sector / cluster size in fat32

Hello Darragh,

Monday, January 14, 2002, 9:39:36 PM, you wrote:

DJ> format /? reveals FAT32 supports 512,1024,2048,4096,8192,16k,32k,64k
DJ> (128k,256k for sector size > 512 bytes).
DJ> Also, 65526 < Number or clusters < 268435446

Is the size of the variable for storing the cluster size in boot
record more then 2 bytes?
And also, the sector size is 1 byte.

Best regards,
Àíäðåé mailto:xxxxx@perm.raid.ru


You are currently subscribed to ntfsd as: xxxxx@aalayance.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>Is the size of the variable for storing the cluster size in boot

record more then 2 bytes?
And also, the sector size is 1 byte.

Not so.

typedef struct _PACKED_BIOS_PARAMETER_BLOCK {
UCHAR BytesPerSector[2]; // offset = 0x000 0
UCHAR SectorsPerCluster[1]; // offset = 0x002 2

…and so on.

Max


You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com