Debian: convert from RAID1 to RAID 0

i have a debian11 ssd server which is installed in RAID 1 MIRRORING

i use the server as webhost and for better performance (whith high volume of users) i need to use RAID 0 so data wil be split across 2 drivers

2 x 1TB disks

QUESTION IS: How to convert from RAID 1 to RAID 0 without reinstalling
the server

Asked By: wuqn yqow


In my (unfortunately deleted post) I showed the results of testing mdadam (included in Debian) RAID1, RAID0, RAID10, and single disk. The expected RAID1 performance -slightly slower write speed than single disk and nearly same read speed as RAID0- was not observed. After a deep search on the Internet I found an explanation that it is not an error, but a feature. The reason is to give kernel a chance to do two parallel reads for two independent program.
This is not the case in the BSD unix (FreeBSD, NET-BSD, OpenBSD) while it does not use mdadam subsystem.
But I must agree that while using SSD the disk performance (RAID0,1 none) may not be your main problem.
You did not described the server component: web-server (Apache/Lighttp/…), application module (PHP/python/…), database (mysql/postgres/…), number of CPU cores, amount of RAM, what kind of services it realises (static pages/dynamic pages/heavy downloads/…)

If I strictly answer your question: migration from RAID1 to RAID0 cannot be realised on-line. You have to stop the server, make backup to an external disk, then reconfigure the RAID0. It could be more easy, if you have some independent system disk. If not, you must reconfigure the RAID while installing the new Linux OS.

But with respect to comments above, it is highly recommended NOT to do this. The RAID1 is mainly used on server for better data protection.

Answered By: schweik
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.