Question About Stripped/Spanned/Mirrored Volumes


quite recently, I decided to start learning WDF. I thought it would be
interesting to extend the RAMDisk sample in the WDK a little bit. I
succeeded in adding a partition support to my RAM disk driver (partmgr
as an upper filter for my devices does the trick).

For my RAM disks, my driver replaces disk.sys. That probably was not the
best solution, it would be probably better to write something like a
storage miniport. Anyway, I learned some interesting things from my

My RAM disks work pretty well also with Disk Management; it is possible
to partition them etc. The only problems are casued by
mirrored/stripped/spanned (and possibly RAID 5) volumes. For example,
when I attempt to create a stripped volume over my two RAM disks
(identical size), the volume seems to be created (Disk Management shows
that in its graphics), however, it is not possible to format it. The
same applies to mirrored volumes, howerver, when I create the mirror
rather by using “Add Mirror…” option than “New Mirror Volume” one,
everything seems to be OK.

So, my question is: what is required for disk drivers to support
mirrorred/spanned/striped/… volumes? Do I need to handle some special
IOCTLs? Do I need to create some additional symbolic links?

Best regards
Martin Dráb

Dne 3. 5. 2016 v 22:14 napsal(a):

I just tried it with a FS minifilter driver out of curiosity.
Here’s an outline of the steps I followed:

User module:

  1. hEvent = CreateEvent(L"SharedEvent")
  2. FilterSendMessage(DUMMY_IOCTL)
  3. WaitForSingleObject(hEvent)

Kernel module: (DUMMY_IOCTL handler)

  1. pEvent = IoCreateNotificationEvent(L"\BaseNamedObjects\SharedEvent");
  2. ObReferenceObject(pEvent);

And then
KeSetEvent(pEvent, 0, FALSE);
from a different thread.

But the WaitForSingleObject() call never returns.

The FS filter driver is started manually so we can be sure that BaseNamedObjects is created.
I feel this has to be in the context of the same process… only then it’ll work.

NTDEV is sponsored by OSR

Visit the list online at: http:
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
> To unsubscribe, visit the List Server section of OSR Online at http: