Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zfcp_rules): use the right wwpn and lun vars and support new device format #2631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions modules.d/95zfcp_rules/parse-zfcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,18 @@ for zfcp_arg in $(getargs root=) $(getargs resume=); do
IFS="-"
set -- "$ccw_arg"
IFS="$OLDIFS"
_wwpn=${4%:*}
_lun=${4#*:}
create_udev_rule "$2" "$wwpn" "$lun"
# The format of udev-created SCSI device nodes has changed from:
# ccw-<device_bus_id>-zfcp-<wwpn>:<lun>-part<n>
# to:
# ccw-<device_bus_id>-fc-<wwpn>-lun-<lun>-part<n>
if [[ $3 == "fc" ]] && [[ $5 == "lun" ]]; then
_wwpn="$4"
_lun="$6"
elif [[ $3 == "zfcp" ]]; then
_wwpn=${4%:*}
_lun=${4#*:}
fi
create_udev_rule "$2" "$_wwpn" "$_lun"
fi
)
done
Loading