This article lists all the necessary steps for installing a software raid.
Software RAID is when the interaction of multiple drives is organized completely by software.
- RAID Level 1 (mirroring) achieves increased security: even if one drive fails, all the data is still stored on the second drive.
- RAID Level 0 (striping) leads to double the capacity (with two drives) and increased reading speed compared to RAID 1. But all data will be lost if even one of the drives fails.
Our installimage, which you can use to manually install an operating system, is also useful for configuring several different RAID levels. Also, you can use it to combine software RAID with
Servers pre-installed by Beehosting are configured with RAID superblocks (version 1.2) if this is supported by the operating system. (So that applies to all systems with
Grub2 as the boot loader). Therefore, if you’re doing your installation via
VNC, the installers might use other metadata versions.
Email notification when a drive in a software RAID fails
- Requirement: installed and configured mail server
/etc/mdadm.conf (CentOS) and change the following line:
Here, you can specify a destination address directly. Or, you can forward all emails sent to root to a specific email address using /etc/aliases.
You can also optionally configure the sending email address:
MAILFROM [email protected]
For Debian and Ubuntu, it is important that you set
AUTOCHECK in the file
# grep AUTOCHECK= /etc/default/mdadm AUTOCHECK=true
For CentOS, you must enable the check in the file
# grep ENABLED /etc/sysconfig/raid-check ENABLED=yes
/etc/sysconfig/mdadm and add the email address that you want the notification sent to next to the variable
Removing a software RAID
To remove a software RAID, you can issue the following commands:
mdadm --remove /dev/md0 mdadm --remove /dev/md1 mdadm --remove /dev/md2
mdadm --stop /dev/md0 mdadm --stop /dev/md1 mdadm --stop /dev/md2
After that, you can format the drive normally again (e.g. with ext3):
mkfs.ext3 /dev/sda mkfs.ext3 /dev/sdb
You can check the result with:
The software RAID should now be gone.
Then you can use installimage to install a new operating system.
If an OS is installed and software RAID is activated on the server, then just running installimage and installing a new OS without software RAID won’t work. The server won’t boot in this case.