Opened 7 years ago

Closed 6 years ago

#947 closed defect (wontfix)

Windows 10 To Go: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117

Reported by: Greg Bohn Owned by:
Priority: minor Milestone:
Component: all Version: 6.6
Keywords: nvme windows Cc:

Description

Hi;

Running smartmontools 6.6 r4594 under Windows 10, I receive the following error when I try to access my Samsung 960 Pro 512 GB NVMe drive:

smartctl -a /dev/sdf

smartctl 6.6 2017-11-05 r4594 [x86_64-w64-mingw32-w10-1709] (sf-6.6-1)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

Read NVMe Identify Controller failed: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117

I was under the impression from the 6.6 release notes that the built-in Windows NVMe 10 driver (stornvme.sys) would work.

Am I missing something? Do I need to add an additional driver or use a different command line option?

Getting SMART from the other (SATA attached) drives seems to work o.k.

Thanks.

Attachments (9)

nvme-device-mgr.jpg (162.2 KB ) - added by Greg Bohn 7 years ago.
Device Mananger listing
smartscan.txt (2.9 KB ) - added by Greg Bohn 7 years ago.
'smartctl -d nvme -r ioctl,2 --scan' result
more-device-mgr.jpg (181.7 KB ) - added by Greg Bohn 7 years ago.
Device manager list for IDE/ATA controllers
W10-Crystal-Diskinfo-960.jpg (151.7 KB ) - added by Greg Bohn 7 years ago.
Results from W10 CrystalDiskInfo 7.5.0
w7-results-2.3.txt (3.9 KB ) - added by Greg Bohn 7 years ago.
Smartctl -x /dev/nvme results from Window 7 64-bit with Samsung 2.3 driver
W10-DiskInfo32.log (10.1 KB ) - added by Greg Bohn 7 years ago.
CrystalDiskInfo32 log file run under Windows 10
W10-DiskInfo64.log (10.1 KB ) - added by Greg Bohn 7 years ago.
CrystalDiskInfo64 log file run under Windows 10
w10-32bit-a.jpg (316.0 KB ) - added by Greg Bohn 7 years ago.
smartctl under W10: 32-bit version
w10-32bit-scan.txt (2.9 KB ) - added by Greg Bohn 7 years ago.
W10: 32-bit version smartctl -d nvme -r ioctl,2 --scan

Download all attachments as: .zip

Change History (36)

comment:1 by Greg Bohn, 7 years ago

Keywords: NVMe added

comment:2 by Christian Franke, 7 years ago

Keywords: nvme windows added; NVMe removed
Milestone: undecided

Are you sure that stornvme.sys is actually used?
Which Chipset or NVMe Controller is used?

Please provide output of smartctl -d nvme -r ioctl,2 --scan.

by Greg Bohn, 7 years ago

Attachment: nvme-device-mgr.jpg added

Device Mananger listing

by Greg Bohn, 7 years ago

Attachment: smartscan.txt added

'smartctl -d nvme -r ioctl,2 --scan' result

comment:3 by Greg Bohn, 7 years ago

Are you sure that stornvme.sys is actually used?

I'm not sure. I was going by the fact that the Device Manager 'Storage Controllers' shows a 'Standard NVM Express controller', and the driver details show stornvme.sys I believe.

Please provide output of smartctl -d nvme -r ioctl,2

I have added this to the attachments.

This is with Windows 10 1709.

Which Chipset or NVMe Controller is used?

This is in a PCI Express slot in an Asus X99-E WS/USB3.1 motherboard. It is an X99 chipset system.

I don't believe I installed the Samsung nvme driver (and I would have thought it would show up under 'storage controllers' if I had).

Let me know if I should check anythings else.

Thanks.

Last edited 7 years ago by Greg Bohn (previous) (diff)

comment:4 by Christian Franke, 7 years ago

