2.2. Sectors and Blocks

Mass storage devices (hard disks, CD-ROMs, tapes) operate on chunks of data, usually called sectors. The size of these device sectors varies, but is fixed for any one device. Hard disks and floppies usually use 512 bytes, while data CDs and DVDs use 2048 bytes. Today, it is customary to number all sectors sequentially and leave the details to the device.

File systems also operate on chunks at a time, but they don't need to be the same size as the device's sectors. The chunks used by the file system are usually called blocks, but cluster, allocation block, and allocation unit are also common.

With large block sizes, small files have a large overhead. Some file systems were extended to compensate for this. One strategy is called tail packing, another one divides blocks further into equally-sized fragments. The effect is the same: pieces of data from several files are packed into a single block, improving efficiency.