Each disk is divided into top and bottom sides. Rings on each side called tracks. Sections within each track called sectors. A sector is the smallest physical storage unit on a disk. Typically 512 bytes in size. The format command organizes the disk into tracks and sectors for use by a particular file system. Unless you specify a particular sector size, format evaluates your disk and determines an appropriate sector size for you.
As a file is written to the disk. The file system allocates the appropriate number of the sector to store the file’s data. For example, if each sector is 512 bytes and the file is 800 bytes. Two sectors are allocated for the file.
Later, if the file is appended. For example, to twice its size(1600 bytes), another two sectors are allocated. If contiguous sectors(sectors that are next to each other on the disk) are not available, the data is written elsewhere on the disk. The file is considered to be fragmented.
Fragmentation only becomes an issue when the file system must search several different locations to find all the pieces of the file you want to read. The search causes a delay before the file is retrieved. Allocating larger sectors reduces the potential for fragmentation. But increases the likelihood that sectors would have unused space.
The way data is retrieved depends on the indexing methods used by the file system. The following sections provide details about FAT, HPFS, and NTFS, including how each store, indexes, and retrieves data on the disk.