Device scan output and driver version look sane. NVMe access works for me with same driver on Win 10 Pro 1709 with VirtualBox 5.2.0 NVMe emulation (no access to a similar real machine right now).

Which driver is installed for SATA access (Intel, Microsoft) ?

Please provide output of smartctl -r ioctl,2 -i /dev/sdf.

by Greg Bohn, 7 years ago

Attachment: more-device-mgr.jpg added

Device manager list for IDE/ATA controllers

comment:5 by Greg Bohn, 7 years ago

I attached a .jpg of the device manager list for 'IDE ATA/ATAPI controllers'. I think this is saying that it is using the microsoft drivers.

Output of 'smartctl -r ioctl,2 -i /dev/sdf' is

smartctl 6.6 2017-11-05 r4594 [x86_64-w64-mingw32-w10-1709] (sf-6.6-1)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

 \\.\PhysicalDrive5: successfully opened
  IOCTL_STORAGE_QUERY_PROPERTY returns:
    Vendor:   "(null)"
    Product:  "Samsung SSD 960 PRO 512GB"
    Revision: "2B6QCXP7"
    Removable: No
    BusType:   0x11
  \\.\PhysicalDrive5: successfully opened
 [NVMe call: opcode=0x06, size=0x1000, nsid=0x00000000, cdw10=0x00000001]
  [STORAGE_QUERY_PROPERTY: Id=49, Type=1, Value=0x00000001, SubVal=0x00000000]
  [STORAGE_QUERY_PROPERTY: ReturnData=0x00000000, Reserved[3]={0x0, 0x0, 0x0}]
 [NVMe call failed: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117]
Read NVMe Identify Controller failed: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117

I don't know if it makes a difference, but this is a 'Windows-to-go' type Windows 10 1709 booted from USB (in BIOS mode).

This system is normally booted as a Windows 7 system, but I created a Windows-to-go USB drive system to be able to also boot Windows 10 from USB and see information about the 960 Pro drive (I hoped) from smartctl.

Under Windows 7 I use the Samsung nmve 2.3 driver, which as I understand it, is not compatible with the smartctl nvme support in that environment. (I get the impression I would at least need to disable some type of driver checking and install a different or additional unsigned driver of some sort).

Under windows 7, I get:

...
  \\.\PhysicalDrive5: successfully opened
 [NVMe call: opcode=0x06, size=0x1000, nsid=0x00000000, cdw10=0x00000001]
  [STORAGE_QUERY_PROPERTY: Id=49, Type=1, Value=0x00000001, SubVal=0x00000000]
  [STORAGE_QUERY_PROPERTY: ReturnData=0x00000000, Reserved[3]={0x0, 0x0, 0x0}]
  [Duration: 0.016s]
 [NVMe call failed: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1]
Read NVMe Identify Controller failed: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed,
 Error=1
Last edited 7 years ago by Alex Samorukov (previous) (diff)

comment:6 by Christian Franke, 7 years ago

I have no idea whether Windows-to-go should make any difference. If possible, please test whether CrystalDiskInfo could access the NVMe drive. Its use of NMVe IOCTL_STORAGE_QUERY_PROPERTY differs slightly (access rights, buffer size).

Samsung (and Intel and OCZ/Toshiba) NVMe drivers reportedly support the ​NVME_PASS_THROUGH I/O-control from OpenFabrics driver, see NVMe wiki page. Requires a different pseudo device name, e.g. /dev/nvme0. Try smartctl -d nvme --scan on this system.

by Greg Bohn, 7 years ago

Results from W10 CrystalDiskInfo 7.5.0

comment:7 by Greg Bohn, 7 years ago

I ran CrystalDiskInfo 7.5.0 in the Windows 10 environment, and it appears to have collected info for the 960 Pro. I attached W10-Crystal-DiskInfo-960.jpg with the results.

As far as the Windows 7 environment goes, I have good news. I ran

