TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Ruskai
from: Craig Swanson
date: 1996-01-29 13:19:44
subject: Cluster algorithm

MR> This is the algorithm I'm using to determine a drive's
 MR> cluster size based on
 MR> its size:

 MR> Rough cluster size is drive size divided by 65536

I think this should be 65528.  My recollection is the top 8 numbers (i.e.,
0xFFF8 through 0xFFFF) are reserved for flagging free clusters,bad
clusters, and some other uses.

 MR> Convert rough cluster size to binary
 MR> Count number of digits in binary number (starting with first '1')
 MR> Actual cluster size is 2 raised to the power of the
 MR> number of digits above

This sounds right to me.

 MR> Is there anything wrong with this *other* than it not
 MR> taking into account the
 MR> 12-bit FAT of a <16MB drive?

 MR> The reason I ask is because I have a 60MB FAT partition with 2048 byte
 MR> clusters, but according to my reasoning, it should have only 1024 byte
 MR> clusters.

1024 byte clusters should be the minimum allowable size for a 60MB FAT-16 partition.

 MR> I shrunk it down from 100MB with PartitionMagic (1.0),
 MR> but I also reformatted
 MR> the drive.

 MR> Is the cluster size still being affected by what
 MR> PartitionMagic did, or is my
 MR> algorithm (and hence my understanding of FAT) flawed?

FAT clusters can be sized bigger than the minimum allowable size. For
instance, you could use 16KB clusters on your 60MB partition if you had a
format utility to set up a FAT-16 file system that way.

2KB clusters are fairly standard -- perhaps Partition Magic won't use
smaller clusters?


--- Maximus/2 2.02
* Origin: OS/2 Connection {at} Mira Mesa, CA (1:202/354)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 202/354 300 777 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.