Opened 14 years ago

Closed 14 years ago

#165 closed defect (fixed)

Cannot re-enable SMART on 3ware controller under Windows

Reported by: alex-sh Owned by: Christian Franke
Priority: minor Milestone: Release 5.41
Component: all Version: 5.40
Keywords: 3ware windows Cc:

Description

Hello,

I encountered this error when testing 3ware support under Windows (XP 32 bit and win7 64bit).

Suppose the drive behind the controller is /dev/sdd,2. Running "smartctl -s on (or off) on /dev/sdd,2" works. However, running "smartctl -s off /dev/sdd" says "Disable failed: Input/output error".
After this, the SMART data is accessible neither on "/dev/sdd,2", nor "/dev/sdd". Trying to re-enable it says "Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)". The 3ware web interface also says that it cannot access SMART data on the drive. Only a reboot seems to help.

smartmontools: smartmontools-5.41-0-20110204-r3253.win32-setup.exe.
Windows: observed under winxp (32-bit) and win7 (64-bit).
Controller: 3ware 9690SA-4I4E, 1 drive attached to port 2.

This is the full log of my commands under winxp:

C:\>smartctl --scan-open
/dev/sda -d ata [ATA] (opened)
/dev/sdb -d ata [ATA] (opened)
/dev/sdc -d ata [ATA] (opened)
/dev/sdd,2 -d ata [ATA] (opened)

C:\>smartctl -s off /dev/sdd,2
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Disabled. Use option -s with argument 'on' to enable it.

C:\>smartctl -s on /dev/sdd,2
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.


C:\>smartctl -s off /dev/sdd,2
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Disabled. Use option -s with argument 'on' to enable it.

C:\>smartctl -s off /dev/sdd
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
Error SMART Disable failed: Input/output error
Smartctl: SMART Disable Failed.

A mandatory SMART command failed: exiting. To continue, add one or more '-T perm
issive' options.

C:\>smartctl -s on /dev/sdd,2
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)

A mandatory SMART command failed: exiting. To continue, add one or more '-T perm
issive' options.

C:\>smartctl -i /dev/sdd
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)

A mandatory SMART command failed: exiting. To continue, add one or more '-T perm
issive' options.

C:\>smartctl -i /dev/sdd,2
smartctl 5.41 2011-02-04 r3253 [i686-w64-mingw32-xp-sp3] (cf-win32-20110204)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)

A mandatory SMART command failed: exiting. To continue, add one or more '-T perm
issive' options.

Thanks,
Alexander

Attachments (4)

smartctl-a_sdc.txt (4.6 KB ) - added by alex-sh 14 years ago.
smartctl -a /dev/sdc output
smartctl-a_sdc2.txt (5.2 KB ) - added by alex-sh 14 years ago.
smartctl -a /dev/sdc,2 output
smartctl-x_sdc.txt (8.4 KB ) - added by alex-sh 14 years ago.
smartctl -x /dev/sdc output
smartctl-x_sdc2.txt (9.1 KB ) - added by alex-sh 14 years ago.
smartctl -x /dev/sdc,2 output

Download all attachments as: .zip

Change History (14)

comment:1 by Christian Franke, 14 years ago

Keywords: 3ware windows added

Bug in the 3ware Windows driver?

If SMART is disabled the driver possibly also disables the SMART I/O-controls (SMART_RCV_DRIVE_DATA, SMART_SEND_DRIVE_CMD).

comment:2 by alex-sh, 14 years ago

Maybe smartctl could somehow detect if it's running on "/dev/sdd" and not on "/dev/sdd,2" if it's a 3ware controller? Because disabling/enabling it on "/dev/sdd,2" works fine; it's "/dev/sdd" (the controller without the port number) that has this problem.

comment:3 by Christian Franke, 14 years ago

Priority: majorminor

The difference is as follows:

/dev/sdd: Windows device "
.\!PhysicalDrive3" is opened and standard versions of the SMART I/O-controls are used. No 3ware specific handling is done. In this case the 3ware Windows driver routes the I/O-controls to the first physical drive (or the first which has SMART enabled?) of the RAID array behind the opened (logical) drive. This is a feature of the 3ware driver and worked also with older drivers without real SMART support.

/dev/sdd,2: Windows device "
.\!PhysicalDrive3" is opened and 3ware specific enhanced versions of the SMART I/O-controls are used: The port number 2 and a 3ware vendor (PCI) ID are passed in reserved bytes of the original SENDCMDINPARAMS struct.

The driver apparently has problems if the first method is used to disable SMART, at least when no further drives with SMART enabled exist.

Possible workarounds:

  1. Don't change anything, smartmontools users normally don't want to disable SMART :-)
  2. If "/dev/sdX" is used and 3ware enhancements are detected in open(), return "unsupported" for SMART DISABLE command.
  3. If "/dev/sdX" is used and 3ware enhancements are detected in open(), let open() fail.

