How to raid only 2 disks out of 3 avaialble via Hetzner rescue mode - installimage system?


Boot into rescue mode, then execute command "installimage",


then select operating system template.


then you will see configuration file where you cans ee available disks. To software raid only a few of avaialble disks, just delete disks (erase lines) that


you dont want to include in software raid.


Just leave naming of drives so its 1,2,3..
DRIVE1
DRIVE2


Example:
DRIVE1 /dev/sdb
DRIVE2 /dev/sdc
SWRAID 1


SWRAIDLEVEL 1


(in this case i deleted sda drive and set swraid level to 1 from 5)


Then F10 to save and proceed with installation of the OS.


Then after it is complete, i did command "reboot" then after 2 minutes login to SSH again and now im in newly installed OS. I change password by "passwd".


Then i see Raid is being built (synced):
cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid10] [raid0]
md0 : active raid1 sdc1[1] sdb1[0]
8388544 blocks [2/2] [UU]
resync=DELAYED


md1 : active raid1 sdc2[1] sdb2[0]
524224 blocks [2/2] [UU]
resync=DELAYED


md2 : active raid1 sdc3[1] sdb3[0]
2146435008 blocks [2/2] [UU]
[====>................] resync = 22.4% (482151616/2146435008) finish=269.6min speed=102874K/sec


unused devices: <none>
After couple of hours, it is complete:


cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid10] [raid0]
md0 : active raid1 sdc1[1] sdb1[0]
8388544 blocks [2/2] [UU]


md1 : active raid1 sdc2[1] sdb2[0]
524224 blocks [2/2] [UU]


md2 : active raid1 sdc3[1] sdb3[0]
2146435008 blocks [2/2] [UU]


unused devices: <none>