Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#178 closed defect (fixed)

--scan missing(forget) an usb-drive in his output

Reported by: frankhartung Owned by: Christian Franke
Priority: minor Milestone: Release 5.42
Component: all Version: 5.40
Keywords: windows Cc:

Description

hi,

another computer in my home office to find another bug in smartctl:
smartctl 5.41 2011-06-09 r3365 [i686-w64-mingw32-xp-sp3] (sf-win32-5.41-1)
and this machine is using windows xp as operating system.

the cmd:
smartctl --scan

give this result:
/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
/dev/sdd -d sat # /dev/sdd [SAT], ATA device
/dev/sde -d usbjmicron # /dev/sde [USB JMicron], ATA device

sda = first internal connected sata-drive
sdb = 2nd internal connected sata-drive
sdc ?! smartctl does not print it!
sdd = usb connected western digital elements drive
sde = usb connected drive by using jmicron-chip-adapter

the in the output of smartctl missing usb drive can accessed very well with command:
smartctl -a /dev/sdc -d sat

..but if the cmds are automatic called by output from --scan this drive will be always missed!

Attachments (3)

output_usb2direct.txt (2.5 KB) - added by frankhartung 8 years ago.
output_usb2onhub.txt (1.9 KB) - added by frankhartung 8 years ago.
output_usb3_pciex4card.txt (1.9 KB) - added by frankhartung 8 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by frankhartung

sorry, miss some information:
the /dev/sdc -d sat is an second western digital elements drive connected by usb to the machine.

comment:2 Changed 8 years ago by Christian Franke

Component: smartctldrivedb
Keywords: windows usb removed
Milestone: Release 5.41.1Release 5.42
Priority: majorminor
Type: defectenhancement

Only USB devices with known type appear in device scanning.

Try "smartctl -a /dev/sdc" without -d option.
If this reports "Unknown USB bridge [0x1058:idProduct]" create local entry in %PROGRAMFILES%\smartmontools\bin\drivedb-add.h file:

  { "USB: WD Elements; ",
    "0x1058:idProduct",
    "",
    "",
    "-d sat"
  },

If this works please report idProduct, we will add the new entry to drivedb.h then.

comment:3 Changed 8 years ago by frankhartung

it reports not an idProduct :

smartctl -a /dev/sdc
smartctl 5.41 2011-06-09 r3365 [i686-w64-mingw32-xp-sp3] (sf-win32-5.41-1)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

/dev/sdc: Unable to read USB device ID
Smartctl: please specify device type with the -d option.

Use smartctl -h to get a usage summary

..but I checked the difference between the connections of the external drives:
the first wd elements is connected to an usb2.0 (on mainboard)
and the second wd elements is connected to an usb3.0 of an PCIex4-card U3S6(mg990t-c) from asus .

comment:4 Changed 8 years ago by Christian Franke

Component: drivedball
Keywords: windows added

Please attach output of "smartctl -r ioctl,2 -i /dev/sdc".

comment:5 Changed 8 years ago by frankhartung

I have noticed that the output differs by the type of connection of the same drive.
for that reason and to give you more informations I have connected the wd elements drive to usb2.0(on mainboard), to hub that is connected to usb2.0 (on mainboard) , to usb3.0-pciex4-card . (see the name of the attachments)

Changed 8 years ago by frankhartung

Attachment: output_usb2direct.txt added

Changed 8 years ago by frankhartung

Attachment: output_usb2onhub.txt added

Changed 8 years ago by frankhartung

Attachment: output_usb3_pciex4card.txt added

comment:6 Changed 8 years ago by Christian Franke

Owner: changed from somebody to Christian Franke
Status: newaccepted
Type: enhancementdefect

Thanks for the detailed info! Looks like a subtle problem in interpretation of WMI output when multiple devices with the same internal name ("WD Ext HDD 1021 USB Device") are connected.

comment:7 Changed 8 years ago by Christian Franke

Resolution: fixed
Status: acceptedclosed

comment:8 Changed 8 years ago by Christian Franke

New test release is available here. Please test if possible.

comment:9 in reply to:  8 ; Changed 8 years ago by frankhartung

Replying to chrfranke:

New test release is available here. Please test if possible.

here the result of using the programm-paket from 2011-06-16 :

smartctl --scan
prints..
/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
/dev/sdc -d sat # /dev/sdc [SAT], ATA device
/dev/sdd -d sat # /dev/sdd [SAT], ATA device
/dev/sde -d usbjmicron # /dev/sde [USB JMicron], ATA device

and their status with smartctl -a /dev/sdc -d sat (for example) works well!

comment:10 in reply to:  9 ; Changed 8 years ago by Christian Franke

Replying to frankhartung:

and their status with smartctl -a /dev/sdc -d sat (for example) works well!

Should also work without -d sat. If an USB device appears in --scan output then the USB bridge type could be auto-detected.

Thanks for testing.

comment:11 in reply to:  10 Changed 8 years ago by frankhartung

Replying to chrfranke:

Should also work without -d sat. If an USB device appears in --scan output then the USB bridge type could be auto-detected.

yes, I can confirm : this works without -d sat too!

comment:12 Changed 8 years ago by frankhartung

I have done an new test: connected 9 pieces of wd elements usb2.0 drives to usb-ports.

the smartctl --scan gives out:
/dev/sda -d ata # /dev/sda, ATA device
/dev/sdb -d ata # /dev/sdb, ATA device
/dev/sdc -d sat # /dev/sdc [SAT], ATA device
/dev/sdd -d sat # /dev/sdd [SAT], ATA device
/dev/sde -d sat # /dev/sde [SAT], ATA device
/dev/sdf -d sat # /dev/sdf [SAT], ATA device
/dev/sdg -d sat # /dev/sdg [SAT], ATA device
/dev/sdh -d sat # /dev/sdh [SAT], ATA device
/dev/sdi -d sat # /dev/sdi [SAT], ATA device
/dev/sdj -d sat # /dev/sdj [SAT], ATA device

and here is missed the last one! the 9th usb-connected drive.

the cmd smartctl -a /dev/sdk -d sat
works well and print out that drive information.

so I think here is still an bug!

comment:13 Changed 8 years ago by Christian Franke

This is unrelated to USB. Device scanning on Windows checks only the first 10 drives.

comment:14 Changed 8 years ago by frankhartung

I think on servers it is not so less times that the server having more than 10 drives.

is it possible (maybe with parameter) to force a check for all existing ?!

Note: See TracTickets for help on using tickets.