On Wed, 09 Jun 2010 20:44:19 +0200
Christian Franke <Christian.Franke@...> wrote:
> > For linux, it would be:
> > /dev/sda auto
> > /dev/twa0 3ware,0
> > /dev/twa0 3ware,1
> It wouldn't, there is no 3ware scan on Linux.
Yes, of course, I just got carried away there. :)
> Very good idea. A patch is attached. Usage and man page text are still
> smartctl [-d TYPE] --scan[-open]
> --scan scans devices [for only one TYPE] and prints each name and type
> --scan-open also opens each device (which may change the TYPE).
> Please test if possible.
Huge thanks for such a quick reaction!
I tested it under Linux and WinXP (in vmware), looks good.
A couple of things I noticed though:
Under Linux, I get:
# ./smartctl --scan-open
glob(3) found no matches for pattern /dev/sd[a-c][a-z]
/dev/hdc -d ata [ATA] (opened)
/dev/hdd -d ata [ATA] (opened)
/dev/sda [SAT] -d sat [ATA] (opened)
/dev/sdb [SAT] -d sat [ATA] (opened)
Is the glob(3) line some kind of unintentional debug output, or is it supposed
to be that way?
What is the difference between the two types on the same line - [SAT] and
[ATA]? Maybe it's better to move [SAT] to the end and explicitly say what
it represents, to avoid confusion? Right now one can only guess what
each of them means.
Also, I'm not quite sure why my SATA drives are detected as SAT, the
man page says to use "-d ata", but "-d sat" also seems to work.
I don't have a hardware RAID controller at hand, so could you please
tell me if each occupied port would be printed on a separate line?
Can you give me a rough example of --scan and --scan-open output
for, say, a 3ware controller with 2 drives? I would really appreciate it
(for future GSmartControl parsing).
I guess smartctl also ignores the flash drives under Windows, right?
I don't have a removable hard drive at hand, but a usb flash drive
wasn't printed (even though it has its \\.\PhysicalDrive2 entry).
I haven't tested it on any other OSes yet, but I guess it all boils down to
what DEVICESCAN supports, so I don't think there will be any surprises
Thanks again for doing this, this feature will certainly help GSmartControl
broaden its hardware/OS support.