Monday, November 15, 2010

Extend Windows Server 2003 C Drive

Sooner or later the chances of encountering a Windows based system that is exhausting its free space on C: are pretty good. After years of Windows patching, application updates, etc, even a system that started with a healthy amount of free space on C: can find itself running low. If you happen to be in a virtualized environment you have some good, semi non-disruptive options to resolve this issue.

In the "old days" when the C drive was carved out of physical disk, the only option was to backup the system, repartition, reformat, reinstall, and restore the system(maybe there are/were some advanced partitioning managers that could do this much more simply?). A very lengthy, disruptive and risky operation. With the advent of Windows 7 and Server 2008 R2 (maybe Vista/Server 2008?) Microsoft built in the very handy feature of extending the C: drive live while the system is running - very cool indeed! As long as you have some available space to add, it is a zero downtime operation on those operating systems.

Back to Windows 2000 and 2003. I recently had some Server 2003 virtual machines that have been in service long enough to start running low on C drive space. All the (conservative) cleanup I could muster wasn't going recover enough space for the long haul. If you turn to Google you'll find several ways to accomplish extending the C drive - here I offer what I though was one of the most straight forward and conservative(safe) methods in a VMware environment.

Preparation Steps
  • Get a good backup of the system to be modified (you already regularly do this though - right?)
  • Have a "Helper" Windows 2003 or newer virtual machine you can power on / off without disrupting user services. This system will need access to the vmdk to be extended.
  • Make sure you have free disk space on the vmfs/nas volume to extend your C drive.
  • Downtime required - although minimal it must be planned accordingly
  • Backup, Backup, Backup the original system
  • Shutdown the original System
  • Edit the Virtual Machine's properties and adjust the disk size to the total desired capacity
  • In the Helper Virtual Machine
  • Add the existing, newly extended drive as a new hard drive device
  • Boot up the Helper Virtual Machine
  • Fire up diskpart, execute list volume
  • Execute select volume # where # is the volume number to be extended
  • Execute extend, then exit
  • Shutdown the Helper Virtual Machine and remove the disk device configuration from it (but don't delete the VMDK!)
  • Boot up the original system
  • You may see a checkdisk run - this is OK
  • You may get the "New hardware install please reboot" prompt, go ahead and reboot
  • The system will now have a larger C drive!
This method appealed to me for following key reasons:
  1. Uses Windows native tools to modify Windows partitions.
  2. No copying of data from one disk to another.
  3. It's relatively quick. This can manually be done in around 15 minutes(excluding the backup time).
One potential downside stems from a VMware technical matter. For those who might think: "I'll take a snapshot of my virtual machine before messing with its disk size", you'll quickly notice the VMDK size can not be altered when a snapshot is present. If you are looking to the concept of "Snapshot" as a quick fall-back option, you'll have to get that from your storage or backup solution.

Stumble Upon Toolbar

Monday, September 27, 2010

Windows Server 2008 SP2 Install Errors: 0x800F0A0A and 0x800F0826

I was about my merry way of building a blank slate Windows 2008 x64 server when I ran into issues getting SP2 installed. I had pointed this new server to the internal WSUS where I had previously released a very specific list of updates (to identically match a production system) and all started well with a few quick sets of patch downloads, install, reboot, rinse and repeat. That is until it picked up SP2. Many frustrating attempts followed each resulting in errors 0x800F0A0A and 0x800F0826.

So I dug into the C:\Windows\Software Distribution folder and manually kicked off the 500MB+ beast. It very quickly came up a message indicating why the Windows Update attempts failed. Since this server was going to be accessing some iSCSI LUNs on a Dell Equallogic array, I had early on installed the Equallogic Host Integration Tool Kit (aka HIT Kit) to get the benefits of quick configuration of the initiator and the MultiPath IO plugin(DSM). The SP2 interactive installer clearly pointed out there might be a compatibility issue with the DSM driver along with an option to "Ignore and Continue" - which I selected. The SP2 installer went about its merry way, installed without issue and all SAN luns were fine afterwards. A plus in favor of Windows Update is that it plays its cards conservatively (in this case) - a minus was the hexadecimal cryptic error message it provided back.

Lessons learned - Do all your OS related patching before adding anything else to your system and run installers interactively when issues crop up. Share knowledge with others so that Google may more quickly end their similar tribulations ;) .

Stumble Upon Toolbar

Tuesday, June 8, 2010

Identifying Active Directory Primary Group Membership

I ran across what I thought was an interesting question on Delete a windows group in Active Directory. No one had posted any answer / comment to it and since I was curious what the answer was, I put one together.

As a side, (, and too) is not just a great place to ask relevant questions looking for help, but also to read questions that have been answered in order to advance one's knowledge. A good question there is just as valuable as a good answer - so don't be afraid to ask either!

Active Directory allows for a User's primary group to be changed from "Domain Users". This is great if you have applications that need / benefit from it, but how can you get a list of users that have their Primary Group membership set to a particular group? The built-in AD searches do not provide a "Primary Group = xyz" drop down.

You have to be willing to get your hands just a little bit dirty to accomplish a list of users that have their primary group specifically set. Active Directory is of course based on LDAP, as such AD users are objects and objects have attributes and attributes have values. The key attributes and associated values that need to be examined are 1) primaryGroupToken in the Group object, and 2) primaryGroupID in the User object.

Using adsiedit, find the Group in question and examine its properties to find the primaryGroupToken and make note of its numeric value. This is key for later when we search for user objects that have this value for their primaryGroupID attribute's value.

In Active Directory Users and Computers, right-click Saved Queries, and select New, Query. Give your query a Name: "Users-Primary-Group-Is-XYZ", and a Description. Set the Query root to a reasonable OU in your directory structure and click Define Query.

In order to enter a custom ldap query, change the Find drop down to Custom Search, and click on the Advanced tab. The fairly simple query I created is as follows where XXX=the value of primaryGroupToken found earlier:


Click OK, highlite your query in the Saved Queries Navigation folder and click the Refresh icon in the toolbar to get your results!

Stumble Upon Toolbar

Thursday, April 1, 2010

Virtually Compensating?

I picked up on a tweet from @jordansissel that on one hand was an "Well of Course" statement but was at the same time something that seems to have been lost in the virtualization buzz. To paraphrase Jordan's tweet: Virtualization shouldn't be taking off because poorly written software can't coexist on the same host.

So what are some of the top key benefits virtualization brings today that have made it the buzz of the industry for the past few years now? 1) Isolation of the virtual system from each other. 2)Resource control of multiple operating systems on the same physical piece of hardware. 3) Improved portability and availability of the virtualized software environments.

To counter these points, go back to Jordan's tweet: Why isn't software written better? Why doesn't my operating system handle things like isolating applications from impacting each other negatively or using too much RAM, CPU or disk I/O? Why aren't my applications more 'self contained' and easily movable to a different host without having to worry about hardware drivers, hidden settings, etc. If I could count on my operating system to handle fairly running multiple Tier 1 applications and those applications to be easily moved between hosts I could effectively utilize modern hardware without adding the hypervisor layer into that stack. Oh and my backup /recovery solution should be able to backup and restore a single application and its data on my host without effecting the other applications or the host. As things set today in order to define an "application" I need a hypervisor (environment), an OS license, application license and associated per user/connection licenses.

I'm not against virtualization, in fact I'm a huge proponent and user of it, but I'm also a fan of effective and simple. What do you think?

Stumble Upon Toolbar

Tuesday, February 9, 2010

My Home Network

I often get asked by other people: "How many computers do you have at home?". Because I'm an IT professional, the question is sometimes asked along with a rhetorical answer of: "Probably 10", and other times it is asked with genuine interest. I typically begin by laying out the purposes of my technology use at home to help people understand my setup.

I've maintained a home network since my early days of college. 386 and 486 linux based computers running file shares for roommates as well as dial on demand modem and subsequent dsl Internet connections. There has always been a dual purpose of legitimate utility as well as the learning / hobby aspect. This really hasn't changed much today - just the requirements.

Technology changes, life changes, requirements change. Today I have a family, limited spare time, a home, and demanding professional career. And so my requirements have naturally evolved. Low maintenance is a must due to time constraints. Space needs are high due to volumes of pictures and video of family, images of virtual machines for testing Mobility and connectivity around the home for the work and recreational needs of my family. Backup of all those precious digital memories and information. Of course efficient use of electricity and space.

