Optimal hard disk setup on Ubuntu 2 x SSD (Raid1) + 2 x HDDs (Raid1)

I want to ask you for help,
I am new to Nextcloud and Linux and i need help with setup.
Have purchased a home server with two SSDs and two HDDs. Is it possible to connect it as two SSD Raid1 and two HDD Raid1?

An SSD Raid1 would be Nextcloud system and HDD Rad1 would be storage.
Or is it a bad idea?

I greatly appreciate your help.

I believe this is not the topic of this forum, but for sure, everything is possible:


and/or simply (not for a System Partitions):

mdadm --create --verbose --level=1 --raid-devices=2 /dev/md1 /dev/sdc /dev/sdd
mdadm --detail --scan >> /etc/mdadm.conf

Here is also nice read about:

You can install System on raid SSDs and create a new one for a HDDs, just to be on a safe side, make raid size about 100 MB smaller then your HDD/SDD this will help if you will replace the disk and it is a bit smaller than your older one.
Then think about security and use encryption. In this case if one Disk fails, you will simply replace it with no care if somebody can repair drive and recover/read older information from it or not:

@gas85 Thank you very much for the prompt reply.
Than is ok to have Nexcloud installed on SSD raid and the DATA files on HDD raid?

Thank you.

Yes, you can. I have similar setup, but System is not on a RAID.

# lsblk
NAME                                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                                 7:0    0  93.9M  1 loop  /snap/core/9066
loop1                                 7:1    0    97M  1 loop  /snap/core/9289
sda                                   8:0    0   5.5T  0 disk  
`-sda1                                8:1    0   5.5T  0 part  
  `-md0                               9:0    0   5.5T  0 raid1 
    `-raid                          253:3    0   5.5T  0 crypt 
      `-raid--vg-data--lv           253:4    0   5.5T  0 lvm   /mnt/raid
sdb                                   8:16   0   5.5T  0 disk  
`-sdb1                                8:17   0   5.5T  0 part  
  `-md0                               9:0    0   5.5T  0 raid1 
    `-raid                          253:3    0   5.5T  0 crypt 
      `-raid--vg-data--lv           253:4    0   5.5T  0 lvm   /mnt/raid
sdc                                   8:32   0 465.8G  0 disk  
`-md1                                 9:1    0 931.3G  0 raid0 
  `-smallRaid                       253:2    0 931.3G  0 crypt 
    `-vg--smallraid-lv--smallraid   253:5    0   931G  0 lvm   /mnt/smallraid
sdd                                   8:48   0 465.8G  0 disk  
`-md1                                 9:1    0 931.3G  0 raid0 
  `-smallRaid                       253:2    0 931.3G  0 crypt 
    `-vg--smallraid-lv--smallraid   253:5    0   931G  0 lvm   /mnt/smallraid
sde                                   8:64   0   477G  0 disk  
|-sde1                                8:65   0   512M  0 part  /boot/efi
|-sde2                                8:66   0     1G  0 part  /boot
`-sde3                                8:67   0 475.4G  0 part  
  |-ubuntu--vg-ubuntu--lv           253:0    0   150G  0 lvm   /
  `-ubuntu--vg-nextcoud_previews_lv 253:1    0   150G  0 lvm 

Here 3 points to check.

  1. sda and sdb are created on a partitions as RAID 1, here is data folder of Nextcloud.
  2. sdc and sdd are created on a RAW as RAID 0 (just summarize size of disks, no relevant data here)
  3. and I have 1 partition for the nextcloud previews folder moved to the SSD (sde), so that it is increased access performance on a random access.

@gas85 thank you for being so helpful.
I really appreciate your time. Thank you

1 Like

I have managed to install Ubuntu 18.04 LTS and my disk are in RAID 1

2x 500GB SSD - Raid1 (md0) this is the primary disk ubuntu installation.


2x 5TB HDD - Raid1 (md1)

now im stuck,

md0 raid is mounted as /

and md1 raid as /srv

but now when i do cd /srv it points to the md0 /srv system not the second md1 /srv.

can i mount the second md1 to the systems md0 /srv?

after then i can install nextcloud and point data dir to the md0 /srv dir and be able to use that 5TB disk as data dir for NC.

loop0    89.1M squashfs          loop  /snap/core/8268
loop1    96.5M squashfs          loop  /snap/core/9436
sda     465.8G                   disk
└─sda1    465G linux_raid_member part
  └─md0 464.9G ext4              raid1 /
sdb     465.8G                   disk
├─sdb1    512M vfat              part  /boot/efi
└─sdb2    465G linux_raid_member part
  └─md0 464.9G ext4              raid1 /
sdc       4.6T                   disk
└─sdc1    4.6T linux_raid_member part
  └─md1   4.6T ext4              raid1 /srv
sdd       4.6T                   disk
└─sdd1    4.6T linux_raid_member part
  └─md1   4.6T ext4              raid1 /srv

Thank you for help.

Sure you can.

did you create FS on a md1?
How you mount it?
Have you an error when you mount it manually via

sudo mount /dev/md1 /srv

Just send a bit more info, e.g. output from:

mount | grep -w "md[0-9]"
df -H | grep -E "md[0-9]|srv"

Hi @gas85,

FS is on md0 500GB SSD and the 5TB raid is md1 and i will use it as data storage for nextcloud.

I edited the post above there is the structure of my disks.

noob question :slight_smile: :

when i mount md1 5TB to the FS md0 /srv than i set when i install Nextcloud a data storage path to the /srv it will be used as 5TB disk?

Thank you for your help.

But here it is mounted to the /srv. Please check it via:

df -H /srv

One point here, your /boot/efiis not a part of any RAID, this means if sdb fails you will not be able to boot anymore. I check tutorial and it looks like you have to create RAID for each folder:

you’ll need to create separate partitions and make a RAID1 device for /boot.


There is a way to move it with keeping a data, but looks a bit dangerous for beginners:

1 Like
sl@cloud:~$ df -H /srv
Filesystem      Size  Used Avail Use% Mounted on
/dev/md1        5.0T   93M  4.8T   1% /srv

now when i point nextcloud to /srv than it takes md1 /srv?

i create there a dir named /srv/Nextcloud/data.

For the /boot/efi i can reinstall ubuntu and make it mirrored im just learning and it is a good point i managed to make raid1 and excluded from it the bootloader. Stupid :slight_smile:

Thank you for your time.

1 Like

Please note: Raid is NO backup.

1 Like

Thank you all for help, i really appreciate it.