NVMe SSD Reallocated Sector Count increases only during heavy random-write FIO workload on Linux
Environment
Desktop workstation with NVMe SSD in PCIe Gen3 x4 slot, Linux kernel 5.15, running fio random-write workload (randwrite 4k, iodepth 32) targeted at a single large file on an ext4 partition; SMART data polled via smartctl.
Symptoms
SMART attribute 5 (Reallocated Sector Count) and attribute 197 (Current Pending Sector) increase by a small amount only when the fio random-write test runs; values remain stable under light sequential writes and normal desktop use. Performance under the test shows occasional write latency spikes and retry counts increase.
Observations
SMART readouts before and after test show consistent growth in attribute 5 only after the heavy random-write test. dmesg contains intermittent 'blk_update_request: I/O error' entries associated with the NVMe device during peak workload windows. Running the same fio test at a lower IO depth or with sequential patterns does not reproduce the reallocated sector increments. Moving the drive to a different PCIe slot and repeating the workload produced the same SMART behavior. Ambient temperatures measured during the test were within vendor-specified range.
Already attempted
Backed up critical data, ran vendor NVMe diagnostic (read-only health check) which reported 'SMART OK' but did not exercise heavy random write patterns, downgraded fio I/O depth and observed reduced incidence of errors, ran badblocks in read-only mode (no errors), updated NVMe firmware via vendor tool where available (firmware version unchanged by vendor tool), and tested the drive in another Linux machine which reproduced the behavior under identical random-write stress.
Question
What are the likely root causes of NVMe sector reallocation appearing only under heavy random-write workloads (rather than during normal use), which reversible diagnostics can confirm whether this is NAND wear leveling, a firmware remapping bug, or transient PCIe errors, and what immediate mitigations should be taken to protect data before pursuing RMA?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags