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

only write fcp into rd.zfcp for rhel8 and rhel9 #773

Merged
merged 2 commits into from
Dec 5, 2023
Merged
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
19 changes: 18 additions & 1 deletion zthin-parts/zthin/bin/refresh_bootmap
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,20 @@ function update_zipl_bootloader_rhcos {
blockdev --flushbufs ${DEST_DEV} > /dev/null
} #update_zipl_bootloader_rhcos{}

function update_rdzfcp_to_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=""
for fcp in "${INPUT_FCPS[@]}"
do
rd_zfcp+="rd.zfcp=0.0.$fcp "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are multiple paths bond to the same FCP, the FCP will be writen several times in rd_zfcp.

done
} #updaterdzfcp_with_fcp_only

function refreshZIPL {
: SOURCE: ${BASH_SOURCE}
: STACK: ${FUNCNAME[@]}
Expand Down Expand Up @@ -887,10 +901,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
update_rdzfcp_to_fcp_only
fi
inform "Final rd.zfcp value is: $rd_zfcp."

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