Virtual disk driver

Hello,

I need to implement a virtual disk driver. I should be able
to mount a file/bunch of files as a read only disk on the fly, use it and
then
remove it .
So far whatever I’ve been reading on the lists, it seems like there are
two approaches to this -
One is the Microsoft RAM disk driver approach. Another one is SCSI
Miniport approach. I already have a working prototype of RAM disk
approach - which has been working fine (so far).
Is this the correct way? Or should I be going the SCSI miniport way ?

My main concern is that the disk should be mounted as read-only (including
on Win2K).

I do not know much about SCSI Miniport’s but what would be a better approach
in this case ?

Any help would be great.

Thanks,

  • Gary.

If you’re just building this so applications can use it then the ramdisk
approach should work fine.

If you want to boot from it or page to it (and since it’s readonly I’ll
guess you don’t) or build dynamic volumes out of it, etc… then you’d
need to go with the miniport approach.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Brown
Sent: Wednesday, August 10, 2005 7:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual disk driver

Hello,

I need to implement a virtual disk driver. I should be able to mount a
file/bunch of files as a read only disk on the fly, use it and then
remove it .
So far whatever I’ve been reading on the lists, it seems like there are
two approaches to this - One is the Microsoft RAM disk driver approach.
Another one is SCSI Miniport approach. I already have a working
prototype of RAM disk approach - which has been working fine (so far).
Is this the correct way? Or should I be going the SCSI miniport way ?

My main concern is that the disk should be mounted as read-only
(including on Win2K).

I do not know much about SCSI Miniport’s but what would be a better
approach in this case ?

Any help would be great.

Thanks,

  • Gary.

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> I need to implement a virtual disk driver.
Have you checked Bo Branten’s sample?
It is a “drive-in-file” thing, which easily extends to drive-in-files" or
whatever.
It comes with the source and is downloadable from many sites.

Regards,
Alex Shvedov

----- Original Message -----
From: “Gary Brown”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 10, 2005 10:40 AM
Subject: [ntdev] Virtual disk driver

> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only (including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Please, how many times do we have to remind people that Bo stole that code.
Check the archives of any of the lists for the details.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

“xxxxx@Home” wrote in message news:xxxxx@ntdev…
>> I need to implement a virtual disk driver.
> Have you checked Bo Branten’s sample?
> It is a “drive-in-file” thing, which easily extends to drive-in-files" or
> whatever.
> It comes with the source and is downloadable from many sites.
>
> Regards,
> Alex Shvedov
>
>
> ----- Original Message -----
> From: “Gary Brown”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Wednesday, August 10, 2005 10:40 AM
> Subject: [ntdev] Virtual disk driver
>
>
>> Hello,
>>
>> I need to implement a virtual disk driver. I should be able
>> to mount a file/bunch of files as a read only disk on the fly, use it and
>> then
>> remove it .
>> So far whatever I’ve been reading on the lists, it seems like there are
>> two approaches to this -
>> One is the Microsoft RAM disk driver approach. Another one is SCSI
>> Miniport approach. I already have a working prototype of RAM disk
>> approach - which has been working fine (so far).
>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>
>> My main concern is that the disk should be mounted as read-only
>> (including
>> on Win2K).
>>
>> I do not know much about SCSI Miniport’s but what would be a better
>> approach
>> in this case ?
>>
>> Any help would be great.
>>
>> Thanks,
>> - Gary.
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>
>
>

Look at the archives. SCSI Port can work, but not a mini-port. NTFS cannot
be read only under Windows 2000. That capability is only available in XP
and higher.

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only (including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>

Of course, as has been mentioned several times in this forum, it really
can’t be used for commercial products because it has a mixed provenance
(that’s a polite way of saying there are public claims that itt uses
someone else’s work product without license.)

Commercial users might very well find themselves subject to a copyright
infringement lawsuit (and if you lose a copyright infringement lawsuit
you pay actual damages, plus statutory damages, plus attorneys fees).

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Wednesday, August 10, 2005 12:21 PM
To: ntdev redirect
Subject: Re: [ntdev] Virtual disk driver

I need to implement a virtual disk driver.
Have you checked Bo Branten’s sample?
It is a “drive-in-file” thing, which easily extends to drive-in-files"
or
whatever.
It comes with the source and is downloadable from many sites.

Regards,
Alex Shvedov

----- Original Message -----
From: “Gary Brown”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 10, 2005 10:40 AM
Subject: [ntdev] Virtual disk driver

> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it
and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
(including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Please, how many times do we have to remind people that Bo stole that

code. Check the archives of any of the lists for the details.
Oops!
Actually, googling on “branten stole code” brought exactly one
reference, to http://www.osronline.com/lists_archive/ntfsd/thread2309.html.

At the same time note that the code is listed as Bo’s on many sites.

Well then, thank you, Jamey Kirby, for the good sample
I personally learned a lot from.

Regards,
Alex Shvedov

----- Original Message -----
From: “Don Burn”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 10, 2005 12:23 PM
Subject: Re:[ntdev] Virtual disk driver

> Please, how many times do we have to remind people that Bo stole that
> code. Check the archives of any of the lists for the details.
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
> “xxxxx@Home” wrote in message news:xxxxx@ntdev…
>>> I need to implement a virtual disk driver.
>> Have you checked Bo Branten’s sample?
>> It is a “drive-in-file” thing, which easily extends to drive-in-files" or
>> whatever.
>> It comes with the source and is downloadable from many sites.
>>
>> Regards,
>> Alex Shvedov
>>
>>
>> ----- Original Message -----
>> From: “Gary Brown”
>> Newsgroups: ntdev
>> To: “Windows System Software Devs Interest List”
>> Sent: Wednesday, August 10, 2005 10:40 AM
>> Subject: [ntdev] Virtual disk driver
>>
>>
>>> Hello,
>>>
>>> I need to implement a virtual disk driver. I should be able
>>> to mount a file/bunch of files as a read only disk on the fly, use it
>>> and
>>> then
>>> remove it .
>>> So far whatever I’ve been reading on the lists, it seems like there are
>>> two approaches to this -
>>> One is the Microsoft RAM disk driver approach. Another one is SCSI
>>> Miniport approach. I already have a working prototype of RAM disk
>>> approach - which has been working fine (so far).
>>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>>
>>> My main concern is that the disk should be mounted as read-only
>>> (including
>>> on Win2K).
>>>
>>> I do not know much about SCSI Miniport’s but what would be a better
>>> approach
>>> in this case ?
>>>
>>> Any help would be great.
>>>
>>> Thanks,
>>> - Gary.
>>>
>>>
>>>
>>> —
>>> Questions? First check the Kernel Driver FAQ at
>>> http://www.osronline.com/article.cfm?id=256
>>>
>>> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>
>>
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Grab a copy of Rocket Division Software StarPort SDK or StorageCraft VSPORT
(if they still have rights to sell it)
or whatever OSR call their virtial storage toolkit (never seen so cannot
comment). Your both listed approaches
are absolutely morbid. Try to search newsgroups and this list archives to
get WHY.

P.S. Somebody mentioned using iSCSIprt some time ago but I don’t like this
way - your software should not rely on any
MS add-ons to work properly.

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Brown
Sent: Wednesday, August 10, 2005 5:41 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual disk driver

Hello,

I need to implement a virtual disk driver. I should be able to mount a
file/bunch of files as a read only disk on the fly, use it and then remove
it .
So far whatever I’ve been reading on the lists, it seems like there are two
approaches to this - One is the Microsoft RAM disk driver approach. Another
one is SCSI Miniport approach. I already have a working prototype of RAM
disk approach - which has been working fine (so far).
Is this the correct way? Or should I be going the SCSI miniport way ?

My main concern is that the disk should be mounted as read-only (including
on Win2K).

I do not know much about SCSI Miniport’s but what would be a better approach
in this case ?

Any help would be great.

Thanks,

  • Gary.

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@voliacable.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

You need to cache writes (either in RAM or on container hard disk, maybe
both in multilevel cache) and discard them after volume unmount.
Such an approach would work with any file system and any operating system
(if you’d be lucky to share your hard disk volume in a clustered
environment).

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David J. Craig
Sent: Wednesday, August 10, 2005 7:28 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

Look at the archives. SCSI Port can work, but not a mini-port. NTFS cannot
be read only under Windows 2000. That capability is only available in XP
and higher.

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able to mount a
> file/bunch of files as a read only disk on the fly, use it and then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
> are two approaches to this - One is the Microsoft RAM disk driver
> approach. Another one is SCSI Miniport approach. I already have a
> working prototype of RAM disk approach - which has been working fine
> (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
> (including on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@voliacable.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

To resolve the removal problem, try trashing the volume serial number in the
VPB after you dismount the file; set it to all zeros or all foxes. I have no
idea if this will work, it is only a suggestion to try.

I do not know what Bo’s unauthorized version of my code does now, so I can
not be more specific.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Wednesday, August 10, 2005 10:36 AM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Virtual disk driver

Please, how many times do we have to remind people that Bo stole that
code. Check the archives of any of the lists for the details.
Oops!
Actually, googling on “branten stole code” brought exactly one
reference, to http://www.osronline.com/lists_archive/ntfsd/thread2309.html.

At the same time note that the code is listed as Bo’s on many sites.

Well then, thank you, Jamey Kirby, for the good sample
I personally learned a lot from.

Regards,
Alex Shvedov

----- Original Message -----
From: “Don Burn”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 10, 2005 12:23 PM
Subject: Re:[ntdev] Virtual disk driver

> Please, how many times do we have to remind people that Bo stole that
> code. Check the archives of any of the lists for the details.
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
> “xxxxx@Home” wrote in message news:xxxxx@ntdev…
>>> I need to implement a virtual disk driver.
>> Have you checked Bo Branten’s sample?
>> It is a “drive-in-file” thing, which easily extends to drive-in-files" or

>> whatever.
>> It comes with the source and is downloadable from many sites.
>>
>> Regards,
>> Alex Shvedov
>>
>>
>> ----- Original Message -----
>> From: “Gary Brown”
>> Newsgroups: ntdev
>> To: “Windows System Software Devs Interest List”
>> Sent: Wednesday, August 10, 2005 10:40 AM
>> Subject: [ntdev] Virtual disk driver
>>
>>
>>> Hello,
>>>
>>> I need to implement a virtual disk driver. I should be able
>>> to mount a file/bunch of files as a read only disk on the fly, use it
>>> and
>>> then
>>> remove it .
>>> So far whatever I’ve been reading on the lists, it seems like there are
>>> two approaches to this -
>>> One is the Microsoft RAM disk driver approach. Another one is SCSI
>>> Miniport approach. I already have a working prototype of RAM disk
>>> approach - which has been working fine (so far).
>>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>>
>>> My main concern is that the disk should be mounted as read-only
>>> (including
>>> on Win2K).
>>>
>>> I do not know much about SCSI Miniport’s but what would be a better
>>> approach
>>> in this case ?
>>>
>>> Any help would be great.
>>>
>>> Thanks,
>>> - Gary.
>>>
>>>
>>>
>>> —
>>> Questions? First check the Kernel Driver FAQ at
>>> http://www.osronline.com/article.cfm?id=256
>>>
>>> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>
>>
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@bellsouth.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@rocketdivision.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

NOD32 1.1190 (20050809) Information

This message was checked by NOD32 antivirus system.
http://www.eset.com

In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport
approaches are good. The first one is not PnP compatible, the second one
seems too complicated/expensive. I would create a virtual PDO then loaded a
lower filter that does all the job. A virtual disk is the simplest thing to
do, once you have PDO.

http://www.cristalink.com

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only (including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>

Did you ever manage to have WORKING solution using low bus filter or is it
just your idea?

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 11:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport
approaches are good. The first one is not PnP compatible, the second one
seems too complicated/expensive. I would create a virtual PDO then loaded a
lower filter that does all the job. A virtual disk is the simplest thing to
do, once you have PDO.

http://www.cristalink.com

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able to mount a
> file/bunch of files as a read only disk on the fly, use it and then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
> are two approaches to this - One is the Microsoft RAM disk driver
> approach. Another one is SCSI Miniport approach. I already have a
> working prototype of RAM disk approach - which has been working fine
> (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
> (including on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@voliacable.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Well I disagree. The scsiport/miniport model is easy to implement and
well defined in terms of what functionality the virtual disk target has
to support - it has to support a small set of precisely defined SRB/CBD
requests. The huge barrier to implementation has been that scsiport
itself is just not architected to support this at all and the
implementer has to go commit horrible hacks to get around the interface
and the stupid timer limitation. If the iSCSI stuff is a usable port
model I think it is definitely the way to go.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport

approaches are good. The first one is not PnP compatible, the second one

seems too complicated/expensive. I would create a virtual PDO then
loaded a
lower filter that does all the job. A virtual disk is the simplest thing
to
do, once you have PDO.

http://www.cristalink.com

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it
and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
(including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> Did you ever manage to have WORKING solution using low bus filter or is it

just your idea?

Oops… Sorry, it was just my humble silly idea…

Did I mention a BUS filter? I think I said a filter for a virtual device
PDO. I have done a lot of successful virtual device drivers with this
approach. If you took the job to follow the link at the bottom of my post,
you’d see a few of them.

Buy the way, Anton, I think I mention your software on my website. You could
be more polite.

http://www.cristalink.com

“Anton Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> Did you ever manage to have WORKING solution using low bus filter or is it
> just your idea?
>
> Regards,
> Kolomyeytsev
>
> CEO, Rocket Division Software
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
> Sent: Wednesday, August 10, 2005 11:07 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual disk driver
>
> In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport
> approaches are good. The first one is not PnP compatible, the second one
> seems too complicated/expensive. I would create a virtual PDO then loaded
> a
> lower filter that does all the job. A virtual disk is the simplest thing
> to
> do, once you have PDO.
> –
> http://www.cristalink.com
>
>
> “Gary Brown” wrote in message
> news:xxxxx@ntdev…
>> Hello,
>>
>> I need to implement a virtual disk driver. I should be able to mount a
>> file/bunch of files as a read only disk on the fly, use it and then
>> remove it .
>> So far whatever I’ve been reading on the lists, it seems like there
>> are two approaches to this - One is the Microsoft RAM disk driver
>> approach. Another one is SCSI Miniport approach. I already have a
>> working prototype of RAM disk approach - which has been working fine
>> (so far).
>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>
>> My main concern is that the disk should be mounted as read-only
>> (including on Win2K).
>>
>> I do not know much about SCSI Miniport’s but what would be a better
>> approach in this case ?
>>
>> Any help would be great.
>>
>> Thanks,
>> - Gary.
>>
>>
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@voliacable.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Mark, could you explain. You say:

"The scsiport/miniport model is easy to implement "
"The huge barrier … that scsiport… itself is just not architected… has
to go commit horrible hacks "

So is scsiport/miniport an easy approach or not? Is it easy to get the
miniport loaded for a virtual device? Is the miniport model designed to
support anything not explicitly exported by scsiport?

Thanks

<driver, which is a dynamic-link library (DLL), and calls ONLY the port
driver’s ScsiPortXxx routines to communicate with the system and its HBA>>
I think there was some discussion about undocumented approaches somewhere on
this forum… :slight_smile:


http://www.cristalink.com

“Roddy, Mark” wrote in message news:xxxxx@ntdev…
Well I disagree. The scsiport/miniport model is easy to implement and
well defined in terms of what functionality the virtual disk target has
to support - it has to support a small set of precisely defined SRB/CBD
requests. The huge barrier to implementation has been that scsiport
itself is just not architected to support this at all and the
implementer has to go commit horrible hacks to get around the interface
and the stupid timer limitation. If the iSCSI stuff is a usable port
model I think it is definitely the way to go.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport

approaches are good. The first one is not PnP compatible, the second one

seems too complicated/expensive. I would create a virtual PDO then
loaded a
lower filter that does all the job. A virtual disk is the simplest thing
to
do, once you have PDO.

http://www.cristalink.com

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it
and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
(including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Sorry if my question sounded rude - I did not mean it honestly! English is
not native for me… I have been experimenting with filter
approach a couple of times (first time with a classic SCSI filter at NT 4.0
times) and never had to have anything really
WORKING. That’s why I was interested to hear - was it me stupid or it’s
really too long way to follow (compared with monolithic
SCSI port or so).

Regards,
Anton Kolomyeytsev

CEO, Rocket Division Software

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 11:45 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

Did you ever manage to have WORKING solution using low bus filter or
is it just your idea?

Oops… Sorry, it was just my humble silly idea…

Did I mention a BUS filter? I think I said a filter for a virtual device
PDO. I have done a lot of successful virtual device drivers with this
approach. If you took the job to follow the link at the bottom of my post,
you’d see a few of them.

Buy the way, Anton, I think I mention your software on my website. You could
be more polite.

http://www.cristalink.com

“Anton Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> Did you ever manage to have WORKING solution using low bus filter or is it
> just your idea?
>
> Regards,
> Kolomyeytsev
>
> CEO, Rocket Division Software
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
> Sent: Wednesday, August 10, 2005 11:07 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual disk driver
>
> In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport
> approaches are good. The first one is not PnP compatible, the second one
> seems too complicated/expensive. I would create a virtual PDO then loaded
> a
> lower filter that does all the job. A virtual disk is the simplest thing
> to
> do, once you have PDO.
> –
> http://www.cristalink.com
>
>
> “Gary Brown” wrote in message
> news:xxxxx@ntdev…
>> Hello,
>>
>> I need to implement a virtual disk driver. I should be able to mount a
>> file/bunch of files as a read only disk on the fly, use it and then
>> remove it .
>> So far whatever I’ve been reading on the lists, it seems like there
>> are two approaches to this - One is the Microsoft RAM disk driver
>> approach. Another one is SCSI Miniport approach. I already have a
>> working prototype of RAM disk approach - which has been working fine
>> (so far).
>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>
>> My main concern is that the disk should be mounted as read-only
>> (including on Win2K).
>>
>> I do not know much about SCSI Miniport’s but what would be a better
>> approach in this case ?
>>
>> Any help would be great.
>>
>> Thanks,
>> - Gary.
>>
>>
>>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@voliacable.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@voliacable.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> precisely defined SRB/CBD requests.
I tried to find out what are the two [undocumented] Srb->Function
values of 0xc8 (and - not sure about this one though - 0xc1) are and failed.
Any idea what they are?

Regards,
Alex Shvedov

----- Original Message -----
From: “Roddy, Mark”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, August 10, 2005 4:29 PM
Subject: RE: [ntdev] Virtual disk driver

Well I disagree. The scsiport/miniport model is easy to implement and
well defined in terms of what functionality the virtual disk target has
to support - it has to support a small set of precisely defined SRB/CBD
requests. The huge barrier to implementation has been that scsiport
itself is just not architected to support this at all and the
implementer has to go commit horrible hacks to get around the interface
and the stupid timer limitation. If the iSCSI stuff is a usable port
model I think it is definitely the way to go.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 4:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport

approaches are good. The first one is not PnP compatible, the second one

seems too complicated/expensive. I would create a virtual PDO then
loaded a
lower filter that does all the job. A virtual disk is the simplest thing
to
do, once you have PDO.

http://www.cristalink.com

“Gary Brown” wrote in message
news:xxxxx@ntdev…
> Hello,
>
> I need to implement a virtual disk driver. I should be able
> to mount a file/bunch of files as a read only disk on the fly, use it
and
> then
> remove it .
> So far whatever I’ve been reading on the lists, it seems like there
are
> two approaches to this -
> One is the Microsoft RAM disk driver approach. Another one is SCSI
> Miniport approach. I already have a working prototype of RAM disk
> approach - which has been working fine (so far).
> Is this the correct way? Or should I be going the SCSI miniport way ?
>
> My main concern is that the disk should be mounted as read-only
(including
> on Win2K).
>
> I do not know much about SCSI Miniport’s but what would be a better
> approach
> in this case ?
>
> Any help would be great.
>
> Thanks,
> - Gary.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Once I was considering a way to go with virtual devices. I found that
scsiport/miniport/busdriver are too complicated. The PDO/lowerfilter pair is
by far simpler. There is a couple of disadvantages, though.

  • A bus driver allows to create/delete PDOs on the fly. This is also
    possible with a stand-alone PDO, but not that simple. On the other hand, we
    need to somehow create a PDO for the bus driver in the first place and write
    the function bus driver. If we only need a single virtual device which is
    present all the time from the system startup, then the bus driver is
    overkill.

  • scsiport/miniport is essentially the same as the bus driver, but even more
    complicated. The only advantage is, it’s compatible with stupid legacy
    applications which read DEVICEMAP then try to address a device via the
    scsiport with port/path/lun/target.


http://www.cristalink.com

“Anton Kolomyeytsev” wrote in message
news:xxxxx@ntdev…
> Sorry if my question sounded rude - I did not mean it honestly! English is
> not native for me… I have been experimenting with filter
> approach a couple of times (first time with a classic SCSI filter at NT
> 4.0
> times) and never had to have anything really
> WORKING. That’s why I was interested to hear - was it me stupid or it’s
> really too long way to follow (compared with monolithic
> SCSI port or so).
>
> Regards,
> Anton Kolomyeytsev
>
> CEO, Rocket Division Software
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
> Sent: Wednesday, August 10, 2005 11:45 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual disk driver
>
>> Did you ever manage to have WORKING solution using low bus filter or
>> is it just your idea?
>
> Oops… Sorry, it was just my humble silly idea…
>
> Did I mention a BUS filter? I think I said a filter for a virtual device
> PDO. I have done a lot of successful virtual device drivers with this
> approach. If you took the job to follow the link at the bottom of my post,
> you’d see a few of them.
>
> Buy the way, Anton, I think I mention your software on my website. You
> could
> be more polite.
> –
> http://www.cristalink.com
>
>
> “Anton Kolomyeytsev” wrote in message
> news:xxxxx@ntdev…
>> Did you ever manage to have WORKING solution using low bus filter or is
>> it
>> just your idea?
>>
>> Regards,
>> Kolomyeytsev
>>
>> CEO, Rocket Division Software
>>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
>> Sent: Wednesday, August 10, 2005 11:07 PM
>> To: Windows System Software Devs Interest List
>> Subject: Re:[ntdev] Virtual disk driver
>>
>> In my humble opinion, neither Microsoft’s ramdisk nor SCSI port/miniport
>> approaches are good. The first one is not PnP compatible, the second one
>> seems too complicated/expensive. I would create a virtual PDO then loaded
>> a
>> lower filter that does all the job. A virtual disk is the simplest thing
>> to
>> do, once you have PDO.
>> –
>> http://www.cristalink.com
>>
>>
>> “Gary Brown” wrote in message
>> news:xxxxx@ntdev…
>>> Hello,
>>>
>>> I need to implement a virtual disk driver. I should be able to mount a
>>> file/bunch of files as a read only disk on the fly, use it and then
>>> remove it .
>>> So far whatever I’ve been reading on the lists, it seems like there
>>> are two approaches to this - One is the Microsoft RAM disk driver
>>> approach. Another one is SCSI Miniport approach. I already have a
>>> working prototype of RAM disk approach - which has been working fine
>>> (so far).
>>> Is this the correct way? Or should I be going the SCSI miniport way ?
>>>
>>> My main concern is that the disk should be mounted as read-only
>>> (including on Win2K).
>>>
>>> I do not know much about SCSI Miniport’s but what would be a better
>>> approach in this case ?
>>>
>>> Any help would be great.
>>>
>>> Thanks,
>>> - Gary.
>>>
>>>
>>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@voliacable.com To
>> unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@voliacable.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

I mean that writing a miniport driver for a virtual disk is trivial. The
problem is that it is dog slow because of the architectural barriers in
scsiport. If the iSCSI code base, which I have not looked at in my copious
spare time, presents a similar port driver structure into which one can
easily insert a virtual disk target module without the stupid scsiport
problems, that would be ideal.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
Sent: Wednesday, August 10, 2005 5:01 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Virtual disk driver

Mark, could you explain. You say:

"The scsiport/miniport model is easy to implement "
"The huge barrier … that scsiport… itself is just not
architected… has to go commit horrible hacks "

So is scsiport/miniport an easy approach or not? Is it easy
to get the miniport loaded for a virtual device? Is the
miniport model designed to support anything not explicitly
exported by scsiport?

Thanks

<> SCSI port driver, which is a dynamic-link library (DLL), and
> calls ONLY the port driver’s ScsiPortXxx routines to
> communicate with the system and its HBA>> I think there was
> some discussion about undocumented approaches somewhere on
> this forum… :slight_smile:
>
> –
> http://www.cristalink.com
>
>
> “Roddy, Mark” wrote in message
> news:xxxxx@ntdev…
> Well I disagree. The scsiport/miniport model is easy to implement and
> well defined in terms of what functionality the virtual disk
> target has
> to support - it has to support a small set of precisely
> defined SRB/CBD
> requests. The huge barrier to implementation has been that scsiport
> itself is just not architected to support this at all and the
> implementer has to go commit horrible hacks to get around the
> interface
> and the stupid timer limitation. If the iSCSI stuff is a usable port
> model I think it is definitely the way to go.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of cristalink
> Sent: Wednesday, August 10, 2005 4:07 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] Virtual disk driver
>
> In my humble opinion, neither Microsoft’s ramdisk nor SCSI
> port/miniport
>
> approaches are good. The first one is not PnP compatible, the
> second one
>
> seems too complicated/expensive. I would create a virtual PDO then
> loaded a
> lower filter that does all the job. A virtual disk is the
> simplest thing
> to
> do, once you have PDO.
> –
> http://www.cristalink.com
>
>
> “Gary Brown” wrote in message
> news:xxxxx@ntdev…
> > Hello,
> >
> > I need to implement a virtual disk driver. I should be able
> > to mount a file/bunch of files as a read only disk on the
> fly, use it
> and
> > then
> > remove it .
> > So far whatever I’ve been reading on the lists, it seems like there
> are
> > two approaches to this -
> > One is the Microsoft RAM disk driver approach. Another one is SCSI
> > Miniport approach. I already have a working prototype of RAM disk
> > approach - which has been working fine (so far).
> > Is this the correct way? Or should I be going the SCSI
> miniport way ?
> >
> > My main concern is that the disk should be mounted as read-only
> (including
> > on Win2K).
> >
> > I do not know much about SCSI Miniport’s but what would be a better
> > approach
> > in this case ?
> >
> > Any help would be great.
> >
> > Thanks,
> > - Gary.
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Thanks everyone for your inputs.

> If you want to boot from it or page to it (and since it’s readonly I’ll
> guess you don’t) or build dynamic volumes out of it, etc… then you’d
> need to go with the miniport approach.

I dont want to boot from it. Its just a drive with consistent data available
when u want it -
more like a snapshot volume.

Lemme go down this route and see how things work out. I am anyways new to
drivers, and the look of SCSI miniport drivers scares me.

  • Gary.

“Peter Wieland” wrote in message
news:xxxxx@ntdev…
If you’re just building this so applications can use it then the ramdisk
approach should work fine.

If you want to boot from it or page to it (and since it’s readonly I’ll
guess you don’t) or build dynamic volumes out of it, etc… then you’d
need to go with the miniport approach.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Brown
Sent: Wednesday, August 10, 2005 7:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Virtual disk driver

Hello,

I need to implement a virtual disk driver. I should be able to mount a
file/bunch of files as a read only disk on the fly, use it and then
remove it .
So far whatever I’ve been reading on the lists, it seems like there are
two approaches to this - One is the Microsoft RAM disk driver approach.
Another one is SCSI Miniport approach. I already have a working
prototype of RAM disk approach - which has been working fine (so far).
Is this the correct way? Or should I be going the SCSI miniport way ?

My main concern is that the disk should be mounted as read-only
(including on Win2K).

I do not know much about SCSI Miniport’s but what would be a better
approach in this case ?

Any help would be great.

Thanks,
- Gary.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com