Partition vs Cluster

What is partitioning and clustering? Is there any correlation between the two?
Who is Participating?
Gary CaseConnect With a Mentor RetiredCommented:
First, I'll assume your question is indeed about a cluster in the sense of file allocation clusters, and not related to clustered storage arrays, which is an entirely different topic.

The general concept detailed above is correct for FAT-based file systems ... but no Windows OS has used FAT as the primary file structure in a decade.    All modern Windows-based OS's uses NTFS file structures, which store the file allocation information in a Master File Table (MFT).     However, the details of this structure aren't relevant to understanding the difference between clusters and partitions.

A disk is physically accessed by sector number -- where a sector is a fixed size unit of storage on the disk (typically 512 bytes).    At one time, the actual platter, cylinder, and sector were used to access these sectors, but for well over a decade modern disks have been accessed using a single number to refer to the sectors [called the logical block address].     To keep from dividing files into too tiny a "slice", file systems allocation by cluster rather than sector -- a cluster is an allocation unit that is specified when you format the disk (or a partition of the disk) and always consists of contiguous sectors (so it can be read/written very quickly).

As noted above, when you allocate a file, the minimum size it can occupy is one cluster [EXCEPT for small NTFS files, which can actually be contained entirely in the MFT, but that's another topic].    So the tradeoff in cluster size is that larger clusters can result in higher performance, but waste more space due to "slack" -- the space that's allocated for a file but not needed [statistically, the average amount of space wasted on a disk is 1/2 the cluster size times the number of files].

Partitioning has NO relationship to cluster size.    Partitioning simply allocates a physical disk in smaller blocks -- these form logical "disks" from the standpoint of the OS.    A slice of pizza is a bad analogy in that the "slices" formed by partitioning are more like rings than wedges -- each partition occupies contiguous cylinders.     There are good reasons to partition a disk -- to segregate the OS from your data [so you can restore an image of the OS or reload the OS without any impact on data];  to segregate different OS's [in a multi-boot environment];  or to maximize the performance of an OS by keeping it on the outermost cylinders of a disk [which have much better data transfer rates than the inner cylinders].     But each of these partitions is it's own logical "disk" -- and must be independently formatted (thus can each have their own cluster sizes, etc.).

r.e. your 2nd question, "...  Is there any correlation between the two? "  ==>  No.
stowyoConnect With a Mentor Americas Regional IT ManagerCommented:
Think of a partition as a slice of pizza.  If you have 4 slices, then you have 4 partitions.  Once you create the partition, it can be formatted...

A Cluster is the logical unit of file storage on a hard disk; it's managed by the computer's operating system. Any file stored on a hard disk takes up one or more clusters of storage. A file's clusters can be scattered among different locations on the hard disk. The clusters associated with a file are kept track of in the hard disk's file allocation table (FAT). When you read a file, the entire file is obtained for you and you aren't aware of the clusters it is stored in.

Since a cluster is a logical rather than a physical unit (it's not built into the hard disk itself), the size of a cluster can be varied. The maximum number of clusters on a hard disk depends on the size of a FAT table entry. Beginning with DOS 4.0, the FAT entries were 16 bits in length, allowing for a maximum of 65,536 clusters. Beginnning with the Windows 95 OSR2 service release, a 32-bit FAT entry is supported, allowing an entry to address enough clusters to support up to two terabytes of data (assuming the hard disk is that large!).

The tradeoff in cluster size is that even the smallest file (and even a directory itself) takes up the entire cluster. Thus, a 10-byte file will take up 2,048 bytes if that's the cluster size. In fact, many operating systems set the cluster size default at 4,096 or 8,192 bytes. Until the file allocation table support in Windows 95 OSR2, the largest size hard disk that could be supported in a single partition was 512 megabytes. Larger hard disks could be divided into up to four partitions, each with a FAT capable of supporting 512 megabytes of clusters.
srikanthradAuthor Commented:
So, a file spans multiple clusters if it is big enough. But, can it span multiple partitions? When there is such a trade-off with a cluster, why would anybody use such a concept which is waste of memory and I am guessing somewhat little bit more time to retrieve? Or does it depends upon usage/utilization?
stowyoAmericas Regional IT ManagerCommented:
I would think no
srikanthradAuthor Commented:
Please post if you have any links that can help me dig deeper.
All Courses

From novice to tech pro — start learning today.