HDDs use Error Correction Codes (ECCs) like Reed–Solomon and Low-Density Parity-Check (LDPC) to correct errors. The Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) feature monitors errors, enabling the drive to remap data to spare sectors to maintain data integrity.