View Full Version : Figuring out a cluster size
 
 woodypratt
Oct 8, 2008, 02:14 PM
I feel to determine this one takes the sector size and divide it by the sectors per cluster. But the number I get seems too high. Am I missing a step?
 Scleros
Oct 8, 2008, 04:05 PM
If sector size = 512 Bytes,
and there are 8 sectors / cluster,
and 1024 Bytes = 1 KB, then... 
 
Sector Size * Sectors / Cluster = (512) * (8) = 4096 Bytes / Cluster =  4 KB / Cluster.
 woodypratt
Oct 8, 2008, 05:44 PM
thanks.. is there a tutorial on the web somewhere where I can learn a little more about this?  Can one determine the Cluster Offset Value or  FAT Table Entry or umber of Cluster(s) Required from this equation?
 
For # of clusters this is the equation that should work I feel (File Size / Sector Size = Number of Cluster ) ?
 woodypratt
Oct 8, 2008, 06:38 PM
I think I GOT NUMBER OF Cluster (see my calculations)
 
Sector size * sector per cluster = cluster size
 
File size / Cluster size  = number of cluster required
 Scleros
Oct 8, 2008, 08:45 PM
thanks..is there a tutorial on the web somewhere where I can learn a little more about this?
Try NTFS.com - Hard Disk Drive Basics (http://www.ntfs.com/hard-disk-basics.htm), File Chaining and FAT Cluster Allocation (http://www.storagereview.com/guide2000/ref/hdd/file/clustChaining.html), or Google for others.
 
 
File size / Cluster size = number of cluster required ?
 
Yes, mostly. Some file systems have features that can consume space (clusters) above and beyond that needed for the actual file size; Windows NTFS Alternate Data Streams comes to mind.
 woodypratt
Oct 9, 2008, 12:40 PM
so if you have those information of sector size, sector per cluser and cluster offset how can one get the value of the offset?
 
so from before I get that to get the cluster size one does Sector size * sector per cluster. To get the number of clustered required one does File size / Cluster size 
 
but the offset value? This is what I am thinking
Cluster offset * sector size = cluster offset value (and need to change it to HEx)
 Scleros
Oct 9, 2008, 03:00 PM
It's not that simple. You have to take into account the size of any data structures the particular file system itself uses. The NTFS.com site has a section on File Recovery that discusses some of this. This Clusters chain recovery for the deleted entry (http://www.ntfs.com/restore_clusters.htm) page gives an example of info needed for FAT starting cluster offset vs. NTFS.
 
What are you trying to do?