Buildegg Articles Computer Hardware Analysis

14Oct/0978

RAID 1 Mirroring with Windows 7

Hate the idea of possibly loosing all of your files if (and when) you hard drive dies? Considering implementing a mirrored array (RAID Level 1) for your important data. Most PC users today have two immediate options for building a mirrored array of hard disks: their motherboard's chipset and within Windows. This article focusing on setting up and managing a mirrored array by using Windows 7.

What is RAID 1? What is a 'mirror'?

RAID Level 1 can also be referred to as a mirrored array of hard drives. Mirroring is implemented when fault tolerance is desired. Fault tolerance is the ability of the data contained in the array to remain intact if one of the drives fails. In a mirrored array, all of the data is duplicated across 2 or more hard drives. The general idea: All of one's important data would be stored on a mirrored array, and if one of the hard drives dies (which should be assumed, they die often), the data is still accessible / usable from the other drive. During a state of "failed redundancy", the volume is now only one hard disk, and it would be smart to replace the failed disk promptly to rebuild the array. Common categories you may want to store on a redundant (same thing as "fault tolerant") array: years of pictures, videos, documents, music, and hard-to-replace software install packages.

Why use Windows instead of the Chipset?

Any decent motherboard today will have a chipset whose hard drive controller will offer various levels of RAID. Using the chipset for RAID arrays is necessary if you intend to install the operating system on the array, like if you want a striped array (RAID 0) for performance, however a mirrored array can be implemented using the chipset or dynamically through Windows (other OS's do it too... I'm just focusing on Windows).

For the purposes of having a mirrored array, I strongly suggest building it through Windows instead of the chipset for the following reasons:

  • Portability - A Windows array will survive if you have to replace / upgrade your motherboard; a chipset array will most likely not survive a mobo upgrade (because the mobo will probably be using a different hardware controller).
  • Manageability - "Create and Format Hard Disk Partitions" is the Windows 7's GUI for managing your hard drives and volumes. It is much better than trying to use a seemingly out-dated text utility from the motherboard's chipset.
  • No Performance Hit - A true RAID controller (a separate expansion card; normally expensive) will offer superior performance for any RAID array, but considering the options available to you now, both the mobo's chipset and Windows offload the array functions to the CPU, and any speed difference is negligible. See this video comparing a striped array setup through various ways.

How to set up a Mirrored Array in Windows 7

The environment for this quick tutorial is as such: the operating system, Windows 7 RC, is installed on a hard drive that will, of course, not be involved in the RAID 1 array. Also note, Windows will refer to disks as either "basic" or "dynamic", and to their partitions as "volumes".

A WD 320 GB RE2 Hard Drive