C:\Program Files\smartmontools\bin>smartctl -d nvme --scan
/dev/sdf -d nvme # /dev/sdf, NVMe device
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device

I then ran smartctl -x /dev/nvme0. and much to my surprise it worked! I will attach the text output.

I must have misunderstood the smartmontools nvme page at https://www.smartmontools.org/wiki/NVMe_Support. I thought it was telling me that I needed to install an additional 'OpenFabrics' driver, which I then thought involved disabling driver signing.

Apparently this was working as is under Windows 7 64-bit and I incorrectly thought I would use /dev/sdf.

Thanks!

As far as Windows 10 goes, it would still be nice to eventually get that working for the day when I may be forced to go that route.

Does it sound like Switching to use the Samsung 2.3 driver should work as is (in Windows 10)?

by Greg Bohn, 7 years ago

Attachment: w7-results-2.3.txt added

Smartctl -x /dev/nvme results from Window 7 64-bit with Samsung 2.3 driver

comment:8 by Alex Samorukov, 7 years ago

Summary: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117Windows 10: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117

comment:9 by Christian Franke, 7 years ago

Info on NVMe page is modified.

If CrystalDiskInfo works, it should be possible to track down the issue. First please repeat the test with the 32-bit version of smartctl from same package (no need to install, select "Extract Files only" or unpack the installer with 7-Zip). The 64-bit version is build with high-entropy ASLR which may have an influence.

comment:10 by Alex Samorukov, 7 years ago

btw, could be helpful also to get debug log from the diskinfo - https://crystalmark.info/software/CrystalDiskInfo/manual-en/Contact.html . Not sure if all nvme details are written to it, but subject to check

by Greg Bohn, 7 years ago

Attachment: W10-DiskInfo32.log added

CrystalDiskInfo32 log file run under Windows 10

by Greg Bohn, 7 years ago

Attachment: W10-DiskInfo64.log added

CrystalDiskInfo64 log file run under Windows 10

comment:11 by Greg Bohn, 7 years ago

I ran a test with both the 32 and 64-bit versions of CrystalDiskInfo with the .ini file set to DebugMode=1. They both seemed to work o.k. (and were able to show info. from the Samsung 960 Pro nvme drive).

I attached the 32 and 64-bit log files. These look pretty much the same to me except for the numbers at the start of each line.

Last edited 7 years ago by Greg Bohn (previous) (diff)

comment:12 by Christian Franke, 7 years ago

Please run a test with 32-bit version of smartctl, see above.

Last edited 7 years ago by Christian Franke (previous) (diff)

by Greg Bohn, 7 years ago

Attachment: w10-32bit-a.jpg added

smartctl under W10: 32-bit version

by Greg Bohn, 7 years ago

Attachment: w10-32bit-scan.txt added

W10: 32-bit version smartctl -d nvme -r ioctl,2 --scan

comment:13 by Greg Bohn, 7 years ago

I ran using the 32-bit version of smartctl (I think) under Windows 10 and it appears to fail in the same way.

Last edited 7 years ago by Greg Bohn (previous) (diff)

comment:14 by Greg Bohn, 7 years ago

Also, I don't know if it's relevant or not, but the 'E:" drive is a spanned/dynamic disk composed of two of the physical drives.

comment:15 by Christian Franke, 7 years ago

Should have no influence if Windows builtin dynamic functionality is used.

I still could not reproduce the problem with the systems I have access to. Are you willing to test some smartctl.exe experimental builds? If yes, we can handle this via private mail.

comment:16 by Greg Bohn, 7 years ago

Are you willing to test some smartctl.exe experimental builds?

Sure.

comment:17 by ANail, 7 years ago

Hello.
I have a similar case. Could you please let me know if any progress?

comment:18 by Christian Franke, 7 years ago

Sorry, no. Problem could not be reproduced.
Please be more specific (Windows version, SSD, NVMe driver version, do other tools work?, ...)

in reply to:  7 comment:19 by Christian Franke, 7 years ago

