Can I manually create/write a file on the secondary storage drive?
-
vendredi 12 mars 2010 03:59Hi guys, I have a question about manually creating/writing a file on the secondary storage drive. The following is my case.
I have 2 hard drives. HD1 is the main drive and was mounted as C: (System partition) and D: (Data partition). Before I add HD2 to the server storage pool, it was mounted to E:. After I add HD2 to the server storage pool, logical dirve E: disappeared from Windows Explorer. And the capacity of D: was extended. These are the correct behaviors of DriveExtender.
My question is, at this point, can I manually create/write a file to HD2? Since it is not mounted to any drive letter, how can I send file I/O to the volume of HD2? Can I create a file by using something like \Device\HarddiskVolume3 as the volume name? How DriveExtender create a file to the secondary storage drive? Thanks.- Déplacé Ken WarrenMVP, Moderator vendredi 12 mars 2010 12:50 development/extension question (From:Windows Home Server Software)
Toutes les réponses
-
vendredi 12 mars 2010 04:05ModérateurIf you need to write files to a particular drive attached to your server, don't add that drive to the storage pool. It will be given a drive letter (as you've seen) and you can manually create and manage a share on that drive. Note that this is unsupported; Windows Home Server is not designed to be accessed via the desktop.
I'm not on the WHS team, I just post a lot. :) -
vendredi 12 mars 2010 04:16For sure I can do that before I add HD2 to the storage pool. But this is a requirement of one of my projects. I have to create/write a file to the secondary storage drive after I add it to the storage pool. I am sure there must be a way to implement this. Otherwise how DriveExtender can create/write a file to the secondary storage drive? I suspect that DriveExtender does this by issuing file I/O in kernel mode from DriveExtender FSD, DEFilter.sys. Any guys from MS WHS team can answer my question? Thanks.
-
vendredi 12 mars 2010 10:33You would then need to look into c:\fs though if you do the wrong thing in here it will generally make a mess. You should read up on Drive Extender:
http://www.microsoft.com/downloads/details.aspx?FamilyID=40C6C9CC-B85F-45FE-8C5C-F103C894A5E2&displaylang=en&displaylang=en
-- -
vendredi 12 mars 2010 12:49ModérateurA file system filter driver is how Windows Home Server handles redirection from the reparse points to the real files, which are in other folders (and may be on other drives, but don't have to be). In order to do so, the drives themselves are exposed as mount points on the system drive.
Perhaps if you would explain what it is you're trying to do we could give you better guidance?
I'm not on the WHS team, I just post a lot. :) -
vendredi 12 mars 2010 15:16Thanks Al and ken for your replies.
To Ken: What is your meaning when saying "the drives themselves are exposed as mount points on the system drive."? Do you mean that the secondary storage drives are actually mounted to a specific NTFS directory on the system drive?
Actually this is a full disk encryption project. I use a disk class upper filter (below all file system drivers) to do the encryption/decryption. I want to encrypt HD2 after it is added to the server storage pool. Before the encryption I need to save some of private info on the HD2 volume, such as the key etc. And that is why I want to create/write a file to the secondary storage volume. -
vendredi 12 mars 2010 15:48ModérateurEach secondary drive is mounted to a folder on the C: partition, under the FS folder. There is also a location on the D: partition which may contain files (it's guaranteed to in a single drive server). But (honestly) I would A) probably not proceed, because if you encrypt everything on the drive you will likely make it impossible for an end user to recover data in the event of a server failure (have you considered how you will be affecting the server recovery procedure?), and B) if I did proceed, I would look to handle it transparently to Windows Home Server itself, maybe (off the top of my head) by getting into the API chain that deals with drive formatting somehow.If you proceed, I think you should do a lot more reading, including everything you find on the Microsoft Windows Home Server site and the WHS SDK documentation, before you try to go too far. There is a lot that you probably don't know that you need to. You will probably be well served by reverse engineering at least some parts of the product.
I'm not on the WHS team, I just post a lot. :) -
vendredi 12 mars 2010 16:15
Thanks Ken. Yes. I just verified that the secondary drive is mounted to a folder on C:. In my case it is c:\fs\11\.
Ken, one more question to you. Do you know how I can programmably get the following information? This is the output from mountvol.exe.
\\?\Volume{fc70e48b-1516-11df-9f9a-806e6f6e6963}\
C:\ -
vendredi 12 mars 2010 16:55Modérateur
...
Consult the API documentation (previously linked).
Ken, one more question to you. Do you know how I can programmably get the following information?
...
I'm not on the WHS team, I just post a lot. :)