I have a disk (special disk) on which only WRITEs are allowed but no READs.
When I export this disk to Windows, OS is able to detect the disk. OS shows
the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it
gives an error, “The request could not be performed because of an I/O device
error”. I see that OS tries to do READs (seen on the SCSI target side) which
would fail in this case.
Questions:
-
Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys)
for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
-
This Disk shows as “Offline”. Can I do WRITE IO on such a disk from
driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able
to do WRITE IO on a regular disk (that supports both READ and WRITE) after
making it “Offline”.
-
Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI
Standard Inquiry information) like Vendor Id, Product Id, lun number
(obtained by other SCSI command) from driver and vice-versa. What is the API
or IOCTL for getting this?
Thanks,
Sunil
Sunil Patil wrote:
I have a disk (special disk) on which only WRITEs are allowed but no
READs. When I export this disk to Windows, OS is able to detect the
disk. OS shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try
to bring it online, it gives an error, “The request could not be
performed because of an I/O device error”. I see that OS tries to do
READs (seen on the SCSI target side) which would fail in this case.
Not surprising. Windows wants to load a file system driver on top of
your disk, and there is no such thing as a “write-only” file system.
How had you planned to access this disk in a running system?
You may have to put this in a custom device class so that it is not seen
as a disk, and write your own custom interface.
able to see disk in “Disk Mgmt”
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
>When I try to bring it online, it gives an error, “The request could not be performed because of an >I/O device error”. I see that OS tries to do READs (seen on the SCSI target side) which would fail >in this case.
You must allow Read I/O if you using standard disk class driver. Disk.sys always reads sector 0 to get some information during initialization of disk. The only solution to avoid it is to use your disk class driver. WDK contains sample of disk class driver which you could use a source.
Igor Sharovar
That is not the only solution. Another solution is to provide enough read
support, through a filter driver to convince windows that this is a disk
with a non-standard partition format. That would be a bit less work than
re-implementing disk.sys and diverting this particular disk to that new
class driver.
Mark Roddy
On Fri, Sep 24, 2010 at 6:47 PM, wrote:
> >When I try to bring it online, it gives an error, “The request could not
> be performed because of an >I/O device error”. I see that OS tries to do
> READs (seen on the SCSI target side) which would fail >in this case.
> You must allow Read I/O if you using standard disk class driver. Disk.sys
> always reads sector 0 to get some information during initialization of disk.
> The only solution to avoid it is to use your disk class driver. WDK contains
> sample of disk class driver which you could use a source.
>
> Igor Sharovar
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> Another solution is to provide enough read support, through a filter driver to convince windows >that this is a disk with a non-standard partition format.
Yes, a lower class driver could that but this stuff could be also implemented in a disk driver.
Igor Sharovar
OK, I’ll bite …
What is the point of having a “write-only” disk drive? Data goes in … but it doesn’t come out. That doesn’t seem like a very useful storage device to me. But then again, you did say it was “special”, so maybe there are other details you haven’t yet shared.
“Sunil Patil” wrote in message news:xxxxx@ntdev…
I have a disk (special disk) on which only WRITEs are allowed but no READs. When I export this disk to Windows, OS is able to detect the disk. OS shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it gives an error, “The request could not be performed because of an I/O device error”. I see that OS tries to do READs (seen on the SCSI target side) which would fail in this case.
Questions:
1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys) for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able to do WRITE IO on a regular disk (that supports both READ and WRITE) after making it “Offline”.
3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI Standard Inquiry information) like Vendor Id, Product Id, lun number (obtained by other SCSI command) from driver and vice-versa. What is the API or IOCTL for getting this?
Thanks,
Sunil
A favorite professor of mine in college had a 48-pin ceramic DIP (A-step lab
device) mounted in a wooden frame with a brass plate engraved with (as best
I can recall)
?Write only memory array. Tested to 256Mbits and counting ??
So this was in 1982 and that seemed like a incredibly large amount of memory
at the time as we were counting memory arrays as big in the 256Kbit range.
But the joke was on the students who actually asked him how they designed
such a thing ? He would remark that not only was the size amazing but
that it did not require power to maintain the data stored in it.
Engineering humor has never been likely to make it to HBO?
Cheers,
Dave Cattley
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Saturday, September 25, 2010 10:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Special disk IO
OK, I’ll bite …
What is the point of having a “write-only” disk drive? Data goes in … but
it doesn’t come out. That doesn’t seem like a very useful storage device to
me. But then again, you did say it was “special”, so maybe there are other
details you haven’t yet shared.
“Sunil Patil” wrote in message news:xxxxx@ntdev…
I have a disk (special disk) on which only WRITEs are allowed but no READs.
When I export this disk to Windows, OS is able to detect the disk. OS shows
the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it
gives an error, “The request could not be performed because of an I/O device
error”. I see that OS tries to do READs (seen on the SCSI target side) which
would fail in this case.
Questions:
1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys)
for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from
driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able
to do WRITE IO on a regular disk (that supports both READ and WRITE) after
making it “Offline”.
3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI
Standard Inquiry information) like Vendor Id, Product Id, lun number
(obtained by other SCSI command) from driver and vice-versa. What is the API
or IOCTL for getting this?
Thanks,
Sunil
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Gotta agree . In 35 years in this industry I have seen a few write only
disks, but ALL were considered to be the results of bugs. The only way I can
foresee a need for this type of critter is a clandestine log where the media
is only visible to specific logins, or the media is moved to a system where
it then becomes readable, and the Overlord can then deduce the evilness that
was recorded and mete out appropriate punishment.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Saturday, September 25, 2010 8:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Special disk IO
OK, I’ll bite …
What is the point of having a “write-only” disk drive? Data goes in … but
it doesn’t come out. That doesn’t seem like a very useful storage device to
me. But then again, you did say it was “special”, so maybe there are other
details you haven’t yet shared.
“Sunil Patil” wrote in message news:xxxxx@ntdev…
I have a disk (special disk) on which only WRITEs are allowed but no READs.
When I export this disk to Windows, OS is able to detect the disk. OS shows
the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it
gives an error, “The request could not be performed because of an I/O device
error”. I see that OS tries to do READs (seen on the SCSI target side) which
would fail in this case.
Questions:
1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys)
for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from
driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able
to do WRITE IO on a regular disk (that supports both READ and WRITE) after
making it “Offline”.
3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI
Standard Inquiry information) like Vendor Id, Product Id, lun number
(obtained by other SCSI command) from driver and vice-versa. What is the API
or IOCTL for getting this?
Thanks,
Sunil
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Dave,
Interesting you mention that story, and that’s a great one.
As I wrote my note, I was actually recalling a day in class many years ago (about the same time as you) when one of my favorite profs was telling us about WOM (Write Only Memory), and I was busy taking notes. Of course, the joke was on us, and he was just messing with us. I learned that day that WOM is not very useful, and never forgot the lesson.
This disk drive would indeed be considered “special”, and I think there may be some humor there as well …
Don
“David R. Cattley” wrote in message news:xxxxx@ntdev…
A favorite professor of mine in college had a 48-pin ceramic DIP (A-step lab device) mounted in a wooden frame with a brass plate engraved with (as best I can recall)
?Write only memory array. Tested to 256Mbits and counting ??
So this was in 1982 and that seemed like a incredibly large amount of memory at the time as we were counting memory arrays as big in the 256Kbit range. But the joke was on the students who actually asked him how they designed such a thing ? He would remark that not only was the size amazing but that it did not require power to maintain the data stored in it.
Engineering humor has never been likely to make it to HBO?
Cheers,
Dave Cattley
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Saturday, September 25, 2010 10:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Special disk IO
OK, I’ll bite …
What is the point of having a “write-only” disk drive? Data goes in … but it doesn’t come out. That doesn’t seem like a very useful storage device to me. But then again, you did say it was “special”, so maybe there are other details you haven’t yet shared.
“Sunil Patil” wrote in message news:xxxxx@ntdev…
I have a disk (special disk) on which only WRITEs are allowed but no READs. When I export this disk to Windows, OS is able to detect the disk. OS shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it gives an error, “The request could not be performed because of an I/O device error”. I see that OS tries to do READs (seen on the SCSI target side) which would fail in this case.
Questions:
1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys) for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able to do WRITE IO on a regular disk (that supports both READ and WRITE) after making it “Offline”.
3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI Standard Inquiry information) like Vendor Id, Product Id, lun number (obtained by other SCSI command) from driver and vice-versa. What is the API or IOCTL for getting this?
Thanks,
Sunil
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Exactly. But if it’s not readable in the first place, then this disk drive will always be “special”, and will not be treated the same way by the OS as a regular disk drive would, so one has to wonder how useful it would be as a logging device. Oh well …
“Gary G. Little” wrote in message news:xxxxx@ntdev…
Gotta agree . In 35 years in this industry I have seen a few write only disks, but ALL were considered to be the results of bugs. The only way I can foresee a need for this type of critter is a clandestine log where the media is only visible to specific logins, or the media is moved to a system where it then becomes readable, and the Overlord can then deduce the evilness that was recorded and mete out appropriate punishment.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
Sent: Saturday, September 25, 2010 8:21 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Special disk IO
OK, I’ll bite …
What is the point of having a “write-only” disk drive? Data goes in … but it doesn’t come out. That doesn’t seem like a very useful storage device to me. But then again, you did say it was “special”, so maybe there are other details you haven’t yet shared.
“Sunil Patil” wrote in message news:xxxxx@ntdev…
I have a disk (special disk) on which only WRITEs are allowed but no READs. When I export this disk to Windows, OS is able to detect the disk. OS shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it gives an error, “The request could not be performed because of an I/O device error”. I see that OS tries to do READs (seen on the SCSI target side) which would fail in this case.
Questions:
1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys) for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able to do WRITE IO on a regular disk (that supports both READ and WRITE) after making it “Offline”.
3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI Standard Inquiry information) like Vendor Id, Product Id, lun number (obtained by other SCSI command) from driver and vice-versa. What is the API or IOCTL for getting this?
Thanks,
Sunil
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
It might be write only as a state - for example as a replication storage
device. I agree it sounds strange, but I think the OP probably has something
legitimate in mind.
Mark Roddy
On Sat, Sep 25, 2010 at 10:21 AM, Don Matthews wrote:
>
> OK, I’ll bite …
>
> What is the point of having a “write-only” disk drive? Data goes in …
> but it doesn’t come out. That doesn’t seem like a very useful storage
> device to me. But then again, you did say it was “special”, so maybe there
> are other details you haven’t yet shared.
>
>
>
> “Sunil Patil” wrote in message news:xxxxx@ntdev…
> I have a disk (special disk) on which only WRITEs are allowed but no READs.
> When I export this disk to Windows, OS is able to detect the disk. OS shows
> the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it
> gives an error, “The request could not be performed because of an I/O device
> error”. I see that OS tries to do READs (seen on the SCSI target side) which
> would fail in this case.
>
> Questions:
>
> 1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys)
> for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
>
> 2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from
> driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able
> to do WRITE IO on a regular disk (that supports both READ and WRITE) after
> making it “Offline”.
>
> 3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI
> Standard Inquiry information) like Vendor Id, Product Id, lun number
> (obtained by other SCSI command) from driver and vice-versa. What is the API
> or IOCTL for getting this?
>
> Thanks,
> Sunil
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
I know of folks who thought they had the perfect scheme with write only
disk years ago, this would allow them to “safely log actions but no one
could read them without the special hardware”. Turns out that the disk
was attacked by writing all zero’s to the whole drive.
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“Don Matthews” wrote in message
news:xxxxx@ntdev:
> Exactly. But if it’s not readable in the first place, then this disk drive will always be “special”, and will not be treated the same way by the OS as a regular disk drive would, so one has to wonder how useful it would be as a logging device. Oh well …
>
>
> “Gary G. Little” wrote in message news:xxxxx@ntdev…
> Gotta agree . In 35 years in this industry I have seen a few write only disks, but ALL were considered to be the results of bugs. The only way I can foresee a need for this type of critter is a clandestine log where the media is only visible to specific logins, or the media is moved to a system where it then becomes readable, and the Overlord can then deduce the evilness that was recorded and mete out appropriate punishment.
>
>
>
> Gary G. Little
>
> H (952) 223-1349
>
> C (952) 454-4629
>
> xxxxx@comcast.net
>
>
>
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Don Matthews
> Sent: Saturday, September 25, 2010 8:21 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Special disk IO
>
>
>
>
>
> OK, I’ll bite …
>
>
>
> What is the point of having a “write-only” disk drive? Data goes in … but it doesn’t come out. That doesn’t seem like a very useful storage device to me. But then again, you did say it was “special”, so maybe there are other details you haven’t yet shared.
>
>
>
>
>
> “Sunil Patil” wrote in message news:xxxxx@ntdev…
>
> I have a disk (special disk) on which only WRITEs are allowed but no READs. When I export this disk to Windows, OS is able to detect the disk. OS shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it online, it gives an error, “The request could not be performed because of an I/O device error”. I see that OS tries to do READs (seen on the SCSI target side) which would fail in this case.
>
> Questions:
>
> 1. Will OS (Windows) create DeviceObject (corresponding to Driver Disk.sys) for this disk? I assume Yes as I am able to see disk in “Disk Mgmt”
>
> 2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able to do WRITE IO on a regular disk (that supports both READ and WRITE) after making it “Offline”.
>
> 3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI Standard Inquiry information) like Vendor Id, Product Id, lun number (obtained by other SCSI command) from driver and vice-versa. What is the API or IOCTL for getting this?
>
> Thanks,
> Sunil
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
To make things little clear, this disk is a virtual disk which we have
exported from an iSCSI target machine (linux) where it is backed up by a
file. We intend to use this disk as a mirror of physical disk that is seen
by Windows. Since our virtual disk is a complete replica of physical disk,
OS (Windows) or Volume manager running on Windows may get confused and try
to modify disk contents (do some update/recovery). We dont want
OS/user/applications to use our disk, also we dont want OS/user/applications
to WRITE anything to our disk. Only our driver should be able to WRITE to
the virtual disk.
On Sat, Sep 25, 2010 at 9:29 PM, Don Burn wrote:
> I know of folks who thought they had the perfect scheme with write only
> disk years ago, this would allow them to “safely log actions but no one
> could read them without the special hardware”. Turns out that the disk was
> attacked by writing all zero’s to the whole drive.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
> “Don Matthews” wrote in message news:xxxxx@ntdev:
>
> Exactly. But if it’s not readable in the first place, then this disk
>> drive will always be “special”, and will not be treated the same way by the
>> OS as a regular disk drive would, so one has to wonder how useful it would
>> be as a logging device. Oh well …
>>
>>
>> “Gary G. Little” wrote in message
>> news:xxxxx@ntdev…
>> Gotta agree . In 35 years in this industry I have seen a few write only
>> disks, but ALL were considered to be the results of bugs. The only way I can
>> foresee a need for this type of critter is a clandestine log where the media
>> is only visible to specific logins, or the media is moved to a system where
>> it then becomes readable, and the Overlord can then deduce the evilness that
>> was recorded and mete out appropriate punishment.
>>
>>
>>
>> Gary G. Little
>>
>> H (952) 223-1349
>>
>> C (952) 454-4629
>>
>> xxxxx@comcast.net
>>
>>
>>
>> From: xxxxx@lists.osr.com [mailto:
>> xxxxx@lists.osr.com] On Behalf Of Don Matthews
>> Sent: Saturday, September 25, 2010 8:21 AM
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] Special disk IO
>>
>>
>>
>>
>>
>> OK, I’ll bite …
>>
>>
>>
>> What is the point of having a “write-only” disk drive? Data goes in …
>> but it doesn’t come out. That doesn’t seem like a very useful storage
>> device to me. But then again, you did say it was “special”, so maybe there
>> are other details you haven’t yet shared.
>>
>>
>>
>>
>>
>> “Sunil Patil” wrote in message news:xxxxx@ntdev.
>> …
>>
>> I have a disk (special disk) on which only WRITEs are allowed but no
>> READs. When I export this disk to Windows, OS is able to detect the disk. OS
>> shows the disk in “Disk Mgmt” (UI) as “Offline”. When I try to bring it
>> online, it gives an error, “The request could not be performed because of an
>> I/O device error”. I see that OS tries to do READs (seen on the SCSI target
>> side) which would fail in this case.
>>
>> Questions:
>>
>> 1. Will OS (Windows) create DeviceObject (corresponding to Driver
>> Disk.sys) for this disk? I assume Yes as I am able to see disk in “Disk
>> Mgmt”
>>
>> 2. This Disk shows as “Offline”. Can I do WRITE IO on such a disk from
>> driver (i.e. from filter disk driver seating on top of Disk.sys)? I was able
>> to do WRITE IO on a regular disk (that supports both READ and WRITE) after
>> making it “Offline”.
>>
>> 3. Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI
>> Standard Inquiry information) like Vendor Id, Product Id, lun number
>> (obtained by other SCSI command) from driver and vice-versa. What is the API
>> or IOCTL for getting this?
>>
>> Thanks,
>> Sunil
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>We dont want OS/user/applications to use our disk, also we dont want >OS/user/applications to WRITE anything to our disk. Only our driver should be >able to WRITE to the virtual disk.
But why do you want to prohibit any READ request to your driver?
Igor Sharovar
> We intend to use this disk as a mirror of physical disk that is seen
by Windows. Since our virtual disk is a complete replica of physical disk,
OS (Windows) or Volume manager running on Windows may get confused and try
to modify disk contents (do some update/recovery).
Since you are below the filesystem, I do not understand how you handle
integrity and consistency. More exactly, your data on your disk will
only make sense when the Windows machine is offline.
–
Aram Hăvărneanu
If it is a mirror disk then you actually have to hide it from the OS or
confusion will indeed result. There are better ways to do what the OP is
trying to do, but as I said, it is not completely silly.
Given that the OP wants this to be an offline replicant, that is he does not
want to serve reads from this disk, there really is no need to enumerate the
thing as a disk, and doing so just complicates his life. Instead it should
be enumerated as some other sort of entity, one which the OP can write his
own function driver for that exposes his own private interface, and then he
can more or less securely write replicating data to this device.
Expose it as something other than ‘disk’. Write your own function driver.
Mark Roddy
On Sat, Sep 25, 2010 at 5:10 PM, wrote:
> >We dont want OS/user/applications to use our disk, also we dont want
> >OS/user/applications to WRITE anything to our disk. Only our driver should
> be >able to WRITE to the virtual disk.
> But why do you want to prohibit any READ request to your driver?
>
> Igor Sharovar
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
I agree with Mark. OP should have simple functional driver without enumerating it as a “disk” driver. In additional to that OP should have a filter driver which would handle Read/Write requests to a “main” disk and duplicate/redirect requests to the functional driver. The filter could be install in area of interest - volume or disk.
Igor Sharovar
Thanks for your valuable inputs. This seems to be a clean approach.
Just curious to know about previous approach (though not clean), I observed
that for this virtual disk, Windows tried to READ disk contents but did not
succeed as expected (so could not detect volumes, filesystem, lable,
partition table etc), interestingly WINDOWS did not issue a single WRITE on
the disk. Does it mean that WINDOWS will never touch/WRITE on a disk if it
is unable to READ it? This is the behavior on Linux/Solaris. However in
Solaris if it is able to READ disk contents and sees conflicting labels, it
modifies/re-labels the disk, which is not desired in our case. So by
preventing READs we are potentially preventing OS from WRITING on the disk.
Does this make sense?
On Sun, Sep 26, 2010 at 4:12 AM, wrote:
> I agree with Mark. OP should have simple functional driver without
> enumerating it as a “disk” driver. In additional to that OP should have a
> filter driver which would handle Read/Write requests to a “main” disk and
> duplicate/redirect requests to the functional driver. The filter could be
> install in area of interest - volume or disk.
>
> Igor Sharovar
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
I had asked one question in my earlier mail:
- Given a Disk DeviceObject, can I obtain its SCSI properties (SCSI Standard
Inquiry information) like Vendor Id, Product Id, lun number (obtained by
other SCSI command) from driver. What is the API or IOCTL for getting this?
On Sun, Sep 26, 2010 at 4:12 AM, wrote:
> I agree with Mark. OP should have simple functional driver without
> enumerating it as a “disk” driver. In additional to that OP should have a
> filter driver which would handle Read/Write requests to a “main” disk and
> duplicate/redirect requests to the functional driver. The filter could be
> install in area of interest - volume or disk.
>
> Igor Sharovar
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>I had asked one question in my earlier mail: - Given a Disk DeviceObject, can >I obtain its SCSI properties (SCSI Standard Inquiry information) like Vendor Id, >Product Id, lun number (obtained by other SCSI command) from driver. What >is the API or IOCTL for getting this?
What kind of driver do you have? Is it a miniport driver? If it is, you likely can not send directly INQUIRE command because this command generated by a port driver. And I don’t think the port driver would allow to pass this command to the miniport driver. But you could use IOCTL_SCSI_PASS_THROUGH to get any data, including INQUIRE, from miniport driver.
Igor Sharovar