2 Jun 2010

RAID6 Advantages Over RAID0 and RAID5

RAID (Redundant Array of Independent Disks) systems are used to increase the performance and/or reliability of the hard disk drives of the system. In this article we will explain the basics about RAID0, RAID1, RAID5 and the advantages of RAID6 over them.

There are two basic ideas behind RAID: data stripping (a.k.a. RAID0), used to increase performance, and mirroring (a.k.a. RAID1), used to increase reliability.

On RAID1 the data stored at one hard drive is automatically copied to another. In a two-disk system, data found on the second disk will be an exact copy of the data stored on the first disk. If the first hard drive goes defective, you will still have your data, since the second disk will have an updated copy of all data stored on disk 1. This process is also known as mirroring.

RAID0, on the other hand, is targeted to increase the disk performance, by dividing the files between all available disks. For example, on a RAID0 system with two disks, a 100 KB file to be stored on the hard disk is split into two 50 KB data chunks, each one stored in one different disk, increasing the disk performance, since it is faster to store half the file than to store the full file. In other words, it is faster for a hard drive to store a 50 KB file than to store a 100 KB file.

The problem with RAID0 is to increase its reliability, since if one of the disks go defective, all data is lost.

Several RAID systems were created to increase the reliability of data stripping, like RAID3, which uses an extra hard disk drive to store parity and data correction information, and RAID5, which is similar to RAID3 but stores parity and data correction information inside the disks found on the system, thus not requiring an extra hard disk drive. Keep in mind that since RAID5 will store parity and data correction information inside each "data" hard disk drive of the system, less space is left on those drives for data storage.

If there is any read error, the RAID system automatically starts a data recover operation, using the parity and error correction information to restore the data being read.

Inside RAID5

The problem with RAID5 is that if one of the hard disk drives fails in the exact moment that a data recovery operation is being conducted, the system fails and there is data loss, i.e. the system isn't capable of recovering the data that started the data recovery operation and also data is lost because one of the hard disk drives is defective.
 
While for small RAID systems the probability of such scenario to happen is very little, for big RAID systems such situation isn't so remote. During IDF Spring 2005 Intel provided a study pictured on Figure 1. It shows the probability of failure on a RAID5 system for three different configurations:

  • Scenario 1: RAID5 system with five enterprise-class 30 GB hard disk drives (120 GB total). Frequency on which data recovery operations is necessary: one every 23 years (orange on the chart). Probability of a system failure during the data recovery operation: 0.12% (i.e. one error every 834 data recovery operations, in green on the chart).
  • Scenario 2: RAID5 system with five desktop-class 300 GB hard disk drives (1.2 TB total). Frequency on which data recovery operations is necessary: one every 2.3 years (orange on the chart). Probability of a system failure during the data recovery operation: 11% (i.e. one error every nine data recovery operations, in green on the chart).
  • Scenario 3: RAID5 system with 50 desktop-class 300 GB hard disk drives (15 TB total). Frequency on which data recovery operations is necessary: one every 3 months (orange on the chart). Probability of a system failure during the data recovery operation: 70% (i.e. one error every two data recovery operations, in green on the chart).

RAID5
click to enlarge
Figure 1: Data loss probability on RAID5 systems.

As you can see, the probability of data loss during a data recovery operation increases with both the number of hard disk drives in the system and the capacity of each hard disk drive.

RAID6 Advantages

RAID6 systems instead of storing only one parity and error correction information store two, which are arranged in such a way that even if one of the hard disk drives fails during the data recovery process, the systems continues operational, with no data loss.

On Figure 2 you can see the probability of data loss during a data recovery procedure on RAID0 (in blue), RAID5 (in yellow the probability of hard disk drive failure and in pink the probability of a system failure) and RAID6 (in light blue).

RAID6
click to enlarge
Figure 2: RAID0, RAID5 and RAID6 comparison.

The "y" axis shows the number of months until a unrecoverable failure while the "x" axis shows the system capacity, in GB.

As you can see on the graph, RAID6 only has the same failure probability of RAID5 on systems starting at 23 TB, below this point RAID6 presents a failure probability far lower than RAID5, being the recommended system for storage systems where reliability is the key word.