A WD 320 GB RE2 Hard Drive

  1. Install two hard drives. For my tests, I installed two WD 320 GB RE2 drives. Visit Buildegg's Component section to see the best hard drives to buy.
  2. Boot up Windows, hit the start button, and in the search box type either "Create and" or "Disk man", and click "Create and Formant Hard Disk Partitions". This program is also accessible through Control Panal -> System and Security -> Administrative Tools -> Create and Formant Hard Disk Partitions.
  3. If these drives have never been used, it may ask you to initialize them, in which case you'll most likely be using "MBR".
  4. If the new disks do not say "Unallocated" in them, then delete their volumes by right-clicking on each disk's volume and going to "Delete Volume..."
  5. Now lets create the RAID: right-click on one of the disk (doesn't matter which), and go to "New Mirror Volume..."

    New Mirrored Volume

    Creating a New Mirrored Volume

  6. A series of prompts will ask you about some details of your new mirrored volume (array), like which disks are to be included, size of the volume, drive letter assignment, and volume name. In my example, I chose Disk 1 and Disk 2 (Disk 0 being my original disk with the OS on it), the full size available (its default), drive letter M, quick format, and "WinMirror" as the volume name.

    A Mirrored Volume has been created in Windows 7

    A Mirrored Volume has been created in Windows 7

That's it! Transfer all of your important files to your new "drive" and have a little peace of mind. Here's an idea... map all of your Windows libraries (those default ones, Documents, Pictures, etc) to your mirrored array, and you can upgrade hardware / format and reinstall windows all day long and not have to worry about your data.

What happens when a hard drive fails? How do you recover?

The whole point for setting up a mirrored array is anticipating the time when one of the hard drives fail and die. There are two points in time where failure might happen: while the computer is on and you're using it, or somewhere between the computer being shut off and turned back on. I simulated a drive failure while using the mirrored volume and I was able to continue working on files; accessing them and saving them. What is interesting is that Windows will not inform you that the array in an unhealthy state (at least, it never told me...); you wont know until Windows is restarted. When you boot your system back up after one of the drives have failed, you will notice your mirrored volume missing (when you go to access something from it). Fear not, your data is still there, just open "Create and Format Disk Partitions" and manage the situation.

Inside Window's disk manager you'll find the still functioning disk, and it will be flagged with "Failed Redundancy", of course meaning that the mirrored volume is no longer redundant because the other drive failed. In the most common situation I can imagine for most of us, you will need access to your files, and it may be a few days (or weeks) before you can replace the failed hard drive.

  1. First lets gain access to our files. Right-click on the dynamic disk that is still functioning and go to "Remove Mirror..."

    Remove Mirror from Failed Redundancy Volume

    Remove Mirror from Failed Redundancy Volume

  2. Select and remove the missing (failed) disk. In my example, Disk 1 was the disk that failed, so I'm keeping Disk 2 and removing Disk 1 (which is labeled just as "Missing").

    Select and Remove the Missing Disk

    Select and Remove the Missing Disk

  3. Now you're left with a "Healthy" simple volume from which you can continue to use all of your data.
  4. Get a replacement hard drive so you can rebuild the mirror. NOTE: Most hard drives now have 3-5 year warranties, and all you have to do is go to the manufacturers website, fill out the RMA, and send in the defective drive.
  5. Fast forward to the time that you install a replacement hard drive (this may be an hour later, or weeks later).
  6. Open the Windows disk manager "Create and Format Disk Partitions" and make sure that the new drive is initialized and is unallocated.
  7. Right-click on the disk that survived (the one from the original mirror), and go to "Add Mirror...". Follow the prompts and add the new drive.
  8. Now you have a new RAID 1, Mirrored Volume. You'll notice that both drives in the array say "Resynching", which is pretty much the one drive being copied to the other. This process may take the better part of a day if you have large drives, but thats okay because it's being done in the background -- you don't have to worry about it.

Some Notes

A mirrored array is just a controller (in this article's case, Windows) automating and managing the duplication of data across two hard drives. If the mirrored volume is done through Windows 7, you can pull one of the hard drives out and move it to another computer, and use the data. I can't really think of a practical reason to do this, but just in case you ever run into the situation of installing a drive from your mirror into a new or different computer, here is how: Install the drive into the other Windows 7 computer. Open the disk manager and you'll find the drive in the GUI list, but it will be flagged as "foreign". You will need to right-click on that drive and go to "Import Foreign Disks...".

Import a Foreign Disk

Import a Foreign Disk

Follow the prompts and it will soon become a simple volume. Now you have all that data on two different computers. Why? I don't know. :P

Comments (78) Trackbacks (4)
  1. I am very happy with my (W7Raid1) mirror set on a couple of 1.5TB 7200rpm Barracudas which just outperform my much more expensive Velociraptor 300 system disk (using HDTune to compare).
    However, it seems that MS have implemented the design for resynching very strangely. The source disk for resynching performs r/w at normal speed, but the target performs at about 10% normal speed. Hence the resynching of a newly inserted (1.5TB) disk took 60hrs. In addition, it seems that Windows Update may, repeat may, apply updates to one of the mirrored disks, forcing resynching on next reboot.
    Can you comment, perhaps inform, on exactly how MS resynchs, and if there is any way to give it more priority and speed it up?

  2. Very nice and usefull article!
    I googled for this info and always foud only pieces what i needed.
    But here I’ve found all clear summarized.
    Thanks!

  3. the article isn’t full. try removing primary drive as if it failed and you will have the problem. windows wont boot from secondary drive of a mirror

  4. Great article it is very straightforward and appears to be easy to do. However, I have one question…why didn’t you mirror the entire C: drive…OS and everything. If you did that could you not just go on your merry way if C: drive decides not to work?

  5. What if I need to reinstall Windows. Will the new installation recognize the mirrored setup from my previous installation? What do I have to do?
    Thanks!

  6. @Anton: It is a complete article since the author specifically mentions that he uses a seperate HD for his OS. Most likely, people will use a SSD for their OS and use the mirror raid setup for their data. If your data is safe, a windows reinstall offers no problems
    @Tony Nicola: If you mirror the C: Drive (as in OS HD), as Anton allready mentioned, you won’t be able to boot from the secondary drive of the mirror. So with a seperate disk for your OS it keeps more “manageable”

  7. Any tips on mirroring an active primary boot disk “Drive C”?

  8. Do you advise against mirroring system disk/partition…?

  9. “you can pull one of the hard drives out and move it to another computer, and use the data. I can’t really think of a practical reason to do this” – I had to do this when a power supply failed and my spare power supply could only support 2 hdd and one dvd drive and I thought I’d replace the mobo while I had the pc open. Initially the “missing disc” wasn’t listed in disc manager, “remove mirror” and “break mirror” were greyed out, and clicking “reactivate volume” generated the error “missing plex”. Right clicking the mirrored disc and selecting “offline” then “online” again and disc manager displayed the missing disc and allowed me to remove the mirror.

  10. Nice article. For those commenting about mirroring your boot drive, you really should read the article.

  11. This is a very clear article, can I suggest an addition – the conditions under which w7 will permit a RAID 1 mirror. For me the drive which I want to mirror has the new mirror option greyed out. But it’s there for a smaller drive ( which I don’t want to mirror). I think this is because the unallocated space is less than the drive I want to mirror (even though they are identical drives). I’m still working on this but the topic of what to do if the add mirror option is greyed out would be a good addition to your article.

  12. Are the same procedures used to mirror the “C” drive?

  13. I had a friend help me set up a RAID array with 4 drives, 2 and 2.. one for TV one for Movies.

    On boot up, the RAID says it is there, but during the course of me leaving for work, and returning, windows 7 no longer recognizes the array’d volumes. They are not in the list..

    Any suggestions to help out?

  14. Re-syncing in windows 7 takes ages, yes, its not a hardware problem, more a windows 7 problem. It is true that mobo raid is not as good if u change mobo,. but if u not, fuck it

  15. You state that using a software RAID for Windows is better. I have a question though as it seems that most imaging software does not play nicely with fakeRAIDs. Do you have a suggestion as to which imaging software would work well with a software RAID?

  16. To Anton:

    You can boot from a mirrored sytem disk if one fails no problem…

    You just mirror both the system reserved partition and your boot drive to a second empty disk.
    Disk 1 = |System Reserved|c:\|
    Disk 2 = |System Reserved|c:\|
    Or if you only have c:\ then just mirror that (depending on how Windows was installed you may not have system reserved partition – just c:)

    When you create a Mirror of the system drive with Windows 7, Server 2008 and Server 2012 the OS creates a startup boot menu consisting of the boot OS (“Windows 7″) and a second choice (“Windows 7 – Secondary Plex”)
    So the boot menu looks like:

    Server 2008 (Default)
    Server 2008 – Secondary Plex

    Both of the above will boot.

    If the mirrored drive fails no problem it will still boot from the primary as normal.
    If the Primary fails then unplug it from the m/board, plug the secondary drive into the port the primary was connected to and it WILL boot.
    (just choose secondary plex on the boot menu)

    When windows boots you can break the mirror, turn off the PC, stick a blank hard drive into the motherboard port the secondary was originally in, recreate the mirror as mentioned earlier an voila redundancy again.

    Just one thing to mention, after reapplying the mirror to the new hard drive your boot menu may look like below;

    1. Windows 7 (Default)
    2. Windows 7 – Secondary PLEX
    3. Windows 7 – Secondary PLEX – Secondary PLEX

    To tidy this up run “msconfig” to delete any non working options on the menu (test them first just to be sure) and also set whichever you want as the default.

    To change the menu text of the OS you are currently booted into you will have to run bcdedit /set description “menu description goes here” from an elevated command prompt.
    Do the same for the other working menu choice by booting into it them and following the above.

  17. The only issue I have found with using the Windows 7 Mirror function is that if your primary drive fails he mirror won’t boot, which really defeats the purpose of having 2 mirrored drives. any body have any idea of how to resolve this problem? That is without having to put my operating system on a separate drive.

  18. Good article… saved me from experimenting

  19. @anton .. there’s nothing wrong with the article, just plenty of ignorance on your part. For starters, you can’t create a RAID 1 solution on an existing Windows install – this can only be done from scratch and you’ll need at least 3 disks. I’m not going to bother with you though, so here’s a primer: http://www.tomshardware.com/forum/2109-63-setup-raid-existing-system.

    @@Rares .. if you’re introducing a mirror to a new Windows installation (which is what i believe your basically asking), you’d have to import the mirrored pair (foreign disks) to the new install, via Disk Management. So, no, Windows won’t recognize the disks (let alone see them in explorer) *until* you import them.

  20. I have a laptop with room for only one internal hard drive, which is a Toshiba 250GB. I also have an external USB v2.0 hard drive, which is also a Toshiba 250GB. Is there a way to Mirror from Internal to External? Should the external drive be disconnected for kind of a while and then reconnected, would I be asked to commit accumulated changes to this external drive immediately after plugging it in?

  21. Thanks a lot!

  22. Having just precipitated yet another ‘resynching’ operation by accidentally crashing my machine – (absent-mindedly hit the stop button rather than softly closing) I have had occasion to look a little further into why resynching takes so long.
    First, it is best to safe boot without internet. You cannot reboot during a resynch operation, it will start all over again.
    Next, I watched again using Performance Monitor and saw:

    One drive is not being read, only written, and vice versa.
    The drive being updated is doing so at a measly 7MB/sec, this on a drive which should be in the 70+ bracket.
    But this time, I looked a little further and found that the queue length for the ‘target’ drive is 0.97.
    The queue length is what determines the update speed as the drive cannot service another IO request when it is already serving a current IO request, thus a well managed IO queue for a drive should be around 1.

    That is nearly the end of the story except one final thing… I have ONE spindle with a number of disks on each of my mirrored drives. If I had a number of independent spindles on a drive (imagine my 1.5TB was really 3 x 200G physical units) then the IO queue length could be as high as 3 and the resulting IO (writing) rate would be 21 MB/sec.

    I ask myself. Is it worth buying 6 new (cheaper) drives to replace my 2 current drives? It would add to everyday speed somewhat, but generally they are only ‘slow’ when facing a deluge of IO requests like this. Normally the caching keeps them feeling zippy. And I only do such a stupid thing about once a year and then have to wait for 3 days whilst my computer goes sluggish. (And I have a nifty laptop to get on with in the meantime for email and stuff).

    Hope this little bit of extra light on the subject will amuse or make someone happier.

  23. Just to anticipate someone a bit picky… should be 3 x 500G units. So difficult to differentiate drives from disks, hence used units.

  24. Great write up. It answered my questions regarding Windows 7 “New mirrored volume”. Thank you very much.

  25. I am not sure why people are even talking about mirroring the OS drive? We are talking about your end user workstation right? It takes all of 10 minutes to install the OS over again if it fails or the disk fails. You don’t really need redundancy for the OS.

    With that The mirror is more important for your personal data (documents,video,photos) that you wouldn’t want to lose. Great Article!

  26. Great job on explaining things! Right to the point. . . . Thanks!

  27. I’ve tried W7 dynamic disk mirroring.
    Setup is easy, but the recovery is quite “stupid” in my case.
    I have 4 partitions on each physical disk, so when the mirror rebuilds, the 4 rebuilds AT THE SAME TIME.
    This makes the rebuild very slow (and noisy), for the head jumps between the 4 partitions.

    Still, the portability advantage is undeniable.
    Will have to manually rebuild the partitions one by one tho…

  28. Hi
    I arrived here as i was also searching for Raid 1 mirror including Boot+OS
    Let simplifi the complicated questions…
    Why people want Mirror of the OS drive ???
    I have my example

    SO i have my os installed , a lot of special programs which is hard to reinstall + a lot of setups for them, like Photoshop, Corel, Bookkeeper programs , printers which are setupped, hard keys installed, special setups in network, Simulators which takes 3 days to reinstall, etc also with datas too
    So if we take that its a hardware failure of a harddisk in this case it would be preferable to have the mirror of the whole drive , not just the datas.
    So when i have to reinstall the whole thing it takes more than one week as i forget a lot of small setups in os which lately notice …:) so that’s why i stick with OS mirror (of course i have ghosted also ,but i tried to find alternate )
    So like “K”was mentioning before i didnt understand that exactly this “You just mirror both the system reserved partition and your boot drive to a second empty disk.”
    Its mean that i have to mirror the partition just , or first morror the partition than mirror the Disk ??? :S
    i missed something…?


Leave a comment

(required)