File Server

Win32 Reparse Points

One of the common challenges that we server admins face at work is, of course, disk space.
Windows and NFTS have some very powerful features built in, but I sometimes get the impression that Microsoft didn't always think how a customer of theirs would actually be able to use those features.

Win32 reparse points fall into this category. They are currently my favorite MS "feature" to rant about at work...

What is a reparse point you ask? Well, the simplest explanation is that it's a file system object that causes the OS to do a bit of extra processing when it runs across one to go somewhere else to get the desired data - insetad of just reading that object directly like a normal file/folder. It parses the file system object a second time, hence the name.

A reparse point works by sending the contents of the reparse point to a file system filter driver, that does the actual processing and spits the results back.
That file system filter can be a MS driver, or a third party driver.

The most common examples of reparse points are junctions and volume mount points.
Other common uses of reparse points are for archival of files. The archival program moves the file off to archival storage location and creates a reparse point where it was. The OS calls the archival program when it encounters the reparse point to go and fetch the actual data. The OS can do that because the archival program registers a GUID with MS for their reparse point type (tag type), and the OS knows to call their filter based on that GUID.

Fun stuff.. the above was a bit of a simplification, but it should be accurate enough.

Junctions and volume mount points concern the average server admin.
A "junction" is a not-so-technical term that means a reparse point for which the target is another folder.
A "volume mount point" means a reparse point for which the target is a volume.
Interestingly, as far as the reparse point goes, there's no difference between a junction and a volume mount point.

The frustrating thing, is that Microsoft built these powerful features into the OS and then didn't bother to include tools to adequately manage them.

This is really bad, because if you're using these features a lot to get around drive letter limitations, drive space limitations, or to make the file system more intelligently laid out, you can end up having more problems from trying to get the security right, not have loops in the backups, etc...

I should point out there are some programs out there for doing some work with reparse points, but they aren't comprehensive to say the least, and most server admins will quickly realize that they can't do things they'd expect to easily be able to do.. such as, oh.. list all the volumes on a server and where they're mounted to.

So what do we do.. well, we learn the API calls and write the tools ourselves!

Look for some entries in the Win32 and Tools section soon about this...

Syndicate content