vrijdag 21 september 2012

Windows server 2012: deduplication and dual boot

Windows Server 2012: deduplication. and doal boot

This sounds as if deduplication is a bad thing. Well, it's a very neat feature of Server 2012. But you need to know what the consequences might be when you use this on your precious data. Does Windows 7 support dedup? Does Windows 8 support dedup? Let me tell you a little story about my experiences.

My demo environment @home consists of one server which is a dual boot. I had a Server 2008r2 / Windows 7 combo. This server has a RAID 10 with 3 partitions: the first one for my server C drive, the second one for Windows 7's C drive and a third for all my data and user profiles.

As you can see it was a bit outdated, so I decided to replace 2008r2 with the new Server 2012 Datacenter. (I've got a Technet account;-). After I installed and configured the new server, I wanted to try deduplication on mij data drive. The next day dedup really made my day! I had a whole 200MB extra free space on my data drive! Okay, so far so good. But, the server didn't like my little outdated videocard and I also had trouble getting Adobe Flash Player to work (it crashed constantly). So I decided to replace Server 2012 with Windows 8. I need the HyperV role for all my virtual servers and demo's, but since Windows 8 also has (limited) HyperV capabilities, it felt like a fine choice.

To install Windows 8, I needed a Win8 DVD. So I switched to the dualboot Windows 7 edition. I had to burn a Windows 8 ISO to dvd and the ISO was on my data drive (my deduped drive, right?). But when I tried to use that ISO an error came up stating that it wasn't possible to use this file... OOPS!!! Actually, I wasn't able to access ANY file on my data drive! Okay, good to know that Windows 7 does not like deduped disks.

Back in my dual boot Server 2012, I copied the Windows 7 ISO to another volume and rebooted into windows 7 and burned the DVD.

Windows 8 installed and after some config time I needed to start a tool that was on the data drive (yes, the one that got deduped). I got the same error as Windows 7 gave me! I wasn't able to open ANY file!!! Not even a simple photo of my daughter en me. HMMM....

Luckily there are some good folks on the internet who found out how to enable the dedup option in Windows 8. This is the site that I used: http://forums.mydigitallife.info/threads/34417-Data-deduplication-for-Windows-8-x64

After I downloaded the files and executed the 2 dism commands, I tried to access my data drive again. My heart was pounding in my throat. The first file I tried to open was that picture of me and my daughter. You cannot imagine how glad I was to see her face on my monitor again!!!

So, what have we learned here? Well, it's Server 2012 and Server 2012 ONLY that can access a deduplicated drive out-of-the-box. So, watch out what you're going to do with your external USB/eSATA drives, if you want them to be accessible by other OS's then Server 2012 also. Okay, lesson 2 is that we are able to add the dedup feature to Windows 8. But it's not handy when you have all your repair tools on your USB drive and when you want to help someone out with his or her pc, it needs a dedup installation first!

One final thought. There are some considerations when you want to use deduplication. For instance, don't use dedup on volumes that contain live VM's or SQL DB's. More about this can be found here: http://blogs.technet.com/b/filecab/archive/2012/05/21/introduction-to-data-deduplication-in-windows-server-2012.aspx
My server is a demo HyperV machine. I deduped my data drive which contains all my VM's. To avoid data corruption during scheduled deduplication while running live VM's, I've turned scheduled deduplication OFF and only manually start dedup when I know that all VM's are off.

dinsdag 20 december 2011

Server 2008r2: use Managed Service Accounts in IIS - walkthrough

Well, here is my first blog entry :)

Server 2008r2 (and Windows 7) introduced Managed Service Accounts and Virtual Accounts. In this first blog I briefly walk through the process of using a Managed Service Account (MSA from now on) in IIS application pools. Sure, you can use MSA's in more scenario's, but hey, let's start with the basics, right?

The advantage of using an MSA is that you don't need to worry about passwords and password changes anymore. As soon as you configure an MSA (e.g. in IIS), the service will set a password in the AD MSA object and will also change it's secrets every 30 days from now on.

Demo environment

For this demo I use a single Server 2008r2 Domain Controller who is also the IIS server, but you can use this example on a member server IIS installation also. The Domain and Forest Functional Levels are 2008r2.

Step 1: Prerequisites

The server (or windows 7 client) that will use the MSA needs KB 2494158 (Managed service account authentication fails after its password is changed in Windows 7 or in Windows Server 2008 R2) to be installed.
Get it here:  KB2494158

You need .NET Framework 3.5 installed on your server, you can do this in Server Manager, under Features. If you use Windows 7, you can download Remote Server Administration Tools (RSAT) here: RSAT
After you installed RSAT, go to Start, then Control Panel.
Click on Programs, then Programs and Features.
And then in the left pane, click Turn Windows Features on or off.
Select Microsoft .NET Framework 3.5.1.
Expand Remote Server Administration Tools, AD DS and AD LDS Tools.
Select Active Directory PowerShell Snap-in.
Restart the computer.

Step 2: PowerShell

MSA's can only be created (the correct way) through PowerShell. For this you need the ActiveDirectory add-on module loaded. Since I'm working on my DC, it's a simple load command. If you need the module on your non-DC server, add it in Server Manager under Features, RSAT (see Step 1).

Now it's time to start Powershell.

Enter the following command:

import-module ActiveDirectory




After the module is loaded, we are going to create our first MSA. I will keep the command as simple as possible, which causes the object to be created in the default folder in Active Directory: Managed Service Accounts.


 Let's type this command:

new-ADServiceAccount DSAtest -enabled $true






Check ADUC to see the newly created object:

This account is still unusable though. It needs to be installed on the computer that will use this MSA, in our case the IIS server. You can install an MSA on one machine only! (In the next Server release (currently Server 8 Developer Preview) there will be group MSA's that can be used on multiple hosts (e.g. in cluster environments)) Since I use for this demo the same server for IIS, I'll add it right here with this command:


install-ADServiceAccount -id DSAtest



The password is empty. As soon as we're going to use this MSA with an IIS Application Pool, it will set a password all by itself :)

Step 3: IIS

Let's switch to IIS:







As you can see I only have one Application Pool on this server. On the right side of the screen, you notice the Action Pane. Look for the option Advanced Settings and click on it.


On the Advanced Settings window, look for Identity and click on the small gray button on the right of this setting. Then click on the button Set...




As you can see I entered the username in the form of: <domain>\<serviceaccountname>$ and for me it's the name: dufour\DSAtest$
The MSA object's SAMAccountName property has a value named DSAtest$, that's why you need to add the $ sign.

Click op OK, OK and OK to save this setting.

Now, stop and start the Application Pool and test if it works. If the pool does not want to start, try to reset the password like this and then start the application pool again:

Reset-ADServiceAccountPassword -id DSAtest


I hope you enjoyed my very first blog! Feel free to comment here and have fun with MSA's!!!

Marco