Mounting drives in Windows... just like Linux!
WindowsBefore continuing I must concede to the fact that I am *not* a fan of Windows. I use it where I have to, but by and large I feel that Linux, specifically Ubuntu, is just a more pleasant experience and is a better tool for the kind of jobs that *I* need a computer to do. I must also admit that I was Microsoft certified about 9 years ago (the NT4 track!), so what I "discovered" last night might not be entirely new to many people, but it was certainly new to me so I thought I would share. Plus, considering how rarely I have compliments for Windows, I feel obligated to share this so that my steadfast Microsoft fanboy friends will quit saying "Why do you hate Bill Gates?", which incidentally I do not.
Now that I have gotten that out, let me tell you about a cool feature I found within Windows last night. It actually does something the way that Linux does!
One of the Windows web servers that we interact with has its webroot on the D: drive, with a path D:\inetpub\wwwroot. At the time that this application was created, hard drives were not the size they are today and 8GB seemed like a reasonable partition for a data drive. However the application has grown, as has its need for hard drive consumption and it finally reached a level which needed to be addressed.
I originally set out to add a new drive (E:), then move the wwwroot over to the new drive, update all mappings in IIS, including virtual directories, and update any mappings within ColdFusion. This was not a very exciting prospect considering this is a live production server. However, this seemed like a fairly logical approach so I began.
First I added the new drive and initialized it in the Disk Manager. I now had this 80GB empty partition which I planned on turning into E: After choosing to to make it a "Primary Partition" and selecting the size, I got to the point for choosing the drive letter. This is where an option jumped out at me that I had never noticed before, which is a testament to both my lack of observance and to how fast I normally cruise through this section! I was presented with the following:
WHAT??? "Mount"???
The solution became abundantly clear immediately. Rather than have to re-map paths and risk blowing up whatever buried physical paths might lurk under the covers of this legacy application, I would simply mount the new drive as: d:\inetpub\wwwroot - just like Linux but with backwards slashes and the funny letter/colon thing on the front!
So, I renamed the existing wwwroot folder to wwwroot.old, mounted the drive to that position, and copied over all files from the old wwwroot to the new wwwroot. I restarted ColdFusion and IIS and the application picked up right where it had left off without a hitch!
So (get ready to write this down, because you won't hear it often from me).... YAY for Windows!





Loading....