I Have a minifilter driver where I want to block access to an eSATA drive.
How can I identify an eSATA drive as a Removable media/drive ?
In my InstanceSetup callback, I retrieve the volume properties (FltGetVolumeProperties), but the Device Characteristics does not have the FILE_REMOVABLE_MEDIA flag set.
I also try issuing the IOCTL_STORAGE_GET_HOTPLUG_INFO ioctl, but is does not show as hot pluggable. However this works for USB.
I also tired IOCTL_STORAGE_GET_MEDIA_TYPES and IRP_MN_QUERY_CAPABILITIES ioctls on by volume object but they all seem to fail.
“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd… >>How can I identify an eSATA drive as a Removable media/drive ? > > On pre-Win7, you just plain cannot.
Maybe by “optimize for fast removal” setting? – pa
> And even on Win7 you cannot, if the SATA-to-eSATA internal cable was used > to connect to the non-eSATA controller. > > – > Maxim S. Shatskih > Windows DDK MVP > xxxxx@storagecraft.com > http://www.storagecraft.com > >
I see what you mean. WinXP does not provide an option to safely remove the device.
On Win7 I have this option. So how can I detect it on Win7 ?
It’s fine if I can’t determine it as eSATA, all I need is a way to figure out that it’s a removable device.
That IOCTL is telling you whether the media is removable. It isn’t because SSD media cannot be ejected from the device. What you really want to do in this case is check whether the device is removable.
Have you looked at the utility libraries from the HBA manufacturer? For instance, using the LSI provided software and libraries for MegaRaid and 3Ware, from user mode, you can interrogate a given device for any piece of information that you want.
Gary G. Little
----- Original Message -----
From: “sarin sumit” To: “Windows File Systems Devs Interest List” Sent: Wednesday, March 30, 2011 2:01:49 AM Subject: RE:[ntfsd] How to detect an eSATA drive
>> What you really want to do in this case is check whether the device is removable.
How do I do this ?
I have already tried the IOCTL_STORAGE_GET_HOTPLUG_INFO. Is there another IOCTL ?
I see that in device manager, the “Safe Removal Required” property is set to TRUE for my disk. Is there a way I could query this in the mini filter ?
My my, now THAT is a succinct answer. Why? Actually, that’s to bad.
I’m currently working on a diagnostic application that provides full control of all RAIDs in Server 2003, including performing diagnostic testing, starting/stopping, and removing/inserting individual disks within an array, and ALL of this from user mode. I’m just beginning the task, but already I’ve determined everything you’ve been asking for by simply sending requests to a MegaRAID controller using the supplied software development kit provided by the HBA OEM. The point is that using such resources is a cheap way to have more control over storage than relying on what is provided by this mythical “native OS” .
Gary G. Little
----- Original Message -----
From: “sarin sumit” To: “Windows File Systems Devs Interest List” Sent: Thursday, March 31, 2011 12:04:15 AM Subject: RE:[ntfsd] How to detect an eSATA drive
>> Have you looked at the utility libraries from the HBA manufacturer…
I need a solution using native OS. Cannot depend on third party libraries.