StableBit DrivePool 2.1.0.432 BETA – Reparse Points

To those of you celebrating the holidays this week, happy Thanksgiving and happy Hanukkah! I have a brand new build of StableBit DrivePool to share with you today, it’s the next 2.1 BETA.

StableBit DrivePool 2.1.0.432 BETA
StableBit DrivePool 2.1.0.432 BETA

Download the latest version right here: http://stablebit.com/DrivePool/Download

This build took a while to get done (almost 2 months) and the main new feature here is support for reparse points. Reparse points are the underlying technology that Microsoft Windows uses to create links or shortcuts between files or directories, on the same drive or even among different drives.

I won’t get that technical here but I’ve written up a fairly technical explanation of the different types of reparse points over here: http://community.covecube.com/index.php?/topic/279-stablebit-drivepool-reparse-points/

Link Shell Extension

Unfortunately Windows Explorer is not very savvy when it comes to working with reparse points. I prefer to use a free shell extension called the Link Shell Extension in order to make working with reparse points easier.

You can download it for free right here: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

Command Line

As an alternative, you can also use mklink and fsutil on the command line to work with reparse points.

A Simple Example

Reparse points can get very confusing if you try to think about how they work, so instead of doing that let’s dive right in with a simple example.

2 Folders
2 Folders

For this example, I’ve created a new pool (G:\) and have created 2 folders in the root directory of that pool, Folder1 and Folder2.

G:\Folder2\File2.txt
G:\Folder2\File2.txt

Now, in Folder2 I’ve created a new file called File2.txt. In this file I’ve put the text “This is file 2.”

What we’re going to do now is create a symbolic link in G:\Folder1 that points to G:\Folder2.

Pick Link Source
Pick Link Source

The first thing that we’re going to do is right click on G:\Folder2 and select Pick Link Source.

Drop Symbolic Link
Drop Symbolic Link

We then navigate to G:\Folder1 and right click, select Drop As… > Symbolic Link. You’ll notice that there are a lot of options here, so if you don’t know which one to pick, symbolic link is generally the best bet.

G:\Folder1\Folder2
G:\Folder1\Folder2

What we now end up with is a symbolic link G:\Folder1\Folder2 that points to G:\Folder2.

You can right click on G:\Folder1\Folder2 and select Properties > Link Properties to see some additional information about the symbolic link.

Link Properties
Link Properties

From here we can see that G:\Folder1\Folder2 actually points to ..\Folder2. You’ll notice that the link target doesn’t contain a drive letter and so this is called a relative symbolic link. If the link target were G:\Folder2, then it would be an absolute symbolic link. The Link Shell Extension will create the appropriate links for you automatically.

So let’s navigate into G:\Folder1\Folder2.

Reparse Point
Reparse Point

Notice that we see File2.txt which actually exists in G:\Folder2. Let’s open it up.

File2.txt
File2.txt

And there we have it, the same text that we placed in G:\Folder2\File2.txt in the beginning of this example.

It is important to understand that this is not a copy of File2.txt, but the original one and that G:\Folder1\Folder2 is not a copy of G:\Folder2. For example, if we place another file in G:\Folder2, it will automatically appear in G:\Folder1\Folder2, and this essentially illustrates what symbolic links (which are a type of reparse point) can do.

File Symbolic Links

In the example above I’ve shown how directory symbolic links work, but symbolic links can work with files, and there is no limit on how many symbolic links can point to the same file or directory, 1, 10 , 100, it doesn’t matter.

Multiple Symbolic Links
Multiple Symbolic Links

In the screen above I’ve created 3 separate symbolic links in G:\Folder1 to the file G:\Folder2\File2.txt. All of these essentially are the same file.

Links Across Volumes

A symbolic link can technically point to any kernel path, which includes another disk volume.

Links to Other Volumes
Links to Other Volumes

In the screen above, I’ve created a symbolic link in the G:\ pool that points to the F:\ pool. Isn’t that cool?

Other Types of Reparse Points

Symbolic links are only one type of reparse points, and in my opinion they are the most flexible. But in addition to symbolic links StableBit DrivePool supports junctions and mount points.

Other Reparse Points
Other Reparse Points

In the screen above I’ve created a mount point to C:\ and a junction to F:\ in G:\Folder1. Junctions and mount points are precursors to symbolic links, which were not implemented until Windows Vista. I suggest using symbolic links unless you have a special need not to.

Hard Links

In addition to the other types of links, the Link Shell Extension has the ability to create Hard Links. Hard Links are not implemented using reparse points and so this build of StableBit DrivePool does not support them. Hard Links are implemented directly in NTFS and can only point to a file on the same volume.

Implementation Difficulty

The reparse functionality here was notoriously difficult to implement correctly and that’s why this build took so long to get out. As a result, some functionality that I planned to include in it (such as TrueCrypt support) didn’t make it. But I just wanted to acknowledge that it’s on the way.