Replying to Greg Bohn:

I ran CrystalDiskInfo 7.5.0 in the Windows 10 environment, and it appears to have collected info for the 960 Pro.

These lines from the attached file W10-DiskInfo64.log show that IOCTL_STORAGE_QUERY_PROPERTY also does not work for CrystalDiskInfo:

00000984 DoIdentifyDeviceNVMeStorageQuery
00000984 DoIdentifyDeviceNVMeSamsung
00001000 AddDiskNVMe - CMD_TYPE_NVME_SAMSUNG

CrystalDiskInfo then uses Samsung specific subcommands of the NVMe SECURITY SEND/RECEIVE commands (accessible via SCSI SECURITY PROTOCOL OUT/IN) instead. These commands provide an alternative NVMe pass-through access path.

This is not implemented in smartmontools. Feel free to create a related ticket. Note that this would not solve the issue for NVMe drives from other vendors.

comment:20 by ANail, 7 years ago

Not sure that it is for this ticket. But problem with Samsung NVMe
smartctl -d nvme --scan
does not report anything.

CrystalDisk and NVMeTools.exe did not find as well.

Disk: Samsung NVMe PM971

Version 0, edited 7 years ago by ANail (next)

comment:21 by ANail, 7 years ago

Hello guys, any update for "Samsung NVMe PM971"?

in reply to:  20 comment:22 by Christian Franke, 7 years ago

Replying to ANail:

smartctl -d nvme --scan
does not report anything.

CrystalDisk and NVMeTools.exe did not find as well.

Then it is unlikely that we could implement this for smartmontools. Either there is no NVMe pass-through support or the related documentation is only available under NDA.

Disk: Samsung NVMe PM971

As above: Please be more specific (Windows version, NVMe driver version, ...)

comment:23 by ANail, 7 years ago

Hello!

OS: Windows 10 Prof
Driver name: iaStorA.sys
Driver comnpany: Intel Corporation
Driver file version: 15.7.5.1025

Could you please advise if Intel has PSDK driver (http://www.spdk.io/) for Windows and what is "NDA" in comment above?
Thanks.

in reply to:  23 comment:24 by Christian Franke, 7 years ago

Driver name: iaStorA.sys
Driver comnpany: Intel Corporation

This is the Intel RST driver and therefore unrelated to this ticket (Microsoft NVMe driver stornvme.sys). The RST driver neither supports NVME_PASS_THROUGH nor IOCTL_STORAGE_QUERY_PROPERTY. The Samsung NVMe driver may work or not. See also the NMVe wiki page.

Could you please advise if Intel has PSDK driver (http://www.spdk.io/) for Windows

Unknown.

and what is "NDA" in comment above?

For example: Intel requires a NDA to get info about proprietary functionality (like possible NVMe pass-through support) of the RST driver.

PS: This is a bug tracker, not a support forum. Don't use this ticket for further questions, use the smartmontools support mailing list instead.

in reply to:  5 comment:25 by Christian Franke, 7 years ago

Replying to Greg Bohn:

I don't know if it makes a difference, but this is a 'Windows-to-go' type Windows 10 1709 booted from USB (in BIOS mode).

The Windows To Go overview says "Internal disks are offline". Does this possibly also mean that certain pass-through I/O-controls are also disabled in this mode?

comment:26 by Christian Franke, 6 years ago

Summary: Windows 10: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117Windows 10 To Go: IOCTL_STORAGE_QUERY_PROPERTY(NVMe) failed, Error=1117

comment:27 by Christian Franke, 6 years ago

Milestone: undecided
Resolution: wontfix
Status: newclosed

The problem could not be reproduced on regular Windows 10. It is possibly an intentional limitation of Windows To Go and which cannot be fixed.

See ticket #1067 for the Samsung specific alternative NVMe pass-through support which is used by CrystalDiskInfo.

Note: See TracTickets for help on using tickets.