Command line repair of RAID5 set on Server 2008 HyperV (or Core)

hyper-v-server-2008-r2windows-server-core

I have a HyperV box that is showing bad blocks on one of the disks. I got this from diskpart;

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          148 GB  4096 MB
  Disk 1    Online         1863 GB      0 B   *
  Disk 2    Online         1863 GB      0 B   *
  Disk 3    Errors         1863 GB      0 B   *

I typed;

sel disk 3
offline disk
online disk

And now it's showing simply as online. Is that enough? Presumably it can work around a bad block or two. Is there any way of re-formatting the failing and re-syncing it with the array from the command line. Will I have to replace it immediately?

Update – still shows 'Failed Rd' after repair

So using a spare cable, I've plugged in a brand new additional HDD. Apparently I'm supposed to leave the existing unit in place as it cannot repair an array with a missing disk (I don't know why – that would have seemed to be the point). Then I did the following to initialise it;

sel disk 4
convert dynamic

then to repair the array;

sel vol 0
repair disk=4

As I understand it, this is supposed to use the new disk 4 to repair the array without the failing disk 3. And as expected, I get this;

  DISKPART> list vol

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 0     E   E_RAID5_4TB  NTFS   RAID-5      3726 GB  Rebuild
  Volume 1     C   C_BOOT(MIR)  NTFS   Partition     39 GB  Healthy    System
  Volume 2     D   D_DATA(MIR)  NTFS   Partition     52 GB  Healthy
  Volume 3     G   G_IMAGES(MI  NTFS   Partition     52 GB  Healthy    Boot

However after around 12-24 hours the array reverted back to Failed Rd and 1863 free space on the new disk. I've tried twice now with the same results. I'm now trying the simpler recover command but I'm expecting the same result.

Over the last decade or so, this has continued to be my experience with RAID. For personal servers where the frequency of drive failure is relatively small (around every 2-3 years om average), I'm certainly of the opinion that Windows RAID is less hassle than any hardware controller that always seems to be deprecated by the time I need to use it for recovery. However, I don't think I've ever managed to recover a RAID array with either hardware OR software easily and live the dream the way it was promised.

When (as I expect) the recover command fails to repair the disk, I'm going to try physically putting the new HDD in place of the failed disk and try to bring it online that way. I seem to vaguely recall doing something similar last time.

I'd be grateful of further advice to this situation though, even if it's to remind me the steps for replacing the physical disk.

Best Answer

The RAID array will come with it's own software. Most controllers will let you run the software under core. If not you can run some under BIOS and some off a CD. With RAID array you usually need to introduce a new harddrive as a hot spare, it will then add it to the RAID itself and re-sync. A changed harddrive is now a new harddrive with regards to the raid array. Doing it any otherway, you could lose your whole array. Read The Fine Manual regarding your RAID controller.

Related Topic