# DriveTime: a surface test that tells a failing disk from its slot

One static program tests a disk of a QNAP NAS over SSH. It tells a failing disk from a bad slot, cable, backplane or controller.

DriveTime reads the disk in 4096 places and draws each place as one cell of a map. A SATA or SAS drive checks its own surface with VERIFY, and 128 more reads travel the whole way from the disk to the controller. Before and after the test, DriveTime reads the drive's SMART counters and the error counters of its link.

The test only reads. DriveTime sends the drive no write command, tests one disk at a time and slows down when the disk gets close to its temperature limit. The disk stays in its RAID group during the test.

DriveTime CLI · x86_64, aarch64, armhf and armel · QTS and QuTS hero · freeware. https://www.qnaputilities.com/drivetime.html

## How a test runs

A test goes through eight steps on one disk. The screen shows each step as a dot. A quick test reads 1 MiB in each cell; a full test reads every cell whole.

1. **Identify the disk.** DriveTime finds the disk by its serial number. It notes the controller, the port and the RAID group of the disk. (`serial, controller, port`)
2. **Counters before the test.** It reads the SMART counters, the drive's error log, the SATA link counters and the kernel log. (`smartctl -x, SATA PHY counters`)
3. **Surface map.** 4096 cells from the start to the end of the disk. On a SATA or SAS disk the drive checks each cell itself with VERIFY. (`4096 cells`)
4. **READ samples.** 128 reads of 1 MiB, spread over the disk. Each byte goes through the controller, the cable and the backplane. (`128 × 1 MiB`)
5. **Retries.** DriveTime reads each failed range again 3 times over the link, and on a SATA or SAS disk 3 times inside the drive. On a hard disk it also reads slow places again. (`3 + 3 reads of 4 KiB`)
6. **SMART self-test.** The drive runs its own short self-test. Nothing on the map changes in this step. (`smartctl -t short`)
7. **Counters after the test.** DriveTime reads the same counters again and keeps only what changed during the test. (`before and after`)
8. **Verdict.** It weighs the map, the retries, the changes of the counters and what the drive reports about itself. (`five verdicts`)

### One quick test, measured

The time of each step of a quick test of a 1.92 TB NVMe drive. We measured it with the DriveTime CLI on a QNAP NAS with an Intel Core i5-1235U and two QNAP SSD700D1 drives.

- Identify the disk, counters before: 1 s
- Surface map, 4096 MiB: 3 s
- READ samples and retries: 2 s
- SMART self-test, counters after, verdict: 110 s

The map took 3.0 s at 1372 MiB/s. The drive's own self-test took about 110 of the 117 seconds. On a hard disk the map takes longer: about a minute for a quick test.

## Inside the drive, or over the link

A read error alone does not say where the fault is. The disk can be failing. The data can also be damaged on its way to the controller: in the slot, the cable or the backplane.

So DriveTime reads the disk in two ways. With VERIFY, the drive reads its own surface and sends back only a status. No data crosses the cable. With READ, every byte goes through the controller, the cable and the backplane.

If VERIFY fails again at the same address, the drive cannot read its own surface: the disk is at fault. If VERIFY passes but READ fails, or the CRC counters of the link grow, the path is at fault.

An NVMe drive has no SATA link counters, so DriveTime does not judge its link. If the drive does not support the NVMe Verify command, DriveTime reads its map with READ. The QNAP SSD700D1 measured here is such a drive.

## The surface map

Cell 0 is the start of the disk, at the top left. The colour of a cell is the time the drive needed for 1 MiB: green up to 10 ms, amber up to 150 ms, red over 500 ms.

A letter marks an error: B for a bad block, L for a link error, E for any other error. In a terminal one character can hold several cells. The worst code of them wins, so a bad block never disappears.

On a hard disk, DriveTime reads a command again up to 3 times if it took 500 ms or more and at least 10 times the median. If it is slow again on 2 tries, the place is a weak spot: the drive reads it only after long internal retries. A weak spot turns its cell red.

- `.`: not tested yet
- `a`: up to 10 ms per MiB
- `b`: up to 25 ms
- `c`: up to 50 ms
- `d`: up to 150 ms
- `e`: up to 500 ms
- `f`: over 500 ms, or a weak spot
- `B`: bad block: a medium error
- `L`: link error: READ failed where VERIFY passed
- `E`: other error: a timeout or an unknown answer

The map of the recorded test below: a QNAP SSD700D1, 1.92 TB, quick test on 2026-11-16. Every command of 1 MiB took under 5 ms, the median 0.5 ms, so every cell is green.

### Four NVMe drives, one quick test each

The quick tests of the four drives of two QNAP NAS units with an Intel Core i5-1235U, on 2026-11-16. The average is the speed of the map, from the first cell to the last.

| Drive | Average, MiB/s | Peak, MiB/s | Longest command | Highest temperature | Verdict |
|---|--:|--:|--:|--:|---|
| NAS 1 · nvme0n1 (QNAP SSD700D1-001T92) | 1287 | 1337 | 4.3 ms | 47 °C | DISK GOOD |
| NAS 1 · nvme1n1 (QNAP SSD700D1-001T92) | 1322 | 1351 | 1.6 ms | 49 °C | DISK GOOD |
| NAS 2 · nvme0n1 (QNAP SSD700D1-001T92) | 1362 | 1417 | 1.4 ms | 49 °C | DISK GOOD |
| NAS 2 · nvme1n1 (QNAP SSD700D1-001T92) | 1376 | 1406 | 2.4 ms | 50 °C | DISK GOOD |

DriveTime read all four maps with READ, because the SSD700D1 has no NVMe Verify command. None of the drives slowed down for heat: the hottest reached 50 °C, the limit was 80 °C.

## What each verdict means

At the end of a test the screen shows one of five verdicts. A test that you stopped has no verdict. The StorageDiag app shows the same verdict in its DriveTime window.

- **DISK GOOD**: No media or link errors in the test, and the drive reports no problems about itself. The disk is good. If QTS marked it as failed, you can clear the flag.
- **DISK BAD**: The drive cannot read its own surface, its media counters grew during the test, or the drive itself reports that it is failing. Back up the data and replace the disk.
- **DISK REPORTS PROBLEMS**: The surface reads, but the drive reports problems: sectors it replaced, read errors in its own error log, failed self-tests from before. Or some places read very slowly on every retry. Back up the data and plan to replace the disk. The flag stays.
- **LINK OR BACKPLANE**: VERIFY passed inside the drive, but the data over the link failed, or the CRC or link counters grew. Move the disk to another slot and test it again. If the error stays with the slot, the backplane or the cable is at fault.
- **INCONCLUSIVE**: The disk dropped off the bus, the map did not finish, or errors did not repeat. Test again. If the disk dropped off, test it in another slot.
- **ABORTED**: You stopped the test before its end. Run the test to its end to get a verdict.

With `--plain`, the program ends with exit code 3 when the verdict is DISK BAD, and with 0 otherwise.

## The QNAP error flag

When QTS marks a disk as failed, it writes a line `pd_err_wwn_` with the disk's ID (WWN) into `/mnt/HDA_ROOT/.conf`. DriveTime can remove that flag, but only after a fresh test cleared the disk.

A flag on a disk that is failing protects your data. So DriveTime clears it only when the newest test of that disk ended with DISK GOOD or LINK OR BACKPLANE, no more than 7 days ago.

Clearing the flag does not return the disk to its RAID group or storage pool. A rebuild is still needed.

What DriveTime does when you clear the flag:

1. It checks the newest test of the disk. DISK BAD, DISK REPORTS PROBLEMS, INCONCLUSIVE, a stopped test or a test older than 7 days does not clear the flag.
2. It saves a copy of `.conf` in the folder `flag-backups` of its data.
3. It asks QTS to clear the flag with `hal_event`.
4. If the line is still there after 10 seconds, it removes that one line from the file. Every other line stays as it was.

In the StorageDiag app, an administrator clears the flag with the button **Clear the flag** on the Surface test tab. In the terminal: `flags` lists the flags, `flag-clear --wwn ` clears one.

## A quick test, recorded

A quick test of a QNAP SSD700D1 in a QNAP NAS, on the screen of the DriveTime CLI in a terminal of 120 by 40 characters. The map fills in 3 seconds. Then the drive runs its self-test, and the verdict comes after 1 min 57 s.

## On a NAS that keeps running

- DriveTime only reads. It opens the disk read-only and checks each command it sends to the drive directly against a list: VERIFY, the NVMe Verify and Identify commands and the reading of the health log. It does not send any other command to the drive, a write included.
- It tests one disk at a time. A test of a second disk waits until the first test ends.
- The temperature limit comes from the drive: 80 °C for the NVMe drive measured here. Close to the limit the test slows down. At the limit it pauses until the disk cools down by 5 to 8 °C.
- `--max-rate 200` keeps the reads at or under 200 MiB/s. Use it when other programs read or write the same disk.
- `q` leaves the screen and the test keeps running. Start the program again to watch it. `s` stops the test.

## Run it over SSH

Sign in to the NAS over SSH as an administrator and run these commands. They download the program for your NAS's processor and open the screen with the list of disks.

```sh
# on the NAS, over SSH, as admin
a=$(uname -m)
# uname says armv7l; the program is named armhf (older ARM: armel)
case "$a" in armv7*) a=armhf ;; armv5*|armv6*) a=armel ;; esac
wget https://qnaputilities.com/pub/drivetime/bin/drivetimed-cli-$a
chmod +x drivetimed-cli-$a
./drivetimed-cli-$a
```

The program installs nothing. If StorageDiag is installed, the tests go into its data folder and its DriveTime window shows them. Otherwise they go into the folder `drivetimed-cli` beside the program.

### Common commands

- `./drivetimed-cli-$a`: Lists the disks. `Enter` opens the chosen disk.
- `./drivetimed-cli-$a --serial <serial> --mode quick`: Starts a quick test of one disk and shows it. The serial number is in the list of disks.
- `./drivetimed-cli-$a --serial <serial> --mode full`: Reads the whole surface. On a large hard disk this takes hours.
- `./drivetimed-cli-$a --plain --serial <serial> --mode quick`: Progress lines instead of the screen, and the verdict with its reasons at the end.
- `./drivetimed-cli-$a --serial <serial> --mode quick --max-rate 200`: A quick test that reads at most 200 MiB/s.
- `./drivetimed-cli-$a probe-stop --serial <serial>`: Stops a running test.
- `./drivetimed-cli-$a flags`: Lists the QNAP error flags of the disks.
- `./drivetimed-cli-$a --help`: Shows all commands.

### Keys on the screen

- `q`: leave the screen; a running test keeps running
- `s`: stop the running test (it asks first)
- `1` `2`: start a quick test, or a full test (it asks first); the screen calls the quick test Daily
- `r`: the read speed of the next test: max, 500, 200 or 50 MB/s
- `d`: the errors found instead of the counters
- `l`: back to the list of disks

## Download

The DriveTime CLI for x86_64, aarch64, armhf and armel. Each file is one static program.

- [drivetime-cli.tar.gz](https://www.qnaputilities.com/pub/drivetime/bin/drivetime-cli.tar.gz): The program for 4 processor types, in one archive
- [pub/drivetime/bin/](https://www.qnaputilities.com/pub/drivetime/bin/): Each program file on its own

The StorageDiag app runs the same test in its DriveTime window, on the Surface test tab. There an administrator also clears the QNAP error flag with one button.

## Limits

- A quick test reads 4096 × 1 MiB, a sample of the disk. Only a full test reads the whole surface.
- An NVMe drive has no SATA link counters, so the test cannot blame the link of an NVMe drive.
- A drive or USB adapter that does not accept VERIFY gets a READ map. That map cannot tell the disk from the link.
- DriveTime judges weak spots on hard disks only.
- Starting and stopping a test needs the administrator account. Watching a test does not.

## Related pages

- [StorageDiag, the app with the DriveTime window](https://www.qnaputilities.com/storagediag.html)
- [DriveTime CLI in App Center](https://www.qnaputilities.com/appcenter.html#drivetime)
- [Guide: measure the speed of a NAS](https://www.qnaputilities.com/howto-nas-speed.html)
- [MemHound: a RAM test for a running NAS](https://www.qnaputilities.com/memhound.html)
- [Sources and licences of the site](https://www.qnaputilities.com/sources.html)