If SMART DISABLE is the only command which fails I would vote for 2.

comment:4 by alex-sh, 14 years ago

If I understand it correctly, this feature allows getting SMART data from at least one drive in case ",port"-style access is unsupported by the driver, right? In that case, I'd also vote for 2.

If, however, this feature offers no additional benefit, then I'd vote for 3. Having an option that picks a port in a non-deterministic way and provides all the same things except for some special cases (like -s off) is, well, not that user-friendly.

Of course, it's all up to you to decide. I don't have a clue about the difficulty of implementing all this.

I will try to perform some tests (running random smartctl commands) on /dev/sdX in a couple of days to see if it's only "-s off" that is affected and report back to you.

Cheers

comment:5 by alex-sh, 14 years ago

I played a bit more with smartctl on the 3ware controller today.
A couple of things I noticed:

  • Launching a short self-test on the drive (whether though /dev/sdX or /dev/sdX,2) succeeds, but the test never completes (stuck at 90%). Aborting the test or running a new one leaves "Aborted by host" in the self-test log. Running the same test in Linux completes just fine.
  • There are some differences in -a and -x outputs between /dev/sdX and /dev/sdX,2. The main ones are different directory logs in -x output and /dev/sdX saying that the self-test logs and the error log are unsupported. I'm attaching the files, just in case.

by alex-sh, 14 years ago

Attachment: smartctl-a_sdc.txt added

smartctl -a /dev/sdc output

by alex-sh, 14 years ago

Attachment: smartctl-a_sdc2.txt added

smartctl -a /dev/sdc,2 output

by alex-sh, 14 years ago

Attachment: smartctl-x_sdc.txt added

smartctl -x /dev/sdc output

by alex-sh, 14 years ago

Attachment: smartctl-x_sdc2.txt added

smartctl -x /dev/sdc,2 output

in reply to:  5 ; comment:6 by Christian Franke, 14 years ago

Replying to alex-sh:

  • Launching a short self-test on the drive (whether though /dev/sdX or /dev/sdX,2) succeeds, but the test never completes (stuck at 90%). Aborting the test or running a new one leaves "Aborted by host" in the self-test log. Running the same test in Linux completes just fine.

Is the "Self-test execution status" byte stuck at 90%? IIRC we got a few similar reports on the list. I have no idea why it works with Linux but not with Windows, the commands sent to the disk should be identical.

  • There are some differences in -a and -x outputs between /dev/sdX and /dev/sdX,2. The main ones are different directory logs in -x output and /dev/sdX saying that the self-test logs and the error log are unsupported.

Since r3239 (ticket #89) smartctl uses the SMART Log Directory to check for log support.
Interestingly the /dev/sdX version of the directory does not include the error and self-test logs (but adds Power Conditions log). The driver likely modifies the output in this case:

SMART Log Directory Version 0
SMART Log at address 0x00 has    1 sectors [Log Directory]
SMART Log at address 0x08 has    1 sectors [Power Conditions]
SMART Log at address 0x09 has    1 sectors [Selective self-test log]

/dev/sdX,2:

SMART Log Directory Version 1 [multi-sector log support]
SMART Log at address 0x00 has    1 sectors [Log Directory]
SMART Log at address 0x01 has    1 sectors [Summary SMART error log]
SMART Log at address 0x02 has    5 sectors [Comprehensive SMART error log]
SMART Log at address 0x03 has    5 sectors [Ext. Comprehensive SMART error log]
SMART Log at address 0x06 has    1 sectors [SMART self-test log]
SMART Log at address 0x07 has    1 sectors [Extended self-test log]
SMART Log at address 0x09 has    1 sectors [Selective self-test log]

Conclusion: Use /dev/sdX,N if possible.

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

Milestone: Release 5.41
Owner: changed from somebody to Christian Franke
Status: newaccepted

Will implement alternative 2, see above.

in reply to:  6 comment:8 by alex-sh, 14 years ago

Replying to chrfranke:

Replying to alex-sh:

  • Launching a short self-test on the drive (whether though /dev/sdX or /dev/sdX,2) succeeds, but the test never completes (stuck at 90%). Aborting the test or running a new one leaves "Aborted by host" in the self-test log. Running the same test in Linux completes just fine.

Is the "Self-test execution status" byte stuck at 90%? IIRC we got a few similar reports on the list. I have no idea why it works with Linux but not with Windows, the commands sent to the disk should be identical.

Yes, it's the "Self-test execution status" field. The self-test log doesn't reflect anything at that point, but a new entry is added once I abort the test. You can see a few of them in the "smartctl-a_sdc2.txt" file I attached earlier. I can perform some more testing if needed.

Thanks

in reply to:  5 comment:9 by Christian Franke, 14 years ago

Replying to alex-sh:

... Running the same test in Linux completes just fine.

If it is actually reproducible that the "90% problem" only occurs if the test is started from Windows then please create a new ticket. Thanks.

comment:10 by Christian Franke, 14 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.