Skip to content

Commit

Permalink
only write fcp into rd.zfcp for rhel8 and rhel9
Browse files Browse the repository at this point in the history
Signed-off-by: LI PING HAO <[email protected]>
  • Loading branch information
haolp committed Nov 23, 2023
1 parent 9887dd9 commit b7b6dfa
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion zthin-parts/zthin/bin/refresh_bootmap
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,21 @@ function update_zipl_bootloader_rhcos {
blockdev --flushbufs ${DEST_DEV} > /dev/null
} #update_zipl_bootloader_rhcos{}

function updaterdzfcp_with_fcp_only {
: SOURCE: ${BASH_SOURCE}
: STACK: ${FUNCNAME[@]}
# @Description:
# remove wwpn and lun from rd.zfcp
# before function: rd_zfcp="rd.zfcp=0.0.$fcp,0x$wwpn,$lun "
# after function: rd_zfcp="rd.zfcp=0.0.$fcp "
rd_zfcp=""
valid_fcps=$(echo ${!valid_paths_dict[*]})
for fcp in ${valid_fcps[@]}
do
rd_zfcp+="rd.zfcp=0.0.$fcp "
done
} #updaterdzfcp_with_fcp_only

function refreshZIPL {
: SOURCE: ${BASH_SOURCE}
: STACK: ${FUNCNAME[@]}
Expand Down Expand Up @@ -887,10 +902,13 @@ function refreshZIPL {
# Due to the kernel command line length limitation of RHEL, we will limit the rd.zfcp
# items count to 8. so if the valid paths count is greater than 8, we need to do truncation.
# otherwise we can use the rd_zfcp string we get while finding the valid paths.
if [[ $valid_paths_count -gt 8 ]]; then
if [[ ($valid_paths_count -gt 8) && ($os == rhel7*) ]]; then
inform "valid paths count $valid_paths_count is greater than 8, do truncation to get the rd.zfcp parameter."
truncaterdzfcp
fi
if [[ ($os == rhel8*) || ($os == rhel9*) ]]; then
updaterdzfcp_with_fcp_only
fi
inform "Final rd.zfcp value is: $rd_zfcp."

# Exec zipl command to prepare device for initial program load
Expand Down

0 comments on commit b7b6dfa

Please sign in to comment.