Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Taipan

macrumors 6502a
Original poster
Jun 23, 2003
604
496
Hi!

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!

--
Timo
 

ScottishCaptain

macrumors 6502a
Oct 4, 2008
871
474
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.

-SC
 

nanofrog

macrumors G4
May 6, 2008
11,719
3
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.

-SC
+1

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.
 

javebookes

macrumors newbie
Sep 29, 2013
2
0
good,o there's nothing left to rebuild. You simply recreate the array and start over.
QP
 

deconstruct60

macrumors G5
Mar 10, 2009
12,298
3,893
.... or could I just clone the dying drive with e.g. CCC and then replace it, rebuilding the existing RAID configuration?

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.
 

snarfquest

macrumors regular
Jun 7, 2013
210
4
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.
 

Taipan

macrumors 6502a
Original poster
Jun 23, 2003
604
496
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.

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.
 

slughead

macrumors 68040
Apr 28, 2004
3,107
237
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.

Whoa whoa... does that actually work? Holy tacos, that would be awesome.
 

gr8pics

macrumors regular
Jan 20, 2008
173
4
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?
 

VoR

macrumors 6502a
Sep 8, 2008
917
15
UK
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?

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).
 

AidenShaw

macrumors P6
Feb 8, 2003
18,667
4,676
The Peninsula
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?

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?
 
Last edited:

AidenShaw

macrumors P6
Feb 8, 2003
18,667
4,676
The Peninsula
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.

Whoa whoa... does that actually work? Holy tacos, that would be awesome.

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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.