2

I am going to Kickstart a CentOS 7.x installation with software RAID 1 remotely for the first time. So I am kinda inexperienced at this and wondering what I need to make this work correctly.

A CentOS 7.x kickstart with hardware raid, I use the following partition configuration:

# Disk partitioning information
part biosboot --fstype=biosboot --size=1
part /boot --fstype=ext4 --size=1024
part / --fstype=ext4 --size=10000
part /vz --fstype=ext4vz --size=40768 --grow
part swap --size=4096

This works very well.

However since I have never ever done a software RAID 1 on CentOS in general, I am wondering what the correct commands are to do so? I did some searching, but most tutorials / information I found on Google is pretty dated or uses LVM (Volume Group), which I don't want.

I want the exact same thing as I have above, but this time with software RAID 1.

Can someone give me a workable example of how this can be done? And do I need to make changes as well to other aspects of my Kickstart configuration? E.g. bootloader configuration.

Oh and I don't use EFI. Don't know if that is important to mention.

Sorry for popping the question. I did search, but couldn't find any workable information and/or examples to experiement with. And as I said; I am doing this remotely and I don't have direct access (well unless I drive).

Thanks in advance!

//edit #1

I wanted to give it a go on a local test machine with 2x 120GB SSD's in software RAID 1. So I went through the CentOS 7.x installer by using this tutorial for the CentOS 7.x installation GUI.

Well after a wait, I rebooted and apparently it was setup correctly:

Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/md127     ext4      9.5G  4.7G  4.4G  52% /
devtmpfs       devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs          tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs          tmpfs     1.9G  9.7M  1.9G   1% /run
tmpfs          tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/md124     ext4       74G   53M   70G   1% /vz
/dev/md125     ext4      488M  149M  305M  33% /boot
tmpfs          tmpfs     379M  4.0K  379M   1% /run/user/42
tmpfs          tmpfs     379M   48K  379M   1% /run/user/1000
tmpfs          tmpfs     379M     0  379M   0% /run/user/0

So since this was setup correctly I decided to take a peak at the anaconda-ks.cfg file. No partition scheme in there. Okay, so I checked the next file "initial-setup-ks.cfg". Same thing, no partition scheme. Sigh.

I always thought that your current setup, through the installer GUI, was reflected in those files? Wishful thinking apparently. So I am back to scratch again...

//edit #2

Nobody has an idea on how to do this correctly? :(

2
  • I tend to try out tools such as system-config-kickstart whenever I need to do something which I have not done recently and then learn the needed format from there. Jul 2 '19 at 12:18
  • I already tried that, but I still don't understand how to set it up with that configurator either along with RAID 1 and no LVM. Also there is hardly any usable / updated information about that. I am now running a normal setup (with GUI) and do it that way to see how to KS file looks like. Thanks though for the idea.
    – HudsonHawk
    Jul 2 '19 at 12:38
4

Well fixed it by giving it a go and using the following:

part biosboot --fstype=biosboot --size=1 --ondisk=sda
part biosboot --fstype=biosboot --size=1 --ondisk=sdb

part raid.01 --size=1024  --ondisk=sda
part raid.02 --size=10000 --ondisk=sda
part raid.03 --size=40768 --grow --ondisk=sda
part raid.04 --size=4096  --ondisk=sda

part raid.05 --size=1024  --ondisk=sdb
part raid.06 --size=10000 --ondisk=sdb
part raid.07 --size=40768 --grow --ondisk=sdb
part raid.08 --size=4096  --ondisk=sdb

raid /boot --level=RAID1 --device=md0 --fstype=ext4 raid.01 raid.05
raid /     --level=RAID1 --device=md1 --fstype=ext4 raid.02 raid.06
raid /vz   --level=RAID1 --device=md2 --fstype=ext4vz raid.03 raid.07
raid swap  --level=RAID1 --device=md3 --fstype=swap raid.04 raid.08

No clue if this correct, but apparently it works. I only wished someone could have provided some help with this. Oh well... Wishful thinking.

1

What you're looking for is called mdadm,

mdadm - manage MD devices aka Linux Software RAID

See this answer for setting it up, CentOS kickstart automated setup with parted / RAID.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.