Low maintenance to me at home comes from a few things. Largely this involves controlling the sprawl devices that I need to do upkeep on - consolidation. At one point I had several older computers doing various tasks, each consuming power and requiring periodic attention - those are gone, replaced by one central modern workstation. I've also recently replaced a "sensitive" MythTV based computer with a DVR from the cable company - a huge win on all fronts. Sensibly configured DHCP, DNS and file shares make connecting and sharing easy and reliable.

So what makes up my home network? At the computing center is a home built workstation. An overclocked Intel Quad core based system currently running 4GB of RAM, Windows 7, VMware Workstation with two 1TB Seagate 7200 RPM Sata drives in a RAID 1 configuration. The ASUS motherboard was not well supported by a Linux distribution that would reliably run VMWare Server 2.0, so the Windows 7 x64 route was taken. The Windows 7 x64 install is minimal and is really only there to run VMware Workstation. Inside VMWare Workstation I run at times a multitude of virtual machines. One always on instance is a CentOS guest that is my file server. For "portability" sake this is great as I can move it across hardware without issue and my file shares and Amazon Jungle Disk backup setup never changes. I maintain a Microsoft Technet subscription so I often boot up several other instances for testing various configurations. I also build up test VMware vSphere environments. In the near future I'll be adding 8GB of RAM to this system since 4GB really limits my testing capabilities. A few years ago, I 'finished' the basement of my home. During the project I installed several network drops that run back to a 10/100 switch that lives in an old rack in my storage room. Also in that rack is my cable modem and Linksys wireless G router. There are two systems in retirement there as well - a SGI Indigo2 (R6000) and a SGI Indy system. I spent a good number of years in an SGI equipment based engineering department and love the hardware. At the time it was light years ahead of anything available. I have a very inexpensive Samsung color laser printer attached to a wireless print server for printing from anywhere in the house. My wife and I have two fairly old Dell laptops that are almost nothing more than thin clients and serve their purposes well since all heaving lifting is done on the workstation via RDP, ssh, etc.

So it comes down to: Only 1 primary system(on a UPS) that is always on to do the heavy lifting and run virtualization to contain / isolate the "complicated" parts, along with a few peripheral devices for mobile access and output. This configuration suits my family's and my needs both for personal and work use - how about yours?

Stumble Upon Toolbar

Tuesday, February 2, 2010

Disk Space Cleanup in Windows Server 2008

I've recently began setting up and working with Windows Server 2008 based (not R2) systems. After the initial install and full round of patches I was a bit surprised at the amount of consumed disk space. It turns out the c:\Windows\winsxs folder was over 10GB in (apparent) size! Gone are the days of being able to go into c:\Windows folder and deleting the $Uninstall folders to get that space back - assuming you didn't want to uninstall any of those patches. I'd like to point out that this folder should not be tinkered with haphazardly. Many of the items in it are hard links out to many critical OS files and rampantly deleting them will make you sad.

I ran across this article explaining the winsxs folder's purpose and subequently its size. It boils down to all the different installed / installable components(aka the good old i386 folder) of the OS are kept there along with patch backups. The arguments are for reliability and availability for things like removing patches, or adding features and roles without need the OS media.

A bit of searching turned up the built in Windows Component Cleanup (compcln.exe) tool which will do some patch cleanup for you. I got back around 1.7GB which was nice but still not enough for my liking. The next bit I turned up was this article by John Daskalakis explaining howto manually delete some of the larger sub-folders. Following that article I was able to reclaim another ~800MB.

Another folder that deserves attention, and is consistent with Window XP and Server 2003, is the C:\Windows\SoftwareDistribution\Download folder. If you have applied all available updates, this can be safely deleted by:
1) Stopping the Windows Update Service
2) Deleting the folder
3) Starting the Windows Update Service.
I reclaimed about 1.2GB from this.

All said and done almost 4GB of space reclaimed and no issues with the system. I still wasn't very comfortable with the overall amount of free space on the system drive so I had so I added 10GB and extended the volume to a total of 40GB (gotta love virtualization).

Stumble Upon Toolbar