Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vhdx attach supporting #746

Conversation

anton-hrytsevich
Copy link

Changes proposed in this pull request:

This merge request exist like result of implementing issue #627.
There added full logic to creating VHD(X) disk images on file system with possibility to use auto attaching them in Windows file system.
It can be used for hardware encrypted disks that after sign in operation need show if system like usual disk. It's useful feature for such cases. For now, attached disk has READ ONLY access. Access for writing planing add in near future.
Solution was tested on Windows 10, Windows SDK 10.0.17134.0 and 10.0.16299.0.
See example of use:

mirror.exe /P \\.\PhysicalDrive3 /l C:\testMirror /e /x
/P - drive name
/l - folder for mirroring
/e - auto attach to file system as virtual drive
/x - make VHDX disk

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the existing documentation
  • My changes generate no new warnings
  • I have updated the change log (Add/Change/Fix)
  • I have cleaned up the commit history (use rebase and squash)

Dan Walkes and others added 3 commits October 16, 2018 11:44
With this checkin possible to mirror a physical device like this:
mirror.exe /P \\.\PhysicalDrive1 /l "C:\PathToMount" and it create
C:\PathToMount\MIRROR.VHD regular image file.
Use option /e  with /v or /x, /P/ /l that dokan
sample auto attach VHD(X) file to Windows file
system in read only mode
Use ctrl+C to correct finishing sample work
@Liryna
Copy link
Member

Liryna commented Oct 23, 2018

Hi @AGritsevich ,

This is a very interesting work !
The issue I have here is that your contribution does not seem to be part of the dokan project but more like a third part FS using dokan.

You should probably create another repository outside dokan to make it public.

@Liryna Liryna mentioned this pull request Oct 23, 2018
7 tasks
@dwalkes
Copy link

dwalkes commented Oct 23, 2018

Hi @Liryna ,

Thanks for the response.

I have one question about this comment:

The issue I have here is that your contribution does not seem to be part of the dokan project but more like a third part FS using dokan.

Going back to your previous comments in #627:

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 ?

Are you no longer interested in the idea of incorporating a project like this into the samples repository? Or is there a way @AGritsevich could transform his PR into something we could use there?

Thanks
Dan

@Liryna
Copy link
Member

Liryna commented Oct 24, 2018

Hi @dwalkes ,

I am still interested in incorporating projects like this that can be a good sample for people to use for their devs.

@AGritsevich I haven't tested for now but I think the code of mirror_dev.cpp should have his own project and not be an option of the mirror. Especially because of the difference of codes and usage of an external library.

-Also the code of mirror_dev still use the old way to return error code of dokan and not the usage of NTSTATUS
https://github.com/dokan-dev/dokany/pull/746/files#diff-ee370c53bf61e2ba62fa4fe50e14a3eeR185
-vdh.h seems to export VHDFillFixedHeaderSector but is not used as I can see and therefore the vhd.c
-CI is not able to build the project.
-It is a detail but, Copyright (C) 2015 - 2017 is used in mirror_dev did you already started the project in 2017 ?

Like I said, I am looking for sample useful for the community. Here It needs to be polished for being used and packages in the installer.

@Liryna
Copy link
Member

Liryna commented Jul 25, 2020

Closing for inactivity

@Liryna Liryna closed this Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants