Click here to Skip to main content
15,887,915 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Let me explain, as precisely as possible, my expectation : I have 3 physical drives (200 GiB, 300 GiB, 500 GiB), but number and size of drives may vary. By using an unique Virtual Drive (VD) seen by an user, the goal is to allow standard file operation (copy, delete, move) through Windows file explorer or a Windows console on this VD. Final user will always see an unique drive letter.

For instance, the added value of my idea is to put on 1st drive some movies and to duplicate them on 3rd drive. Once the 1st drive is full, my soft will copy the next movies on 2nd drive while continuing duplicate it on 3rd drive. Of course, 1st and 2nd drive are marked as "1st virtual disk" and 3rd is marked as "duplicated" by manual configuration (with HMI showing physical drives for instance but it's my problem)

I don't want to hear about ANY RAID which have inconvinient to be "unreadable" once 1 disk is removed. RAID should mandatory have same disk size in order to do "mirror" feature. The added value of my idea is the ability to read any hard drive anywhere without any filesystem constraint. It's a fine way to recycle my old hard drives.

My question is how to create such a VD and how to intercept file operation on this VD and how to show (on this VD customized) customized FAT contents (contents of 1st and 2nd physical drives) by using Visual Studio.

Many thanks in advance.
Posted
Comments
BillWoodruff 29-Oct-14 10:18am    
And, what IDE and language do you think you'll use for this very ambitious project ? And, why FAT instead of NTSF ?
lrtsenar 30-Oct-14 9:58am    
I wish use Visual Studio in C++ under Windows. I was using FAT as a generic word (File Allocation Table) not as a specific file system. Thank you for your interest.
lrtsenar 8-Oct-15 10:17am    
Let me re-scope the project :
In a 1st time, I wish to have the following :
I have succesfully compiled the 'file device driver' found here (filedisk) : https://www.acc.umu.se/~bosse/

Unfortunately, when I try to 'share' the new created device, the following message appears:

An error occurred while sharing .The device or directory does not exist. The shared resource was not created
To summarize, here is the method used to mount file as drive:

int FileDiskMount(...)
...
DefineDosDevice(DDD_RAW_TARGET_PATH,"T:","\Device\FileDisk\FileDisk0")
...
Device = CreateFile("\\.\T:",GENERIC_READ | GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_FLAG_NO_BUFFERING,NULL);

DeviceIoControl(Device,IOCTL_FILE_DISK_OPEN_FILE,OpenFileInformation,sizeof(OPEN_FILE_INFORMATION) + OpenFileInformation->FileNameLength - 1,
NULL,0,&BytesReturned,NULL))
where OpenFileInformation->FileName = "\??\d:\fd.img"

Do you know what's wrong ? Many thanks in advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900