
Verify Disk V1.0.2 -  Freeware by Uwe Sieber - www.uwe-sieber.de

Usage:

VerifyDisk [disknumber][-ld]

disknumber  a disk's number as shown in the disk management or by -ld
-r          read instead of IOCTL_DISK_VERIFY
-r2         read twice and compare instead of IOCTL_DISK_VERIFY
-ld         list disks


By default VerifyDisk calls IOCTL_DISK_VERIFY over a whole disk device.

Even available since Windows NT 3.1 back in 1993, all Microsoft says about IOCTL_DISK_VERIFY
ever since is "Verifies the specified extent on a fixed disk":

https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ni-winioctl-ioctl_disk_verify


Probably it sends one of the SCSI VERIFY commands to the disk device.

Which effect is has seems to depend on the device:

Classic hard-drives deliver the same speed on verify as on read.

Some SSDs are slow on first verify and fast on futher attempts, so they obviously do
something. They deliver less speed on verfiy than on read which is another sign that
they actually perform a verification.

But there are other SSDs which deliver insanely high speeds on verify (> 10 times faster
than read) which might indicate that they ignore the request and do nothing.

USB adaptors might no pass the command to the disk, resulting either in
ERROR_INVALID_FUNCTION or insane speed if they just return it as successful.

Read tests require admin privileges.

For "reading twice and compare" VerifyDisk tries to lock and dismount all volumes on
this disk to prevent concurrent write accesses which might lead to false alerts.




Returned Errorlevels:


enum {
	ERRL_SUCCESS,                  // 0
	ERRL_NO_PARAMS,                // 1
	ERRL_INVALID_PARAMS,           // 2
	ERRL_FILE_NOT_FOUND,           // 3
	ERRL_NO_SIZE,                  // 4
	ERRL_NO_ADMIN,                 // 5
	ERRL_VERIFY_FAILED,            // 6
	ERRL_ABORTED                   // 7
};


https://www.uwe-sieber.de/drivetools_e.html#verifydisk


Uwe Sieber
April 2024