How to Setup a RAID System

RAID stands for Redundant Array of Independent Disks and with at least two hard disk drives you can setup them as a RAID array in order to increase the disk performance or to improve data reliability. In this tutorial we will teach you how to setup a RAID system on your PC.

As mentioned, there are two ideas behind RAID: performance (a.k.a. RAID0) and reliability (a.k.a. RAID1).

RAID0, also known as data striping, is set when you want to improve your disk performance. It works by dividing the files to be written on disk into several chunks (called stripes) and saving each chunk on a different drive. For example, if you have a 200 KB file and two hard disk drives, it will be cut into two 100 KB chunks and each chunk will be saved on a different hard disk drive.

This is a very summarized explanation; in reality each stripe must be a power of two and is configured when you setup the RAID system. If your RAID system uses 128 KB stripes, it would divide our 200 KB file into two 128 KB chunks (the rest of each stripe, 28 KB, would be left empty). If our system were using 32 KB stripes, our 200 KB file would be divided into eight 32 KB chunks, and the system would send four chunks to each hard disk drive.

But how this improves performance? In the example we gave, instead of storing one 200 KB file, each hard disk drive will store a 100 KB file. The time spent storing a 100 KB file is theoretically half the time spent storing a 200 KB file. Basically what we do on RAID0 is to put the hard disk drives to work in parallel.

The total disk capacity on a RAID0 system is the sum of the total capacity of the two hard disk drives. So if we use two 80 GB hard disk drives, our disk system will have 160 GB capacity. You can even create "partitions" on your RAID system, so you can have more than one "disk" on your system.

So if you want to build a high-performance system, consider buying two disk drives with smaller capacity and configuring them as a RAID0 system instead of buying one high-capacity hard disk drive.

