This article lists all the neccessary steps for installaing a Softwareraid.
Software RAID is when the interaction of multiple drives is organized completely by software.
- RAID Level 1 (mirroring) achieves increased security since 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 spead compared to RAID 1 - but all data will be lost if even one of the drives fails.
Our installimage, which is used to manually install an operating system, can be used to configure several raid levels. Also, the software RAID can be combined with
Servers pre-installed by Hetzner are configured with RAID superblocks (version 1.2) when this is supported by the operating system (so all systems with
Grub2 as the boot loader). When installing via
VNC it can occur that the installer uses other Metadata versions.
- Requirement: installed and configured mail server
/etc/mdadm.conf (CentOS) and change the following line:
Here a destination address can be specified directly. Alternatively, all emails sent to root can be forwarded to a specific email address using /etc/aliases.
You can also optionally configure the sending email address:
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
In order to remove a software RAID you can issue the following commands in the Rescue-System:
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, the drive can be formatted normally again (e.g. with ext3):
mkfs.ext3 /dev/sda mkfs.ext3 /dev/sdb
The result can be checked with:
The software RAID should be gone.
Then installimage can be used in order to install a new operating system.
If an OS is installed and software RAID is activated on the server, then purely running installimage and installing a new OS without software RAID won't work. The server won't boot in this case.