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

Open
cyberplant wants to merge 1 commit from zytedata/patch-1 into master
cyberplant commented 2023-09-06 14:12:07 +02:00 (Migrated from github.com)

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.

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 commented 2023-09-08 06:05:31 +02:00 (Migrated from github.com)

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

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: <img width="329" alt="image" src="https://github.com/hetzneronline/installimage/assets/1236332/8825543f-5395-424f-a10d-a43d02f1dc44">
cyberplant commented 2023-09-19 17:09:13 +02:00 (Migrated from github.com)

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!

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!
awsms commented 2023-10-20 23:08:35 +02:00 (Migrated from github.com)

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

Was able to create a RAID1+0 flawlessly with #85, thanks!
cyberplant commented 2023-11-01 18:08:36 +01:00 (Migrated from github.com)

Cool, glad to hear that, @awsms ! 😊

Cool, glad to hear that, @awsms ! 😊
lraphael commented 2024-09-03 20:23:33 +02:00 (Migrated from github.com)

Would something like this also work?

SWRAID 1
SWRAIDLEVEL 1

PART /boot ext3 1024M
PART lvm vg0 20G
PART lvm vg1 all array_raidlevel=0

LV vg0 root / ext4 20G
LV vg1 swap swap swap 4G
LV vg1 clusterstorage /var/lib/longhorn ext4 all

Would something like this also work? SWRAID 1 SWRAIDLEVEL 1 PART /boot ext3 1024M PART lvm vg0 20G PART lvm vg1 all array_raidlevel=0 LV vg0 root / ext4 20G LV vg1 swap swap swap 4G LV vg1 clusterstorage /var/lib/longhorn ext4 all
cyberplant commented 2024-09-16 02:52:19 +02:00 (Migrated from github.com)

@lraphael sorry for the delay. Yes, I think it should work, but keep in mind that you need to populate the "encrypt" field before our custom variables.

@lraphael sorry for the delay. Yes, I think it should work, but keep in mind that you need to populate the "encrypt" field before our custom variables.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin zytedata/patch-1:zytedata/patch-1
git switch zytedata/patch-1

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff zytedata/patch-1
git switch zytedata/patch-1
git rebase master
git switch master
git merge --ff-only zytedata/patch-1
git switch zytedata/patch-1
git rebase master
git switch master
git merge --no-ff zytedata/patch-1
git switch master
git merge --squash zytedata/patch-1
git switch master
git merge --ff-only zytedata/patch-1
git switch master
git merge zytedata/patch-1
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage!85
No description provided.