If you are thinking of having two drives just to separate data (e.g. one drive for operating system and programs and the other for data like documents), go ahead and assemble a RAID system, as, like we mentioned, you can create "partitions" on your RAID system (keep in mind, however, that you cannot remove one of the drives and install it on another computer expecting to read its contents like you would do normally – it won't work).

On Figure 1 we summarized how RAID0 works.

RAID0
click to enlarge
Figure 1: How RAID0 (data striping) works.

RAID1, on the other hand, does not improve performance, but is targeted to improve the data reliability of your PC. It works by copying everything that is sent to the first hard disk drive to the second, and that is why it is also known as mirroring. Consider RAID1 as a hardware-based backup system. If the first hard disk drive fails, the second one takes its place immediately.

Since the second disk drive is a backup disk, the total disk capacity on a RAID1 system is the capacity of the first disk drive only. So if you have two 80 GB hard disk drives configured as RAID1, the total disk capacity will be 80 GB.

If you are concerned with data reliability, RAID1 is the way to go.

On Figure 2 we summarized how RAID1 works.

RAID1
click to enlarge
Figure 2: How RAID1 (data mirroring) works.

There are other RAID configurations as well, but not all RAID controllers support them (all controllers support at least RAID0 and RAID1). Here is a small summary of other common RAID systems your RAID controller may support:

  • RAID0+1: It is a system using RAID0 and RAID1 at the same time. It needs four identical hard disk drives. If one of the hard disk drive fails, the system becomes a RAID0 system (data striping).
  • RAID10: It is a system using RAID0 and RAID1 at the same time. It needs four identical hard disk drives. If one of the hard disk drive fails, the system becomes a RAID1 system (mirroring).
  • RAID5: It is a RAID0 system storing parity information for better reliability. It needs at least three identical hard disk drives. On a three-drive system the total capacity will be the size of each hard disk drive times two (and not three) – for example, if three 80 GB drives are used, the total disk capacity will be of 160 GB, as the rest of disk space is used to store parity information.
  • JBOD: Stands for "Just a Bunch of Disks" and isn't a RAID system, as it doesn't improve disk performance or disk reliability. It is used to join two drives with different capacities as if they were a single drive. For example, you can use JBOD to add a 40 GB hard disk drive to an 80 GB hard disk drive to appear as a single 120 GB to the system.

Remotely Manage Devices in Windows 2008 Server Core

Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles. You can read more about Server Core in the "What's Related" section at the bottom of this page.

Getting to the point of this article, remotely managing Server Core is not as hard as it seems. You can read more about it on several of my articles, but the point is that most things can be done remotely by using the regular MMC-based snap-in Administration tools, WinRM and WinRS, and even through Remote Desktop.

This article focuses on remote administration via the MMC-based Administration tools. In order to get these to work across the network you will need to run the following command on the server core machine (or on any other Windows Server 2008 server for that matter):

netsh advfirewall firewall set rule group="remote administration" new enable=yes

The above command will allow for most remote management tools to work out-of-the-box. However, in addition to allowing the MMC snap-ins through the firewall, using Device Manager remotely requires additional configuration. If you don't perform the following steps you will end up with this error:

Running Device Manager remotely

To allow Device Manager to connect to a remote computer, you must first enable the "Allow remote access to the PnP interface" setting on the target computer's Local Group Policy.

1. On a Windows Vista or Windows Server 2008 installation, start the Group Policy Object MMC snap-in by typing MMC in the Run box and pressing Enter.

2. In the Add or Remove Snap-Ins window, scroll to find Group Policy Object Editor, and click Add.

3. In the Select Group Policy Object window, click Browse.

4. In the Browse for Group Policy Object window, click Another Computer, and either type or browse for the remote server core machine.

5. In the Select Group Policy Object window, click Finish.

6. In the Add or Remove Snap-Ins window click Ok.

7. In the Group Policy of the remote computer, navigate to Computer Configuration -> Administrative Templates -> System -> Device Installation.

8. Enable the Allow remote access to the PnP interface setting.

9. Close the MMC console (you don't have to save it, but you can if you want to).

10. Restart the Server Core installation.

Now you can connect to the remote server core machine and manage its devices by using Device Manager.

1. Open Computer Management through the Administrative Tools folder.

2. Right-click Computer Management and select Connect to another computer.

3. In the Select computer window, type or browse to the remote server core computer. Click Ok.

4. Expand System tools -> Device Manager. Note that now you can perform changes on the listed devices.


Manage Windows Server 2008 R2 Core with SCONFIG

As you probably know by now, in Windows Server 2008, the Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles.

The Server Core installation option of Windows Server 2008 and R2 provides the following benefits:

  • Reduced maintenance - Because the Server Core installation option installs only what is required to have a manageable server for the AD DS, AD LDS, AD CS, DHCP Server, DNS Server, File Services, Print Services, Web Server and Hyper-V server roles, less maintenance is required than on a full installation of Windows Server 2008.
  • Reduced attack surface - Because Server Core installations are minimal, there are fewer applications running on the server, which decreases the attack surface.
  • Reduced management - Because fewer applications and services are installed on a server running the Server Core installation, there is less to manage.
  • Less disk space required - A Server Core installation requires only about 1.5 gigabyte (GB) of disk space to install and approximately 2 GB for operations after the installation.
  • Lower risk of bugs - Reducing the amount of code can help reduce the amount of bugs.

While Server Core itself is, in my opinion, one of Microsoft's greatest positive investments in the past 3 years, one of the major implementing pains for Core is the lack of GUI-based management tools. For those that have never seen a Server Core, this is the way it looks:

Pretty scary, if you're not used to CLI tools.

BTW, it's not that Server Core cannot run GUI-based tools. In fact, there are a bunch of tools that still run fine on Core, such as Task Manager, Notepad, Regedit, and a couple of Control Panel Applets. In addition, you may be able to run many 3rd-party software such as Mozilla Firefox and others. In addition, the management tasks for Server Core can be performed remotely by using GUI-based MMC Snap-Ins, as long as you initially configure the machine with a proper IP address, add it to a domain (if needed) and open the correct Firewall rules and ports.

Luckily for us, most of this pain has been solved by usage of the either manually created scripts, 3rd-party graphical user interface tools, and lately in R2 - the SCONFIG tool.

SCONFIG was initially developed for Microsoft Hyper-V Server 2008, a free virtualization platform that is based on Windows Server 2008 RTM Core and that has the Hyper-V role pre-installed. There have been clients who have gone ahead and copied the script onto their Core installations on other machines. Since then, SCONFIG was made a  part of the R2 release of Windows Server 2008.

With SCONFIG you can manage many aspects of the Server Core machine. SCONFIG dramatically eases server configuration for Windows Server 2008 R2 core deployments. With SCONFIG, you can easily set your system up, get it on the network so you can easily manage the server remotely.

Note that SCONFIG is also localized in almost 20 languages.

To run SCONFIG simply enter sconfig.cmd in the command prompt window, and press Enter.

Navigation through SCONFIG's options is done by typing a number or letter representing the correct configuration or information option. These tasks include:

1) Join a Domain/Workgroup
2) Change Computer Name
3) Add Local Administrator
4) Configure/disable Remote Management
5) Windows Update Settings
6) Download and Install Updates
7) Enable/disable Remote Desktop
8) View/change Network Settings
9) View/change Date and Time
10) Log Off User
11) Restart Server
12) Shut Down Server
13) Exit to Command Line

