The PNY CS3040 has a known, documented firmware incompatibility with TrueNAS when handling NVMe self-test commands. Approximately 30 seconds after a SMART test is triggered, a bug in the PNY drive controller causes it to stop responding entirely. This leads to a command timeout, causing TrueNAS to attempt a device reset. Because the controller is locked up, the reset fails, and TrueNAS disables the NVMe device completely, which either crashes your system pool, causes a kernel panic, or triggers an absolute system freeze1.
Because this is a specific hardware/firmware conflict rather than an organic drive failure, your physical hardware and data might still be perfectly healthy.
Use the command for crontab entry, excluding the modeln PNY CS3040 1TB SSD (identified with midclt call disk.query | jq)
midclt call disk.smart_test SHORT "$(midclt call disk.query | jq -c '[.[] | select(.model != "PNY CS3040 1TB SSD") | .name]')"