convert Raid5 to Ra...
 
Notifications
Clear all

convert Raid5 to Raid0 stripe

9 Posts
3 Users
0 Reactions
8,438 Views
(@heinrich)
Posts: 9
Member
Topic starter
 

I have a Raid5 with 3 HDs of 6TB each (= 12TB volume).
I want to convert this into a Raid0 (stripe) using two of these HDs (volume size 12TB).

Can I do this without loosing all data on the current volume?
How?

Idea is to remove 1 HD from the Raid5 volume and convert the remaining two HDs from incomplete Raid5 into Raid0.
Is this possible?

 
Posted : 15/02/2016 11:40 pm
(@softraid-support)
Posts: 9197
Member Admin
 

No this is not possible, sorry.

 
Posted : 15/02/2016 11:52 pm
(@smayer97)
Posts: 113
Member
 

Though SoftRAID cannot do this directly, there is a way to do this, if the following condition is met. In this case, if the data on the RAID 5 ≤ 7.2TB, there is a work around, as follows:

1. Defragment the RAID 5 so all the data is contiguous.

2. Resize the RAID 5 to be at most 7.2 TB. This will free up space on the drive at the end of your RAID 5 volume.

3. Create a 3-drive RAID 0, at least as large as your data, ≤ 7.2TB.

4. Copy the data from the RAID 5 to the 1st RAID 0.

5. Delete the RAID 5.

6. Create a 2nd RAID 0 ≥ the size of your data but ≤ 7.2 TB, using any of the 2 drives from the freed up space.

7. Copy the data from the 1st RAID 0 to the 2nd RAID 0.

8. Delete the 1st RAID 0.

9. Resize the 2nd RAID 0 to the full 12TB.

Now you can repurpose your 3rd drive. You can to all this without losing any data (as long as nothing fails along the way).

P.S. If you do not repurpose your 3rd drive, you can make your new RAID 0 18 TB by first creating a 3-drive RAID 0 in step 6, then you can resize that RAID 0 to 18 TB in step 9.

 

This post was modified 1 week ago by smayer97
 
Posted : 12/04/2026 12:39 am
(@smayer97)
Posts: 113
Member
 

For anyone that may want to know how math works for the maximum condition to convert a RAID 5 to a RAID 0, this is how: 

n = number of y drives.

X = the total capacity of a single drive

Y = the size of one slice of the RAID 5 (R5)

Z = the size of one slice of a temporary RAID 0 (R0)

                   --------------------------------------------

        X         |              Y                 |         Z          |

                   --------------------------------------------

1. R5 = Y * (n-1)

2. temp R0 = Z * n

3. X = Y + Z   -> Y = X - Z

 

4. The maximum condition is that R0 ≥ R5.

5. Sub in 1. & 2. -> Zn ≥ Y(n-1)  ->  Z ≥ Y(n-1) / n

6. Then sub in 3. -> Z ≥ (X - Z)(n-1) / n   ->  Zn ≥ X(n-1) - Zn + Z  ->  2Zn - Z ≥ X(n-1)  -> Z (2n-1) ≥ X(n-1)  ->  Z ≥ X(n-1) / (2n-1)

(this is the maximum size the slice of the temp R0 can be, therefore the maximum size of the temp R0 = Zn (as per 2.), and therefore, the maximum size the data in R5 can be, since R0 ≥ R5.

 

So as an example, if n = 3 drives, and X = 6TB per drive, the max size the slice of the temp R0 drive can be is Z ≥ 6(3-1) / (2*3 -1) = 2.4TB, so the max slice of the temp R0 can be = 2.4 x 3 = 7.2TB.

 

In the OP example, he wanted to free up the 3rd drive, so needs to create a 2nd 2-drive R0, which is the same size as the original R5 to start, in step 6 above.

 

This post was modified 1 week ago 2 times by smayer97
 
Posted : 12/04/2026 1:21 am
(@smayer97)
Posts: 113
Member
 

So the final formula to determine the condition to be met if you can:

1. Convert a RAID 5 to a RAID 0 OR

2. Convert a RAID 5 to a RAID 0 AND remove a drive is:

temp R0 ≥ Xn (n-1) / (2n-1), which is the max data that can be preserved to use this work around.

where X = the size of the individual drives, and n = the total number of original drives.

This post was modified 1 week ago by smayer97
 
Posted : 12/04/2026 1:44 am
(@softraid-support)
Posts: 9197
Member Admin
 

@smayer97 

Most users would just create the new volume and restore from backups. But if anyone ever needs this, you have documented it for them.

 
Posted : 12/04/2026 11:17 am
(@smayer97)
Posts: 113
Member
 

The whole point of the approach I outline is when you do not have extra drives or a backup. Otherwise, why would anyone be asking?

 
Posted : 14/04/2026 3:42 am
(@softraid-support)
Posts: 9197
Member Admin
 

@smayer97 

RAID is not backup. If your data is important, you need at least two extra copies, one off site. Data is Ephemeral, there are so many ways you can lose data, so it is critical having multiple backups. that is why most users do not consider such workarounds. they have adequate backups, so can reconfigure their systems on occasion. 

 
Posted : 14/04/2026 11:30 am
(@smayer97)
Posts: 113
Member
 

I so wholeheartedly agree. I have MULTIPLE too. But as you have seen many times, not everyone does this.

 
Posted : 16/04/2026 8:19 pm
Share:
close
open