For example, to enable remote management of the machine, one would:

Press 2 to configure a computer name. Reboot.

Press 1 to join to a domain. Reboot.

Press 8, 0, 1 to set the computers IP address.

Press 4 and then configure remote management.

SCONFIG can  get up and running within a couple of minutes, and best of all, it's built-in so you do not need to download and install any 3rd-party tool. However, as with most tools, there are some things that you cannot do with SCONFIG, such as install server roles or features, or run DCPROMO and so on. For those, you need to either know the command line tool, or use a script or 3rd-party tool. For example, read my "Installing Active Directory on Windows 2008 Server Core" article.


Free Tool to Manage Windows Server 2008 R2 Core with a GUI: Visual Core Configurator

As you probably know by now, in Windows Server 2008, the Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles.

In Windows Server 2008 and Windows Server 2008 R2, Server Core installation does not include the traditional full graphical user interface (GUI). Therefore, once you have configured the server, you can only manage it locally at a command prompt or PowerShell (in R2). It is also possible to manage the server remotely using the Microsoft Management Console (MMC) Snap-Ins, command-line tools that support remote use, or the new PowerShell remote management capabilities.

SCONFIG is a built-in tool that is in fact a collection of scripts which can help you get the server up and running within moments. Read more about SCONFIG on my "Manage Windows Server 2008 R2 Core with SCONFIG" article. However, even SCONFIG cannot fully give you the entire set of tools that are needed to fully configure and manage Server Core. For example, tasks such as installing server roles or features, or running DCPROMO and so on. For those, you need to either know the command line tool, or use a script or 3rd-party tool. For example, read my "Installing Active Directory on Windows 2008 Server Core" article.

One of these tools is Visual Core Configurator 2008, created by Guillermo Musumeci. The tool is free to use, and can be obtained here:

CtxAdmTools - Visual Core Configurator 2008
http://ctxadmtools.musumeci.com.ar/VisualCore2008/VisualCore11_Beta2_Refresh.html

After downloading the tool, either copy the files to the Server Core machine, or if it's a virtual machine, use the ISO file download instead.

Run the tool.

The main screen should appear, allowing you to select from many options.

Some of these include:

Network menu

  • Network: Show Network Information: Show IP, DNS and NIC configuration
  • Network: Network Manager: View or change IP, DNS and WINS configuration
  • Network: Change Computer Name / Domain / Workgroup: Change Computer Name or Join to a Domain / Workgroup

System menu

  • System: Control Panel: Customize the Operating System (Time and Keyboard)
  • System: Event Viewer: Display monitoring and troubleshooting messages from Windows
  • System: Services: Manage Windows Services
  • System: Screen Saver: Change Screen Saver Configuration
  • System: Remote Desktop: Configure Remote Desktop (prev. Terminal Server Administration Mode)
  • System: Video: Configure Screen Resolution
  • System: Windows Update: Install Windows Updates and HotFixes

