A hard disk drive (HDD) according to an embodiment of the present
invention uses three primary defect map (PDM) formats: a single-sector
entry format; a multi-sector entry format; and a two-dimensional sector
entry format. Methods of registering defective sectors in each such
format are illustrated. Defects can be appropriately registered in a
limited RAM capacity by selecting an appropriate format according to
states of the defects on a magnetic disk.