-2

From what I know of most laptops, you are able to "partition" your disk into as many other drives as you please. The more you cut it up, the smaller your partitions are, but from an organizational point of view, this may be desirable...

I was wondering how the filesystem itself becomes partitioned underneath the partitions visible to the user. For instance, a laptop disk is usually divided into platters, each with two surfaces. The surfaces are further divided into "tracks". I guess what I am asking is, is it possible to identify how the disk itself keeps track of partitions? (whether each partition has its own platter? each partition has its own set of adjacent tracks? or some other configuration, or whether the data from different partitions are just randomly interleaved and scattered throughout the disk?)

1

2 Answers 2

2

Each partition has just a consecutive number of sectors assigned to it - it is defined by a starting sector and its length - data which is written to the partition table upon partition creation. The partition table itself is a logical structure - just another data sector on the disk. The disk hardware is not aware of any partitioning - it just stores data to sectors and does not care about the contents of the data. The transition from "sectors" to platters / tracks / heads / whatever is an abstraction done within the disk's hardware logic and is invisible to the operating system.

You'd need to read the scripts from a first-term lecture about operating systems for more details.

2
  • So if each partition is just a sequence of consecutive sectors, does that mean that a certain point when your disk has say, only 1GB of free space left, but the free sectors are scattered across the disk, then you can't make another partition of 1 GB? Oct 15, 2011 at 19:53
  • Sectors that have not been assigned to a partition are "free" from the partitioning point of view - no matter if they would or would not contain any meaningful data. So you can create a 1 GB partition if there are 2^30 consecutive sectors unclaimed by any other partition definition.
    – the-wabbit
    Oct 15, 2011 at 20:17
0

Internally, a typical modern platter has perhaps a dozen, likely more zones -- concentric rings -- with a different number of sectors per track in each zone. However, this structure is totally unknown to the OS and disk owner; details are entirely internal.

I did see, once, such details included in complete drive specs, some time back.

Otoh, the drive's embedded microprocessor (there must be one, maybe more) pays no attention to anything concerning partitions, just about sure.

The Cylinders/Heads/Sectors (C/H/S) scheme was defined with really conservative limits. Trying to use it with modern high-capacity drives forced silly-looking fictional numbers (such as 64 heads) to be used to make the numbers fit. It should be forgotten about when working with contemporary drives; Logical Block Addressing (LBA), afaik, is the best we have, right now.

[nb]

Not the answer you're looking for? Browse other questions tagged .