Tools menu

  • Tools: Windows Explorer: Show Files and Folders
  • Tools: Notepad: Tool to Edit Files
  • Tools: Registry Editor: Tool to Edit the Registry
  • Tools: OS Information: Show Operating System Information

Exit menu

  • Exit: Close Visual Core: Close the Application
  • Exit: Shutdown: Log Off, Restart or Shutdown the Computer

Pretty impressive!


Understanding Windows Server 2008 Server Core

One of the most exciting new features of Windows Server 2008 is its ability to install as a Server Core machine.

A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles. A server running a Server Core installation supports the following server roles:

  • Active Directory Domain Services (AD DS)
  • Active Directory Lightweight Directory Services (AD LDS)
  • DHCP Server
  • DNS Server
  • File Services
  • Print Services
  • Streaming Media Services
  • Internet Information Services (IIS)
  • Windows Virtualization

In Windows Server 2008, Server Core installation does not include the traditional full graphical user interface (GUI). You can read more about how to locally and remotely manage Server Core machines by reading the list of articles available below.

This is, in a way, revolutionizing the way Microsoft is looking at GUI-based administration, a step enforced by other means such as Windows PowerShell and Microsoft Exchange Server 2007, all allowing strong command line management capabilities.

There are, alas, some GUI tools you might want to use in Server Core. Some of these include:

Task Manager:

Notepad (stripped down):

Time, Date, and Time Zone Control Panel applet:

Regional Settings Control Panel applet:

That's about it. The rest is all CLI and remote management.

What's new in the Server Core installation option?

The Server Core installation option of Windows Server 2008 requires initial configuration at a command prompt. A Server Core installation does not include the traditional full graphical user interface. Once you have configured the server, you can manage it locally at a command prompt or remotely using a Terminal Server connection. You can also manage the server remotely using the Microsoft Management Console (MMC) or command-line tools that support remote use.

Benefits of a Server Core installation

The Server Core installation option of Windows Server 2008 provides the following benefits:

  • Reduced maintenance - Because the Server Core installation option installs only what is required to have a manageable server for the AD DS, AD LDS, DHCP Server, DNS Server, File Services, Print Services, and Streaming Media Services roles, less maintenance is required than on a full installation of Windows Server 2008.
  • Reduced attack surface - Because Server Core installations are minimal, there are fewer applications running on the server, which decreases the attack surface.
  • Reduced management - Because fewer applications and services are installed on a server running the Server Core installation, there is less to manage.
  • Less disk space required - A Server Core installation requires only about 1 gigabyte (GB) of disk space to install and approximately 2 GB for operations after the installation.
  • Lower risk of bugs - Reducing the amount of code can help reduce the amount of bugs.

Issues with Server Core installation and upgrading from previous versions

Since Server Core is a special installation of Windows Server 2008, the following limitations are present:

  • There is no way to upgrade from a previous version of the Windows Server operating system to a Server Core installation. Only a clean installation is supported.
  • There is no way to upgrade from a full installation of Windows Server 2008 to a Server Core installation. Only a clean installation is supported.
  • There is no way to upgrade from a Server Core installation to a full installation of Windows Server 2008. If you need the Windows user interface or a server role that is not supported in a Server Core installation, you will need to install a full installation of Windows Server 2008.

Server Core versions

Server Core comes in Standard, Enterprise and Datacenter editions for i386 and x64 platforms. Most companies will probably go for the Standard edition because most of the differences found in the Enterprise and Datacenter editions of Windows Server 2008 won't be present in Server Core. The Enterprise Server Core will, however, allow you to utilize more processor and memory support, as well as clustering. Datacenter adds the whole Datacenter hardware program and 99.999 percent reliability.

Join a Domain in Windows 7

Joining your machine to a domain will let you enjoy the domain's benefits, such as scalability, central management, Group Policies, security and more.

Prerequisites

Before joining your Windows 7 machine to a domain, make sure you properly understand the following prerequisites:

Use Windows 7 Professional, Ultimate or Enterprise - Only Windows 7 these editions can join a domain. No, Windows 7 Home can't. Don't try it.

Have a  network Interface Card (NIC) - Duh, but unless you have one (or a wireless connection) how do you expect to connect to the server?

