I have created a raid10 array using mdadm. Metadata version is 1.2. I want to convert this to a raid0 array, is it possible?
P.S. I am having terabytes of data, I want to avoid copying the data over.
I have created a raid10 array using mdadm. Metadata version is 1.2. I want to convert this to a raid0 array, is it possible?
P.S. I am having terabytes of data, I want to avoid copying the data over.
Yes.
As of mdadm version 3.2.1, and running a "suitably recent kernel" (whatever that means, I'd guess at least 3.0), a reshape from RAID10 to RAID0 is possible. This means a pretty recent Linux distribution; the system that you're running on may need an upgrade, or you may need to temporarily boot to a live CD type of environment with newer tools to do the conversion.
To make the change, it'll be something along these lines:
And do keep in mind the caveats that have been mentioned. Running anything on RAID0 is incredibly risky; you will see a failure eventually.
No.
What you CAN do is remove the mirrors from the RAID-10 array, make those new spares into a new RAID-0 array, move all data over, and then add the remaining drives to the new RAID-0 array.
If mdadm supported growing RAID-0 arrays. Which it doesn't.
Switch to LVM instead.
Well, that's what I get for trying to answer with a complicated theoretical scenario without having a VM handy to test it on. It's just not going to happen... but the comments below are good explanation and maybe worth saving.
Yes, you can. It's ugly, not easy, and prone to really screwing it up, but...See this answer on Superuser.com for the gist of things. You should fail two drives out of your array, but make sure that they are the correct two drives. Do this with the system in read-only mode so that if you fail the wrong drives out in software you can restore them back and try again.
Once you've failed those drives, mark them into a new RAID 0. You can't grow a RAID 0, so when you initialize it you'll need to initialize all four drives at once (you could do two then two more, but it must have all four to start). You'll need to make sure that the first two drives you add in are in the right order and not the mirrored pair.
Again, do everything in read-only mode first to test that this works and you have the right drives in the right order first.