Mountvol for the masses
Have you ever needed a simple way to expand a drive that's quickly running out of space? Windows 2000's support for junction points can be the solution.
Junction points originated as a solution to the problem of needing more than 26 drive letters. If you wanted to install more than 26 drives in Windows NT, you were stuck after you used Z—you were out of letters. Junction points let you install 27 (or more) drives. After you install your 27th drive, the new drive sits in Logical Disk Manager (LDM), formatted and ready to use but basically inaccessible because Win2K has no name to give it. To make the drive accessible, you can use junction points to make the drive look like a directory on an existing volume. After you create a directory (e.g., C:\extradrive) on an existing drive, you connect your unnamed drive to C:\extradrive (I explain how later in this article). From that point on, writing data to C:\extradrive puts the data on a different physical drive than writing data to C:\winnt.
The missing piece in this procedure is how you "glue" the letterless drive to the directory—that is, what you call the drive. Every drive has a globally unique identifier (GUID). You use the drive's GUID and a standard Win2K command called Mountvol to hook up the drive to the directory. A typical Mountvol command might look like
But as I mentioned earlier, you can also use junction points to expand a drive. For example, if you've ever set up a server for a group of printers or for users who print long documents, you know that users write amazingly large quantities of data to spool files. Win2K temporarily queues printer spool files in \winnt\system32\spool\printers. The OS is also in that directory, so you definitely don't want that directory's drive to fill up.
Suppose that directory is on the C drive and you happen to have an E drive that has plenty of space. First, stop the Spooler service and clean out the C:\winnt\system32\spool\printers directory. Then, reparse the E drive to C:\winnt\system32\spool\printers. Restart the Spooler service and—voilà—no more filled-up system drive.
The one wrinkle in this approach is finding the GUID for drive E. Mountvol can tell you the GUID, but wouldn't you rather simply type something like
You can take exactly that approach, thanks to the linkd.exe tool in the Microsoft Windows 2000 Resource Kit. Think of Linkd as a simplified Mountvol. If GUIDs are your style, you can use them with Linkd (although I can't think why you'd want to):
What Mountvol can do that Linkd can't is list GUIDs—if you execute the Mountvol command without parameters, you get a listing of current GUIDs and the drive letters that map to them.
Linkd can also report what, if anything, is attached to a given directory. So, the command
returns one of two responses, depending on how you created the mapping:
To disconnect the reparse point, type
Finally, some words of caution. First, junction points give backup programs fits unless the backup programs are specifically Win2K-aware. For example, you can use NT 4.0's NTBackup program to back up a Win2K system, but NTBackup either won't back up or won't completely back up files or directories that exploit new-to-Win2K NTFS features, such as junction points or sparse files. Second, the free-space reports get a bit weird. If you run the Dir command on the C drive, you'll see C's free space. But running Dir on C:\extradrive shows E's free space.