I've been using RAM FS and have a couple of suggestions…
2 posts
Hello,
I've been using RAM FS and have a couple of suggestions regarding its functionality.
First, it would be great to have an option to create and access a volume without assigning it a drive letter.
This would be particularly useful when using the mirroring mode. Currently, only one source folder can be assigned to each volume, so I have to create a separate volume with its own drive letter for each folder. This makes drive management somewhat complicated.
One alternative would be to use the standard volume creation mode to create a single drive and then use symbolic links or junctions inside it to link to multiple folders. However, the mirroring feature is much more convenient, especially since it allows me to keep the original folders intact while frequently mounting and unmounting them.
In my case, the source folders assigned to the RAM disk are mostly data directories managed by other applications. I rarely need to modify their contents manually, so I generally don't need to access them through File Explorer or have them assigned individual drive letters.
Additionally, I think there should be an option to forcibly release all handles associated with a volume when unmounting it, even if this means risking data loss.
File Explorer seems to keep the volume's handles open from the moment it is mounted. As a result, the volume cannot be unmounted even when no disk operations are taking place. Having an option to forcibly detach all handles, with an explicit warning about the risk of data loss, would be very helpful.
Thanks for the suggestions. Volumes without a drive letter, or several source folders per volume, would both be a big change to how RAM FS identifies and mounts volumes, which is too much for what is a fairly niche need. You can get the same result today by gathering the folders under one parent folder and linking to them from where they used to be.
Close the applications first, then create a folder such as C:\RAMData, move each data folder into it, and set it up as the source folder of a single mirrored volume. At each original location, create a junction pointing to the new place, for example:
mklink /J "C:\ProgramData\AppA\Data" "C:\RAMData\AppA"
While the volume is mounted, C:\RAMData leads into RAM, so every junction does too. When it is dismounted, C:\RAMData is an ordinary folder again with the saved data in it, so the applications keep working either way. The junctions must live outside the mirrored folder: links inside it are copied as links and not followed, so whatever they point to stays on disk.
As for unmounting, RAM FS already asks Explorer to let go. When a volume is busy, it sends the same notification Windows uses for Safely Remove, Explorer closes its handles in response, and the dismount goes ahead. If it still refuses, the message should name the program holding the volume, for example Volume R: is in use by: .... Could you tell me what it says in your case?
A forced unmount isn't possible though, and the reason is how RAM FS works. It doesn't go through the Windows cache: files live in the driver's own memory, and a program that maps a file or runs an EXE from the volume has its memory section backed directly by that storage. Windows has no way to take such a section away from a running process, so freeing the volume under it would end in a blue screen rather than lost data. The dismount already closes every section it safely can, and refuses only when a live mapping, a running program or an open handle remains.