"Rebuilding" RAID 0

Discussion in 'Mac Pro' started by Taipan, Sep 29, 2013.

  1. Taipan macrumors 6502

    Jun 23, 2003

    I'm a using a software RAID 0 in my Mac Pro, and one of the drives is starting to worry me. I haven't noticed any problems in actual usage so far, but sometimes, especially when the computer is running at night, I can hear one of the drives spin up every few minutes. I played around with disk sleep settings, but that didn't help, so I believe the drive is starting to fail on me.
    Now, if I want to replace that drive, how would I "rebuild" the RAID? Do I need to configure a new RAID and then copy the data from a backup, or could I just clone the dying drive with e.g. CCC and then replace it, rebuilding the existing RAID configuration?
    Thanks in advance!

  2. Macman45 macrumors G5


    Jul 29, 2011
    Somewhere Back In The Long Ago
    If one disk is dying I'd replace it......the rebuild process should be easy as long as you are usinng DU and avstandard GUID partition.
  3. ScottishCaptain macrumors 6502a

    Oct 4, 2008
    You better have backups, 'cause the 0 in RAID 0 stands for how many files you're gonna get back when one of the drives goes.

    That being said, there is no rebuild process. You create a new array, just as you did before when you initially setup your disk drives. That array will be empty, so you will need to do a complete restore to get all your data back.

    There is literally no way to preserve or "rebuild" a RAID 0 array, because your data is split in-between two separate devices. Removing one device or the other means that half your data has literally vanished, so there's nothing left to rebuild. You simply recreate the array and start over.

  4. nanofrog macrumors G4

    May 6, 2008

    Data written to the new disk (means a new array, even if only one disk was changed) will have to come from a backup source.

    Had this been a 1 or 10 (OSX can handle these) or parity based level such as 5 or 6 for example, then it could rebuild on its own automatically once the bad disk was swapped out.
  5. javebookes macrumors newbie

    Sep 29, 2013
    good,o there's nothing left to rebuild. You simply recreate the array and start over.[​IMG]
  6. deconstruct60 macrumors 604

    Mar 10, 2009
    If you are talking about doing a low bit level clone of the drive (low level formatting and all. In other words not the filesystem view of the data), then no. That isn't what the "rebuild" process would do even if there was an option in RAID 0.

    You can "clone" the whole RAID volume from the "filesystem" view of the set. Basically a back up with no archive aspects. Then do clone back to a set of "raw"/empty new RAID 0 set.
  7. snarfquest macrumors regular

    Jun 7, 2013
    Add the new drive and try to mirror the failing drive to it.... if you're lucky.

    If you're handy at some unix command line I'd use dd. Something like:

    sudo dd if=/dev/baddisk of=/dev/newdisk bs=128m conv=noerror,sync

    replacing "baddisk" and "newdisk" with the correct devices.
  8. Taipan thread starter macrumors 6502

    Jun 23, 2003
    That's what I meant, sorry if I didn't express myself clearly. I wasn't sure whether the cloning process is "low level" enough for the cloned drive to replace the dying one. Probably safer to create a new RAID and copy the data from a backup.
  9. slughead macrumors 68040


    Apr 28, 2004
    Whoa whoa... does that actually work? Holy tacos, that would be awesome.
  10. gr8pics macrumors regular


    Jan 20, 2008
    I have the same problem myself, a year old Lacie2big with 3x2 tb raid 0
    What on earth is the point of having a raid thats impossible to recover???
    Having to single disks are hundred times better.
    So, could someone please why raid 0 was invented and delivered as default by the world leading HD designer Lacie, is it all just a way of selling products to easily fooled consumers?
  11. VoR macrumors 6502a

    Sep 8, 2008
    It's a raid level, they're all very different. As people have already said, data in raid 0 is striped over two disks : This gives access to the full capacity of the two disks and roughly double the bandwidth - It has a very specific use case for performance and nothing else (as you're effectively doubling the chance of losing data and removing the possibility of recovery off a single blank disk).
  12. AidenShaw, Jan 1, 2014
    Last edited: Jan 1, 2014

    AidenShaw macrumors P6


    Feb 8, 2003
    The Peninsula
    RAID-0 gives you 200% of the space and nearly 200% of the performance for 200% of the price - and if a drive fails you've lost all of your data. (Or n*100% if "n > 2".)

    A standard drive gives you 100% of the space and 100% of the performance for 100% of the price - and if the drive fails you've lost all of your data.

    RAID-1 gives you 100% of the space and 75% to maybe 150% of the performance for 200% of the price - and if a drive fails you still have all of your data.

    RAID-0 is interesting for people looking for performance, and have a separate backup solution.

    BTW - all of my important data is on RAID-60 and is backed up.

    But to the OP - get a backup or 2nd copy of the entire disk ASAP. If one drive fails, all the data is gone.

    Have you checked the disks with S.M.A.R.T. tools?
  13. AidenShaw, Jan 1, 2014
    Last edited: Jan 1, 2014

    AidenShaw macrumors P6


    Feb 8, 2003
    The Peninsula
    I've fixed/replaced disks using similar commands - but only offline when booted from a live Linux CD. You're running with the blade guards removed - be very careful and understand exactly what you're doing.

    I would leave off the "noerror," from the command - at least on the first try. It says "if there's an input error, write garbage to the output". You want to at least see if there are any errors.

    Also, look at "dd_rescue" - it's an alternate version of "dd" that is written specifically to recover data from failing disks. It will make a quick pass to copy everything that reads successfully, and then go back and retry sections with errors using extended error recovery attempts.

    ps: IMO the "bs=128M" is excessive. Any blocksize over about 256K is little faster than 256K, and depending on the implementation might mean that 128MiB of garbage is written if you have a single sector with an error. (One big advantage to "dd_rescue" is that it uses "bs" for the first pass, and when retrying does single sector IO.)

    The craziest thing that I've done with "dd" is to recover a 16 TB RAID-0 volume (4*4TB disks) that disk controller errors had caused the meta-data on the drives to be corrupted. None of the actual file data was bad, but the descriptions of the RAID array had been mangled.

    This was a Windows system with software RAID-0, and with GPT drives the RAID metadata is on a very small first partition on the drive, and the RAID slices are on the second partition of each drive.

    I bought four more 4TB drives, and created a new RAID-0 array on them identical in size to the original. I booted from Hiren's live Linux CD, and copied partition 2 from each of the "bad" drives on top of partition 2 of each of the "good" drives using "dd". (It took nearly a week to copy the 16 TB.)

    I unplugged the bad drives, booted Windows, and the 16 TB was there and happy.

Share This Page