dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.15k stars 657 forks source link

Support physical disk mirror in mirror example project #627

Closed dwalkes closed 3 years ago

dwalkes commented 6 years ago

Thanks for creating and sharing this very useful project!

I’m a software developer/consultant and I have a client who is interested in using this project in a new development. They need to have access to physical drives for their application, therefore need capabilities like were discussed previously in https://github.com/dokan-dev/dokany/issues/564. They will ultimately build dokan support into an application which is capable of decrypting their physical disk devices. This part will be specific to their application. However I suspect others might find the ability to interact with physical disks useful.

As a first step toward this goal, I’ve made a modification to the mirror example in this branch which can export a physical disk to a raw device file mirror on the filesystem using Dokan. To use, invoke like this:

mirror.exe /P \\.\PhysicalDriveX /l "C:\temp\"

Where X is the physical drive number as found from disk management and C:\temp is a folder on the filesystem where a MIRROR1 raw device file will be placed.

You can then use ImDisk to turn this raw mount point into a mirrored physical device: Select File->Mount New Virtual Disk Select the C:\temp\MIRROR1 file as the Image File Check box for “Read-only media”

There are still more general disk features needed by the client which could also be implemented in this mirror example, for instance:

  1. Add write support.
  2. Ideally, include features of ImDisk and support for exporting directly as a physical device to avoid including the ImDisk application and associated dependencies with their project.

My questions are:

  1. Are the changes I’ve made to the mirror demo in this branch to support physical devices useful and would you like me to prepare a pull request?
  2. Would you be interested in further enhancements to the mirror demo to support write of physical disks?
  3. Would you like to incorporate changes to support mirroring physical disks directly, basically extending the functionality to remove dependency on ImDisk? I haven’t looked into the details about what it would take to support this yet but I assume ImDisk could be used as an example. Has anyone already looked into this, for instance when considering https://github.com/dokan-dev/dokany/issues/564?
  4. Are any Dokan contributors interested in contract work for this client to support development of additional features for physical disk support? If so, is bounty source the best way to request this for specific features?
Liryna commented 6 years ago

Hi @dwalkes ,

This is an amazing work you did here ! 🥇 It is true that some people could be interesting to such project for alternate FS implementations.

Usually external projects using dokan are listed on the dokan front page: https://dokan-dev.github.io/ Here I totally understand that it is a great example of implementation in another layer and could be provided as a "simple" example to physical disk mirror.

The question of adding it in dokan samples repository (when it will be ready) is about maintaining it for me. I would need some help to maintain it, and this, for an undefined time. It should not be a day to day maintains but still need to follow to changes in dokan. @dwalkes are you willing to be an official maintainer of it if integrated in dokan repository ?

Regarding implementing other features and integrate ImDisk , I would like to help you but I am lacking time unfortunately. I tag the issue for "help" and hope someone that was looking for #564 would be interested to contribute to your work !

Thanks again for doing this and sharing it ! It is very appreciated !

dwalkes commented 6 years ago

Thank you @Liryna for your response and suggestions. I could definitely help maintain the code which would be added to support physical disk mirroring as an example. I need to learn more about the work necessary to incorporate the features of ImDisk and exporting as a physical disk. I plan to look at this in the upcoming week and will report here with questions or thoughts about how this could be implemented. In the meantime if anyone on the Dokan team is interested in helping implement as a paid gig please comment here or send me a message.

dwalkes commented 5 years ago

@Liryna, please see my comments in related pull request https://github.com/dokan-dev/dokany/pull/746, this relates to the discussion above. Thanks!

Liryna commented 3 years ago

Closing for inactivity