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

First I want to say thank you for this invaluable service that is NextCloud which you’re offering.

I am relatively new to Linux and servers in general but I am in the midst of setting one up to run NextCloud on an x86-system and I’m sort of scratching my head trying to figure out how to set up my disks for the safest and most reliable home server rig with the hardware I posess.
(Safe in terms of potential software and hardware failures, not external factors like a house fire ('cept maybe theft in regards to data encryption))

It’s an older PC with an i5 CPU and 8GBs of RAM that I intended to run Ubuntu 18.04 LTS on.
I also got an 120GB SSD and 2 x 4TB NAS-type HDDs and what I’m wondering is:

If I install the OS and NextCloud itself on the SSD then put the data folder for NextCloud on one of the HDDs then regularily backup the data to the second HDD… If the SSD were to crap out would I still be able to somehow access the data on one of the HDDs?

What I assume might be stopping me is the encryption that NextCloud employs on the data.
If so then I would also need to backup the OS and NextCloud together with the Apache2-server and MySQL database if I’m thinking correctly?
Or is there another way to decrypt the stored data without the original NextCloud instance?

A different approach would be to regularily backup both the SSD and main HDD to the second HDD but I am not sure if the backed up NextCloud instance and data would function properly because the directories and what not would be all screwed up on the backup I think.

So if what I just wrote makes any sense and I’m not full with misconceptions (which I very well might be) the easiest/most stable route would be ditching the SSD and just run everything on one HDD then regularily do a full snapshot backup of it to the second HDD, right?
With 8GBs of RAM an SSD might be uneccesary anyway.

I hope my questions came out somewhat clear and that someone might be able to point me in the right direction… Appreciate any advice you can give me

How about this: Create a RAID-1 mirror set of the two 4 TB disks, install your entire system on them, and then use the SSD for caching with something like bcache. Then you can lose any single disk in the system without losing any data. Get an external hard drive for your backups.

The problem with this setup is it’s not reliable at all. Quite the contrary, any disk failure would take down the whole system, so now you’re 3x as likely to experience a failure than if you’d just used a single disk to begin with. Having a backup doesn’t count when determining reliability of a system.

Nextcloud doesn’t encrypt data at rest, only in transit. If you want it encrypted on disk, then you need to do full disk encryption with the OS, and understand that you will have to type a password to unlock it at each boot.

1 Like