Score:0

Did I install my ubuntu server correctly? (Software RAID)

mm flag

I tried to install ubuntu server on a software raid (raid6 to be precise) instead of a single (whole) disk.

Since this is new territory I'm not entirely sure if I did things correctly.

Here are the steps I took:

1.) Change the four disks from MBR to GPT (with gdisk).

2.) Created the same two partitions on every drive:

sda1: type 1 (ESP) 512M, sda2: linux 16G
sdb1: type 1 (ESP) 512M, sdb2: linux 16G
sdc1: type 1 (ESP) 512M, sdc2: linux 16G
sde1: type 1 (ESP) 512M, sde2: linux 16G

3.) Disabled CSM in the BIOS (otherwise the installer would not let me choose a boot drive)

4.) Formatted sda1,sdb1,sdc1 and sde1 to vfat using mkfs.vfat /dev/sd{X}{n}¹

5.) Created the RAID6 with mdadm --create /dev/md10 --level=6 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sde2 and waited for it to completely sync.

6.) Selected RAID6 drive /dev/md10 as root partition (/ with ext4)

7.) Selected each drive (/dev/sda,/dev/sdb,/dev/sdc and /dev/sde) as "Use as Boot Device"

I know I didn't have to install the bootloader (I guess?) on each of the four drives and I'm aware that changes to initramfs will probably only affect the current used boot partition (and not all of them).

I'm also thinking of just using one drive as boot partition to make things a little bit easier.

Did I manage to setup my system in a correct way?

I'd love to hear if my understanding (especially about that boot partition) is correct.

¹ If left alone (with no file system) the ubuntu installer crashes and reports "bad superblock on /dev/sd{X}{n}"

pl flag
Is that enough disk space for `/` (and all your data)? Also, I note no swap partition. I would use a swap partition over a swap file, when on RAID of any kind. And I wouldn't have zero swap, ever.
Marco avatar
mm flag
@popey Thank you for the space concern. I'm merely using a small disk size for testing, since synchronizing the raid array takes quite some time. This means once I'm sure this setup works out, I'll repeat the process just with a bigger partition size. I'm not sure what you mean with swap partition but I'm guessing it's a place for the OS to temporarily store stuff from RAM?
pl flag
If it's only for play/test then don't worry about it too much. But on a final production installation, you should configure some swap space. Depends what applications you're running and how memory hungry they are. But I would always have a bit of swap space configured. You could for example steal 1GB of each disk, and make four swap partitions of 1GB each, and while that's possibly overkill, it means you'll never have zero swap, no matter how many disks fail out of the array.
user535733 avatar
cn flag
"*using one drive as boot partition to make things a little bit easier*" is wise. Complexity = More stuff that can crash. Back when I used RAID, one drive was excluded from the array, and housed the entire OS. The RAID was mounted after boot to hold data (not the OS). The system was bootable regardless of problems with the RAID.
Marco avatar
mm flag
@user535733 _"one drive was excluded from the array, and housed the entire OS."_ That is what I had in mind too but I'm on a budget. But, after you saying this, I'll probably do the same because it's very easy conceptually. I have to give it some more thought though.
Marco avatar
mm flag
Nevertheless, I'd like to know if I did my setup correctly :-)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.