fix: Installation with mdraid mirroring with oem-resize and oem-systemsize set #2893
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes # Installation with mdraid mirroring with oem-resize and oem-systemsize set.
Changes proposed in this pull request:
do not device lock the not yet started $RaidDev:
Otherwise we observe in the boot.kiwi debug log:
I removed the set_device_lock for raid activation.
set partition type to fd for raid:
Not strictly necessary:
If we do not enable oem-resize the partition type would be fd/raid and name p.lxraid as created by the kiwi/storage/disky.py.
assemble once after repart with devicesize update:
Otherwise the btrfs resize fails, because writing to raid device fails.
The mdadm --grow succeeds but if we look at the raid status afterwords in /proc/mdstat we observed:
and with mdadm --examine for the underlying root partition, we still see the old partition size at "Avail Dev Size".
With an additional assemble the Avail Dev Size is reported correctly. Then the mdadm --grow actually resizes and is in state active and ready for the btrfs resize.
I added a new helper function update_devicesize_mdraid to assemble with --update=devicesize option and stop the array afterwards. The raid array is then ready for activation/resize.