Be physically be connected to the LAN - Windows 7 (and previous OSs) has an LAN auto sensing feature. Whenever you disconnect from the network, a balloon appears in the tray area notifying you of the disconnection status. Note that Windows 7 can be joined in an offline mode to a Windows Server 2008 R2 domain, but that's a topic for a different article.

Have a valid IP address - Valid for the network you're connected to. You can either configure one manually, receive one from a local DHCP Server, or leave it as is and receive an APIPA address (whatever starts with 169.254.X.Y). If it's an APIPA address you're asking for potential problems, as APIPA and AD do not go together hand-in-hand.

Have all-time connectivity to the Domain Controller - Or at least one of them. The IP address you've configured (or leased) should be good enough to enable you to connect to one of the Domain Controllers on your Domain. You may test your connectivity with PING, but make note that a successful PING does not guarantee that you've got proper connection to the DCs.

Have a properly configured DNS server - Without a properly configured DNS server your workstation will not be able to connect to the domain. Even if it did (for example you had a working DNS server but you somehow messed it up or shut it down) it will take a lot of time to actually log-on, and many AD related administration tasks will not work. The DNS server must hold a zone with the exact name of the AD domain you're trying to join. It also must hold 4 SRV folders (you can tell by the "_" in their name). If it doesn't, you either misspelled the domain name or DNS zone, or the zone is not configured to accept dynamic registrations, or it's not a Windows 2000/2003/2008 DNS server, or the Domain Controller does not have a working connection with the DNS server (firewall problems, improper IP configuration, IPSec etc.)

Have all-time connectivity to the DNS server - Test your connection to the DNS server by PINGing it and performing an NSLOOKUP query.

Possess local Administrative power - A simple user won't do. You must be the local Administrator.

Know the correct domain name, Administrator's name and password - Misspelled your domain name? You won't get to the Username and Password prompt!

Got your domain name right? You'll be asked for a valid username and password. To be safe, enter one that has Domain Admins rights, although you could get away with less, depending on your AD configuration (by default, any domain user has the right to join up to 10 machines to the domain. But this setting may have been altered by the domain admin).

You can perform the preceding tasks by using the Computer Name tab in the System Properties dialog box from the Control Panel or by right-clicking My Computer, and then Properties or by pressing the Windows logo key and Break. You may also use the NETDOM command. I will cover both methods.

Method #1 - The Traditional Way

1. Open System by clicking the Start button, right-click "Computer", and then click "Properties".

2. Under "Computer name, domain, and workgroup settings", click "Change settings".

Actually, you can also click on "Advanced system settings" and click on the "Computer Name" tab.

A third method to get to the same place is to use the Control Panel. Type "Domain" in the search box, then click on "Join a domain" link.

Either way, you're there. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

3. Click the Computer Name tab, and then click "Change".

4. Under Member of, click Domain.

5. Type the name of the domain that you want to join, and then click OK.

You will be asked to type your user name and password for the domain.

Once you are successfully joined to the domain, you will be prompted to restart your computer. You must restart your computer before the changes take effect.

Alternatively, you can click "Network ID" to use the Join a Domain or Workgroup wizard to automate the process of connecting to a domain and creating a domain user account on your computer. This is a longer way and I'm not sure why people would want to use it, but I'll document it anyway.

Go through the steps of the wizard. Make sure you select "This computer is part of a business network".

Then select "My company uses a network with a domain".

Provide the domain name and proper credentials.

And again.

You will still need to restart when the wizard is done.

Method #2 - Using NETDOM

By using NETDOM you can accomplish the task of joining a domain from the command prompt, and do it all in one line.

NETDOM is now included in the core OS, unlike Windows 2000/XP/2003 where you had to install the Support Tools to get it.

Open a Command Prompt window with Administrative credentials and type the following line:

Notes: Replace DOMAIN.COM and DOMAIN with your correct domain name, and of course, enter the proper user credentials. Also note there's an additional "d" in "user" and "password", that is NOT a typo.

netdom join %computername% /domain:DOMAIN.COM /userd:DOMAIN\administrator /passwordd:P@ssw0rd

Reboot the computer to complete the process.