Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Is a drive USB, IDE or SCSI?

by Intrepid (Deacon)
on Dec 17, 2005 at 14:28 UTC ( #517488=note: print w/ replies, xml ) Need Help??


in reply to Is a drive USB, IDE or SCSI?

slloyd introduced the following query to the Monks:

Is there a way to determine a particular drive's InterfaceType
(USB,IDE or SCSI)? Using Win32::API, I can call GetDriveType to
tell if it is a fixed drive, cd-rom drive, etc but I need a way to
determine whether the drive is USB, IDE, or SCSI. Any ideas?

The resulting discussion provided much excellent material for further work. The only thing I have to add may sound pedantic (especially since my writing style is pedantic) but future readers may benefit.

There is confusion of terminology with regards to this discussion that if cleaned up might provide better cluage.

  • filesystems live on partitions.
  • partitions live on drives (disks, storage devices)
  • disks can (and often do) have more than one partition
  • filesystems can be single-rooted, as in UNIX, or
    multi-rooted, as in MacOS or MS Windows.
  • if we are discussing a multi-rooted filesystem OS type,
    then the roots of each are named as "volumes", like a
    literary work divided over multiple bindings comes in
    volumes.
  • only disks have interface types. An interface only exists
    where there is hardware, or at least an emulation of hw.
  • disks are not volumes and volumes are not disks, except
    in Microsoft Land, where all terminology is vague and
    fuzzy and nothing means what it does to the rest of
    the computing world.

OK, that last point was a bit overstated ;-). But it is really true that Microsoft has done a lot to make learning computer technology harder by its bad habits and marketing-department-driven babble. Case in point: it chose very unwisely to often call volumes "drives" ("C:" drive, "D:" drive) when "hard disk drive" and "floppy disk drive" were already terms that meant something different. (If historians know something I don't: that this usage was something that someone else had already done before Microsoft, then I reply that anyway, Microsoft ought to have rejected it, not perpetuated it.)

So the original question now reads (with proper substitutions made):

Is there a way to determine a particular volume's InterfaceType
(USB,IDE or SCSI)? Using Win32::API
and it can be readily seen from matching that against the "bullets of truth" above that it's not a question that makes fully valid sense, since volumes do not have interfaces, only drives do (volumes are divisions of multirooted filesystems, filesystems live on partitions, parititions live on [disk] drives ...); in fact it is several steps away from making valid sense.

The quick wits will be so annoyed by now that I'm sure I won't be acquiring extra downvotes by spelling out the correct question for the sake of those slower to pick up on the concept:

"Is there a way to determine the interface type of the disk device which a particular Microsoft filesystem volume exists on?"


Comment on Re: Is a drive USB, IDE or SCSI?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://517488]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-12-18 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (48 votes), past polls