1. Home
  2. Knowledge Base
  3. Provider Guides
  4. Provider Guide: Hetzner – 2 ways to Raid 0

In this document, we’ll go through how to setup a Hetzner purchased server, using 2 method to mount your disks in Raid 0.

Make sure your server is in Rescue Mode.

  1. Type the command installimage like shown below.

2. You will now be presented with a Distro selection screen:


3. Select either Ubuntu or Debian. The next screen will allow you to choose a version.

2 things here:

1. Go for a version QuickBox/QuickBox Pro Supports

2. Select one ending with Your-Version-64-minimal. For example; Ubuntu-1804-bionic-64-minimal

4. After selecting your version the following screen appears:


5. Leave SWRAID at 1, change SWRAIDLEVEL to 0 and type a proper HOSTNAME like Plex-Media-Server (can be done later as well during QuickBox set up) like shown below:


Method 1 – LVM

Find the lines shown below and delete them:




Now go up a bit and uncomment and change the LVM area lines to look like this:


It will take 512 megabyte and use it for boot and use the rest diskgroup you define a bit below.
Here you use 10G for swap, 20G for temp and all the rest of the storage for a / mount.

Ps. the Swap line can be removed entirely on systems with lots of ram/space 

Hit F10 and Save:


Method 2

  1. Find this section below:

2. and change the line into this:


It will use 8G for swap, 512 megabytes for boot and all the rest of the storage will be put in /

Ps. the Swap line can be removed entirely on systems with lots of ram/space 

3. Hit F10 and Save:


4. Accept this warning:


Depending on the method chosen the final screen will look similar to this:


Notice the Raid level 0, and the Formatting partitions corresponds with the set up we made.

Last thing to do is simply – run reboot command and then you can go for a Quickbox set up described in detail https://quickbox.io/knowledge-base/standard-install/

Advanced – Fresh Hetzner server with 2X 3TB HDD and 120GB SSD?

First steps.
  1. In the installimage you’re going to comment out the 2 HDDS’s.

2. Just put an # in front of them.

3. Make sure you disable SWRAID by setting it to 0 and SWRAIDLEVEL can be set to anything since it wont utilize it.

4. Just hit F10 and accept the warnings.

5. After linux is done installing you’ll need to reboot like shown in the initial part of this guide in the section above!

Secondly when reboot is done.

First run lsblk to grab the name of each drive youre looking for /dev/sda and /dev/sdb you wont need the SSD obviously

For each drive you’ll need to type fdisk /dev/sdx replace the x with the letter of the drive. and you’ll want to use option n to make a new partition, just go ahead and use the smaller value for start and biggest value for last sector since I’m sure you want to utilize the whole drive, then option p to print the partition table then option w to finalize the whole thing. repeat for all the drives involved.

Once that’s done type the command ls /dev/sd[a-d]* this will list each of the drives and their partitions and the output should look something like this /dev/sda /dev/sda1 /dev/sdb /dev/sdb1 /dev/sdc /dev/sdc1 /dev/sdd /dev/sdd1 mind you will only list devices within that scope therefore you’ll probably only have 4 entries.

After that you’ll want to fire up mdadm and create a raid array but we will be doing it using the partition device files and not the disk devices. You’ll be using /dev/sda1 and /dev/sdb1 instead of /dev/sda and /dev/sdb for this.

Anyways type in the command mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1 you’ll want to change /dev/md0 in the command above to something not already being used and you’ll want to change /dev/sda1 and /dev/sdb1 to the appropriate letters and numbers. You can take note of what mdx is being used when you run lsblk you can also change the raid level from 0 to 1 if you want/need the security of not losing your files.

Next you’ll want to type the command ls -l /dev/disk/by-uuid and take note of the entries that are there. You should NOT see an entry for your new array.

You are going to type the command mkfs.ext4 -F /dev/md0 make sure you swap /dev/md0 with whatever you used before.

Then you’ll want to type the same command again from the previous step ls -l /dev/disk/by-uuid and you should see a new entry. copy that new entry but you only need the UUID so it should look similar to lrwxrwxrwx 1 root root 11 Jul 18 17:12 c9399944-da22-456a-8c6b-d768ac3471b1 -> ../../md4 you only need the c9399944-da22-456a-8c6b-d768ac3471b1 part.

Lastly we need to add the whole thing to your fstab file.

Type nano /etc/fstab and add the entry. You should be adding something like this to the bottom of the file

UUID=c9399944-da22-456a-8c6b-d768ac3471b1 /path/to/mount ext4 auto 0 0 only things you need to change are the UUID and the /path/to/mount for obvious reasons. hit ctrl+x then y and enter and you’re all goof.

Now you may be wondering…

Why do you mount with the UUID instead of the /dev/mdx format everyone uses?

Random Internet Person

The reason is because sometimes for no apparent reason that I can find, Linux likes to rename stuff. I setup my array using /dev/md4 and after a reboot it gets renamed to /dev/md127. So had I mounted it in fstab as /dev/md4 the system won’t boot and creates a headache that takes you over a week to figure out why it doesn’t work.


Was this article helpful?


Please add bugs found in QuickBox Pro using this template:

Bug Report
Select Bug Report as the issue template

Please add feature requests for application inclusion in QuickBox Pro using this template:

Application Feature Request
Select Application Feature Request as the issue template

Please add feature requests for general QuickBox Pro using this template:

Select General Feature Request as the issue template
Select General Feature Request as the issue template

Viewing issues as well as feature requests does not require an account.

You will need to create an account on our Lab in order to post both Issues as well as Feature Requests.
You can register an account here if you do not already have one.

We look forward to your reports as well as your ideas and suggestions for ongoing developments to the QuickBox Pro software!

The QuickBox Pro Community Appreciation Day Event Sale is in full effect.
Get your savings on!