installimage icon indicating copy to clipboard operation
installimage copied to clipboard

Allow custom variables to be defined as 6th parameter on PART

Open cyberplant opened this issue 2 years ago • 6 comments

For example the SWRAIDLEVEL can be changed for different partitions:

SWRAIDLEVEL 1
PART /boot  ext3 512M
PART /      ext4 40G
PART swap   swap 4G
PART /mnt   xfs all "" SWRAIDLEVEL=0

Not tested yet, done quickly on the Github UI, can test it later.

cyberplant avatar Sep 06 '23 12:09 cyberplant

I had to do many adjustments but now it's working!

With this config file:

DRIVE1 /dev/nvme0n1
DRIVE2 /dev/nvme1n1
SWRAID 1
SWRAIDLEVEL 1
PART /boot  ext3 512M
PART /      ext4 40G
PART swap   swap 4G
PART /mnt   xfs all no array_raidlevel=0

I was able to get the first 3 partitions with RAID1 and the last one with RAID0.

NOTE: I changed the logic for the "crypt" part.. before it was just checking if the 5th column had anything, now it must say "yes" to have crypt enabled (it can be changed to any other word, of course).

This is the result after running it on one real server: image

cyberplant avatar Sep 08 '23 04:09 cyberplant

hey @asciiprod , what do you think about this?

I have adapted my launch scripts to use my patched version, but it could be better if we can merge it and we just go back to use upstream version.

I'm open to comments!

cyberplant avatar Sep 19 '23 15:09 cyberplant

Was able to create a RAID1+0 flawlessly with #85, thanks!

awsms avatar Oct 20 '23 21:10 awsms

Cool, glad to hear that, @awsms ! 😊

cyberplant avatar Nov 01 '23 17:11 cyberplant