disktrim icon indicating copy to clipboard operation
disktrim copied to clipboard

ERROR: Error on DeviceIoControl IOCTL_SCSI_PASS_THROUGH

Open CalunVier opened this issue 1 year ago • 4 comments

I encountered a problem. I'm sure the disk driver is working because I successfully sent the trim command using DiskGenius (but it couldn't trim the entire hard drive).

OS: Windows 11

The following is the console output

Number Friendly Name Serial Number                    HealthStatus         OperationalStatus      Total Size Partition
                                                                                                             Style
------ ------------- -------------                    ------------         -----------------      ---------- ----------
0      SAMSUNG MZ... 0025_38B4_11B0_15DB.             Healthy              Online                    1.86 TB GPT
1      WDC WD10 S... 123622500220                     Healthy              Online                  931.51 GB GPT


PS C:\Users\Calun> disktrim-x64.exe 1
DiskTrim v2.2 by Antoni Sawicki & Tomasz Nowak, Build Dec 31 2016 02:51:58

Disk: 1
Size: 931.5 GB
Type: WDC WD10 SPZX-00Z10T0
Trim: Supported

WARNING: Contents of your drive an all data will be permanently erased!
There is no possibility of data recovery even with 3rd party companies.

Do you want to erase this disk (y/N) ? y
All right...
Querying drive parameters...
ERROR: Error on DeviceIoControl IOCTL_SCSI_PASS_THROUGH
[0x0000045D] ?? I/O ??????????????

CalunVier avatar Mar 07 '24 07:03 CalunVier

Oh that very interesting. I have never tested it on Windows 11. However the error 0x0000045D seem to be coming from hardware. Would it be possible for you to boot Windows PE based on Windows 10 and try it there as well?

tenox7 avatar Mar 08 '24 00:03 tenox7

Oh that very interesting. I have never tested it on Windows 11. However the error 0x0000045D seem to be coming from hardware. Would it be possible for you to boot Windows PE based on Windows 10 and try it there as well?

Same problem in Windows 10 KVM, but with antoher error code

PS C:\Windows\system32> disktrim 1
DiskTrim v2.2 by Antoni Sawicki & Tomasz Nowak, Build Dec 31 2016 02:51:58

Disk: 1
Size: 3726.0 GB
Type: WD       Elements SE 2622
Trim: Supported

WARNING: Contents of your drive an all data will be permanently erased!
There is no possibility of data recovery even with 3rd party companies.

Do you want to erase this disk (y/N) ? y
All right...
Querying drive parameters...
ERROR: Error on DeviceIoControl IOCTL_SCSI_PASS_THROUGH
[0x00000057] ?????

CalunVier avatar Apr 06 '24 05:04 CalunVier

I have to say, blkdiscard in Linux does not work on this hard drive either. But the closed-source software DiskGenius does work. I have no clue about this. Maybe Western Digital's Trim command on SMR HDD is special?

CalunVier avatar Apr 06 '24 05:04 CalunVier

But I have actually successfully implemented blkdiscard on a 2.5-inch Western Digital 2TB SMR HDD with a SATA port. But there was no success on another Western Digital 1TB 2.5-inch SMR HDD connected to SATA via USB. It seems like I've never successfully implemented a block device diskcard on a USB device.

CalunVier avatar Apr 06 '24 05:04 CalunVier