mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdev/dracut: add site support for early devices to the kdump case
The existing code can already determine the required devices for the
actively running system, but this does not work for execution environments
in different (disaster recovery) sites.
Kdump likely does not notice when running in a different site and does not
re-generate the kdump initrd (because the kdump config itself does not
change).
The new code allows users to explicitly specify devices required for early
boot in initrd on different sites. Assuming this is a small number of
devices and could even overlap between the root-fs and the kdump case, do
not further distinguish those two sets of devices, but simply use the same
marker attribute "zdev:early=1" for both cases. With all this site
information available at the (initial) kdump initrd generation, the
resulting kdump initrd can work on any site without having to re-generate.
Complements commit 3c7adcc3c81d ("zdev: dracut: modifiy the
module-setup.sh").
Github-ID: https://github.com/ibm-s390-linux/s390-tools/pull/158
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
9d08fd8c7e
commit
ed106d7f28
@@ -86,12 +86,27 @@ install() {
|
||||
chzdev --export - --persistent --by-attrib "zdev:early=1" --quiet \
|
||||
--type 2>/dev/null >> "$_tempfile"
|
||||
|
||||
# site support
|
||||
# Obtain early device configuration for site-specific settings
|
||||
for (( site=0; site<10; site++ ))
|
||||
do
|
||||
chzdev --export - --persistent --by-attrib "zdev:early=1" --site $site \
|
||||
--quiet 2>/dev/null >> "$_tempfile"
|
||||
done
|
||||
|
||||
ddebug < "$_tempfile"
|
||||
|
||||
# Apply via --import to prevent other devices from being configured
|
||||
chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \
|
||||
--yes --no-root-update --force 2>&1 | ddebug
|
||||
|
||||
# Apply site-specific configurations via --import
|
||||
for (( site=0; site<10; site++ ))
|
||||
do
|
||||
chzdev --import "$_tempfile" --persistent --base "/etc=$initdir/etc" \
|
||||
--site $site --yes --no-root-update --force 2>&1 | ddebug
|
||||
done
|
||||
|
||||
lszdev --configured --persistent --info \
|
||||
--base "/etc=$initdir/etc" 2>&1 | ddebug
|
||||
|
||||
|
||||
Reference in New Issue
Block a user