I have a Windows 2008 Enterprise on RAID 10 running Active Directory, Hosted Exchange, and a web server on HyperV VMs. Do I need a virtual RAID for Exchange? If so, why?

Edit: thanks everyone for the answer. Very helpful!

  • What do you mean by virtual raid? Do you mean creating multiple vhd files and joining them together in a software raid inside the vm? – longneck Aug 16 '12 at 1:13
  • 2
    It would be the same as wearing helmet when driving a car. Can save your life. Is that REALLY needed? Combine statistics about head injuries and decide. I would say - no. Just keep in mind, that whatever RAID you're putting in, it will add to access time to the underlying disks which are already protected by RAID 10. – Vick Vega Aug 16 '12 at 1:25
  • 4
    @VickVega I think a better analogy might be that it's like wearing a helmet under another helmet :). Sure safety is important, but one helmet is enough for all but the largest of heads. – MDMarra Aug 16 '12 at 1:50

Generally no, this is not a good thing to do.

Let your underlying storage do the RAID and don't add software RAID unless you have a compelling edge case, and even then you probably should reconsider your design. It will increase overhead, decrease performance, and not add a whole lot of benefit.

Software RAID has its place. That place isn't on top of hardware RAID.

  • 1
    Agreed, let the hardware manage the RAID logic, its usually better than Windows anyway. – Brent Pabst Aug 16 '12 at 1:29
  • I would disagree with the case of RAID 0 in software on top of RAID 1 in hardware, where separate controllers would suggest doing RAID in software. With mirroring in hardware, duplicate I/Os do not burden the OS, while striping can be done between controllers. But this is a corner (edge?) case. – Skaperen Aug 17 '12 at 4:50
  • Why wouldn't you just use the hardware for RAID 1+0 instead of splitting it between hardware and software? Any decent controller from the last 10 years should do 1+0 entirely in hardware. – MDMarra Aug 17 '12 at 10:51
  • It would be a bandwidth issue. Not all controllers utilize full bus bandwidth. Pairing controllers by striping between them can increase bandwidth. It depends on the hardware you have when this is or is not a benefit. It tends to be a benefit for lower priced hardware. – Skaperen Oct 15 '12 at 23:58
  • @Skaperen I don't really think that would be the case. Consider the following: SAS disks natively support multiple controllers. Most servers are single controller. A box that needs multiple controllers will usually be either a dedicated storage device (NAS) or a SAN node. In these cases, the native support for multiple controllers on SAS disks far outweigh the clustermuck that can happen by layering software RAID on top of hardware RAID. Using it in the way you describe is a serious edge case that people will design their architecture around avoiding. – MDMarra Oct 17 '12 at 14:57

Software RAID is really intended for use when you have multiple physical disks without an accompanying RAID capable HDD controller. If you have hardware RAID then I'm hard pressed to see where software RAID in addition to hardware RAID provides any benefit. To the contrary, software RAID on top of hardware RAID probably induces a performance hit on the disk subsystem.

There may be some edge cases where software RAID on top of hardware RAID provides some benefit, but I can't think of any at the moment. Furthermore, I'd be especially hard pressed to envision a scenario where using software RAID in a VM would provide any benefit... with or without underlying hardware RAID.

If you implement software RAID in your VM and the underlying non-RAID physical disk(s) fail, I'm hard pressed to see how the software RAID is helpful in this scenario.

  • You seem very "hard pressed." – Soviero Aug 16 '12 at 16:52

Software RAID inside a VM is generally a bad idea:

  • it doubles the number of write requests that the host system must handle
  • it degrades read cache efficiency on the host (if the client requests the same data from a different disk, how could the host know that the data is already cached)
  • the configuration is more complex (e.g. when transferring the VM to another host, you need to copy and reconnect both virtual disks)

Your VMs should behave as dumb as possible, which is even dumber than the default: disable the I/O scheduler, just write all data to the virtual disks as quickly as possible. Optimizing the head movements of a virtual disk with a fake geometry is not going to give good results, and this gives the "real" I/O scheduler a better chance to optimize the entire system.

Ideally, use a hardware RAID solution, not because hardware RAID cards are better (they aren't), but because they have battery backed up drive caches, which allows transactions on journaled filesystems to go through as soon as the journal entry has been transferred to the controller, rather than written to disk. This gives a significant speed boost.

  • 2
    "not because hardware RAID cards are better" - You just outlined why hardware RAID solutions are better. – ewwhite Aug 16 '12 at 13:01
  • 1
    The problem with hardware RAID is that only few solutions respect I/O priorities, which can lead to suboptimal scheduling. – Simon Richter Aug 16 '12 at 13:33
  • You gotta tune it! – ewwhite Aug 16 '12 at 19:39

The purpose of a RAID is to manage your storage hardware. Your host system should certainly use some form of redundant storage, be it local RAID10, or RAID 5/6/Z on a SAN, etc. Since a VM doesn't store its data on actual hardware, you're wasting resources if you spend CPU doubling up storage onto things that are only going to do the same thing over again.

Of course, everything depends on what you're trying to achieve. If you're an OS developer and need to test RAID software in your kernel, then RAID in your VM is probably a good thing. :)

But for most folks, it's a better idea to keep your VMs as small and lean as possible. Remove unnecessary software (or even better, don't install it in the first place), use sparse filesystems for storage, and always make sure your HOST system has a spare drive handy in case one fails. (You're building RAID10. You don't need four disks. You need five, at least.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.