add zfcp support for s390
parent
3e0f415fc6
commit
1ccc0fad27
9
dracut.8
9
dracut.8
|
|
@ -174,6 +174,15 @@ only activate the raid sets with the given UUID
|
|||
.B rd_DASD=....
|
||||
same syntax as the kernel module parameter (s390 only)
|
||||
|
||||
.SH ZFCP
|
||||
.TP
|
||||
.B rd_ZFCP=<zfcp adaptor device bus ID>,<WWPN>,<FCPLUN>
|
||||
rd_zfcp can be specified multiple times on the kernel command line.
|
||||
example: rd_zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
|
||||
.TP
|
||||
.B rd_NO_ZFCPCONF
|
||||
ignore zfcp.conf included in the initramfs
|
||||
|
||||
.SH DHCP
|
||||
.TP
|
||||
.B root=dhcp
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
KERNEL=="zfcp_cfdc", RUN+="/sbin/zfcpconf.sh"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
arch=$(uname -m)
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || exit 1
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
inst_hook cmdline 30 "$moddir/parse-zfcp.sh"
|
||||
dracut_install tr
|
||||
inst "$moddir/zfcpconf.sh" /sbin/zfcpconf.sh
|
||||
inst_rules "$moddir/56-zfcp.rules"
|
||||
inst /etc/zfcp.conf
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
instmods zfcp
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
getarg rd_NO_ZFCPCONF && rm /etc/zfcp.conf
|
||||
|
||||
for zfcp_arg in $(getargs 'rd_ZFCP='); do
|
||||
(
|
||||
IFS=","
|
||||
set $zfcp_arg
|
||||
echo "$@" >> /etc/zfcp.conf
|
||||
)
|
||||
done
|
||||
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
# config file syntax:
|
||||
# deviceno WWPN FCPLUN
|
||||
#
|
||||
# Example:
|
||||
# 0.0.4000 0x5005076300C213e9 0x5022000000000000
|
||||
# 0.0.4001 0x5005076300c213e9 0x5023000000000000
|
||||
#
|
||||
#
|
||||
# manual setup:
|
||||
# modprobe zfcp
|
||||
# echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.4000/online
|
||||
# echo LUN > /sys/bus/ccw/drivers/zfcp/0.0.4000/WWPN/unit_add
|
||||
#
|
||||
# Example:
|
||||
# modprobe zfcp
|
||||
# echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.4000/online
|
||||
# echo 0x5022000000000000 > /sys/bus/ccw/drivers/zfcp/0.0.4000/0x5005076300c213e9/unit_add
|
||||
|
||||
CONFIG=/etc/zfcp.conf
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
|
||||
if [ -f "$CONFIG" ]; then
|
||||
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
|
||||
modprobe zfcp
|
||||
fi
|
||||
if [ ! -d /sys/bus/ccw/drivers/zfcp ]; then
|
||||
return
|
||||
fi
|
||||
tr "A-Z" "a-z" < $CONFIG| while read line; do
|
||||
case $line in
|
||||
\#*) ;;
|
||||
*)
|
||||
[ -z "$line" ] && continue
|
||||
set $line
|
||||
if [ $# -eq 5 ]; then
|
||||
DEVICE=$1
|
||||
SCSIID=$2
|
||||
WWPN=$3
|
||||
SCSILUN=$4
|
||||
FCPLUN=$5
|
||||
echo "Warning: Deprecated values in /etc/zfcp.conf, ignoring SCSI ID $SCSIID and SCSI LUN $SCSILUN"
|
||||
elif [ $# -eq 3 ]; then
|
||||
DEVICE=${1##*0x}
|
||||
WWPN=$2
|
||||
FCPLUN=$3
|
||||
fi
|
||||
echo 1 > /sys/bus/ccw/drivers/zfcp/${DEVICE}/online
|
||||
[ ! -d /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/${FCPLUN} ] \
|
||||
&& echo $FCPLUN > /sys/bus/ccw/drivers/zfcp/${DEVICE}/${WWPN}/unit_add
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
Loading…
Reference in New Issue