|
|
218d2d |
From 8d6098969aa9dc34edfd1bc96e6aa0384ae2fb99 Mon Sep 17 00:00:00 2001
|
|
|
218d2d |
From: Steffen Maier <maier@linux.ibm.com>
|
|
|
218d2d |
Date: Tue, 31 Jan 2023 09:14:40 +0100
|
|
|
218d2d |
Subject: [PATCH 09/23] feat(zfcp): minimize zfcp handling consolidated in
|
|
|
218d2d |
s390-tools
|
|
|
218d2d |
|
|
|
218d2d |
Parsing of rd.zfcp is handled by s390-tools zdev dracut module 95zdev as of
|
|
|
218d2d |
https://github.com/ibm-s390-linux/s390-tools/commit/06a30ae529a5d6ad2369ed81da056bf3a6147bb6
|
|
|
218d2d |
("zdev/dracut: add rd.zfcp cmdline option handling").
|
|
|
218d2d |
|
|
|
218d2d |
Even though this removes the last implementation of parsing rd.zfcp in
|
|
|
218d2d |
dracut, above s390-tools change introduces another implementation of
|
|
|
218d2d |
parsing the exact same rd.zfcp syntax. Therefore, it would be good to keep
|
|
|
218d2d |
the documentation in man/dracut.cmdline.7 of dracut as one central place
|
|
|
218d2d |
describing all s390 device types that dracut handles.
|
|
|
218d2d |
|
|
|
218d2d |
For the time being, keep copying /etc/zfcp.conf.
|
|
|
218d2d |
Retain the call of zfcp_cio_free so /etc/zfcp.conf gets processed even
|
|
|
218d2d |
with the typical cio_ignore kernel boot parameter ignoring most devices.
|
|
|
218d2d |
Also keep handling rd.zfcp.conf=0 so users can, at boot time, ignore
|
|
|
218d2d |
/etc/zfcp.conf already copied into initrd.
|
|
|
218d2d |
|
|
|
218d2d |
Preparation for consolidating persistent configuration with zdev.
|
|
|
218d2d |
|
|
|
218d2d |
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
|
|
|
218d2d |
---
|
|
|
218d2d |
man/dracut.cmdline.7.asc | 12 +++++++++++-
|
|
|
218d2d |
modules.d/95zfcp/module-setup.sh | 4 ++--
|
|
|
218d2d |
modules.d/95zfcp/parse-zfcp.sh | 11 -----------
|
|
|
218d2d |
3 files changed, 13 insertions(+), 14 deletions(-)
|
|
|
218d2d |
|
|
|
218d2d |
diff --git a/man/dracut.cmdline.7.asc b/man/dracut.cmdline.7.asc
|
|
|
218d2d |
index 858991fa..01bdf10f 100644
|
|
|
218d2d |
--- a/man/dracut.cmdline.7.asc
|
|
|
218d2d |
+++ b/man/dracut.cmdline.7.asc
|
|
|
218d2d |
@@ -980,12 +980,22 @@ ZFCP
|
|
|
218d2d |
**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
|
|
218d2d |
rd.zfcp can be specified multiple times on the kernel command
|
|
|
218d2d |
line.
|
|
|
218d2d |
++
|
|
|
218d2d |
+NOTE:
|
|
|
218d2d |
+ This parameter is no longer handled by dracut itself but with the exact
|
|
|
218d2d |
+ same syntax by
|
|
|
218d2d |
+ https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/dracut/95zdev.
|
|
|
218d2d |
|
|
|
218d2d |
**rd.zfcp=**__<zfcp adaptor device bus ID>__::
|
|
|
218d2d |
If NPIV is enabled and the 'allow_lun_scan' parameter to the zfcp
|
|
|
218d2d |
- module is set to 'Y' then the zfcp adaptor will be initiating a
|
|
|
218d2d |
+ module is set to 'Y' then the zfcp driver will be initiating a
|
|
|
218d2d |
scan internally and the <WWPN> and <FCPLUN> parameters can be omitted.
|
|
|
218d2d |
+
|
|
|
218d2d |
+NOTE:
|
|
|
218d2d |
+ This parameter is no longer handled by dracut itself but with the exact
|
|
|
218d2d |
+ same syntax by
|
|
|
218d2d |
+ https://github.com/ibm-s390-linux/s390-tools/tree/master/zdev/dracut/95zdev.
|
|
|
218d2d |
++
|
|
|
218d2d |
[listing]
|
|
|
218d2d |
.Example
|
|
|
218d2d |
--
|
|
|
218d2d |
diff --git a/modules.d/95zfcp/module-setup.sh b/modules.d/95zfcp/module-setup.sh
|
|
|
218d2d |
index e1f3aa35..b547f9bc 100755
|
|
|
218d2d |
--- a/modules.d/95zfcp/module-setup.sh
|
|
|
218d2d |
+++ b/modules.d/95zfcp/module-setup.sh
|
|
|
218d2d |
@@ -5,7 +5,7 @@ check() {
|
|
|
218d2d |
arch=${DRACUT_ARCH:-$(uname -m)}
|
|
|
218d2d |
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
|
|
218d2d |
|
|
|
218d2d |
- require_binaries zfcp_cio_free grep sed seq || return 1
|
|
|
218d2d |
+ require_binaries zfcp_cio_free sed || return 1
|
|
|
218d2d |
|
|
|
218d2d |
return 0
|
|
|
218d2d |
}
|
|
|
218d2d |
@@ -23,7 +23,7 @@ installkernel() {
|
|
|
218d2d |
# called by dracut
|
|
|
218d2d |
install() {
|
|
|
218d2d |
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
|
|
218d2d |
- inst_multiple zfcp_cio_free grep sed seq
|
|
|
218d2d |
+ inst_multiple zfcp_cio_free sed
|
|
|
218d2d |
|
|
|
218d2d |
inst_script /sbin/zfcpconf.sh
|
|
|
218d2d |
inst_rules 56-zfcp.rules
|
|
|
218d2d |
diff --git a/modules.d/95zfcp/parse-zfcp.sh b/modules.d/95zfcp/parse-zfcp.sh
|
|
|
218d2d |
index 495aa67f..41216dd9 100755
|
|
|
218d2d |
--- a/modules.d/95zfcp/parse-zfcp.sh
|
|
|
218d2d |
+++ b/modules.d/95zfcp/parse-zfcp.sh
|
|
|
218d2d |
@@ -2,15 +2,4 @@
|
|
|
218d2d |
|
|
|
218d2d |
getargbool 1 rd.zfcp.conf -d -n rd_NO_ZFCPCONF || rm /etc/zfcp.conf
|
|
|
218d2d |
|
|
|
218d2d |
-for zfcp_arg in $(getargs rd.zfcp -d 'rd_ZFCP='); do
|
|
|
218d2d |
- echo "$zfcp_arg" | grep '^0\.[0-9a-fA-F]\.[0-9a-fA-F]\{4\}\(,0x[0-9a-fA-F]\{16\},0x[0-9a-fA-F]\{16\}\)\?$' > /dev/null
|
|
|
218d2d |
- test $? -ne 0 && die "For argument 'rd.zfcp=$zfcp_arg'\nSorry, invalid format."
|
|
|
218d2d |
- (
|
|
|
218d2d |
- IFS=","
|
|
|
218d2d |
- # shellcheck disable=SC2086
|
|
|
218d2d |
- set $zfcp_arg
|
|
|
218d2d |
- echo "$@" >> /etc/zfcp.conf
|
|
|
218d2d |
- )
|
|
|
218d2d |
-done
|
|
|
218d2d |
-
|
|
|
218d2d |
zfcp_cio_free
|
|
|
218d2d |
--
|
|
|
218d2d |
2.42.0
|
|
|
218d2d |
|