forked from pool/s390-tools
6a6c0cb679
*** v2.34.0 * Changes of existing tools: - ap_tools/ap-check: Add support for vfio-ap dynamic configuration - dbginfo.sh: Update/Add additional DASD data collection - dumpconf: Add new parameter 'SCP_DATA' for SCSI/NVMe/ECKD dump devices - libutil: Make formatted meta-data configurable - s390-tools: Replace 'which' with built-in 'command -v' - zdump/dfi_elf: Support core dumps of vr-kernels * Bug Fixes: - chzdev: Fix warning about failed ATTR writes by udev - rust/pv: Try again if first CRL-URI is invalid - rust/pvattest: Add short option for --arpk - zdump: Fix 'zgetdump -i' ioctl error on s390 formatted dump file *** v2.33.1 * Bug Fixes: - s390-tools: Fix formatting and typos in README.md - s390-tools: Fix release string *** v2.33.0 * Add new tools / libraries: - chpstat: New tool for displaying channel path statistics - libutil: Add output format helpers(util_fmt: JSON, JSON-SEQ, CSV, text pairs) * Changes of existing tools / libraries: - chzdev: Add --is-owner to identify files created by zdev - dasdfmt: Change default mode to always use full-format (Note: affects ESE DASD) - libap: Significantly reduce delay time between file lock retries - pvattest: Rewrite from C to Rust - pvattest: Support additional data & user-data - rust/pv: Support for Attestation * Bug Fixes: - chreipl: Improve disk type detection when running under QEMU - dbginfo.sh: Use POSIX option with uname - s390-tools: Fix missing hyphen escapes in the man page for many tools - zipl/src: Fix bugs in disk_get_info() reproducible in corner cases *** v2.32.0 * Changes of existing tools: - cpumf/lscpumf: add support for machine type 3932 - genprotimg, pvattest, and pvsecret accept IBM signing key with Armonk as subject locality - zdump/zipl: Support for List-Directed dump from ECKD DASD - zkey: Detect FIPS mode and generate PBKDF for luksFormat according to it * Bug Fixes: - dbginfo.sh: dash compatible copy sequence - rust/pv_core: Fix UvDeviceInfo::get() method - zipl/src: Fix leak of files if run with a broken configuration - zkey: Fix convert command to accept only keys of type CCA-AESDATA * Revendored vendor.tar.gz * Removed obsolete patches - s390-tools-sles15sp5-01-rust-pv-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-02-genprotimg-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-03-libpv-support-Armonk-in-IBM-signing-key-subject.patch - s390-tools-sles15sp6-04-pvattest-Fix-root-ca-parsing.patch - s390-tools-sles15sp6-genprotimg-makefile.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=219
157 lines
4.0 KiB
Bash
157 lines
4.0 KiB
Bash
#!/bin/sh
|
|
#
|
|
# dasd_reload
|
|
# $Id: dasd_reload,v 1.2 2004/05/26 15:17:09 hare Exp $
|
|
#
|
|
# Deconfigures all active DASDs, unloads the modules
|
|
# and activates the configured DASDs again.
|
|
# Needed to establish an identical device mapping
|
|
# in the installation system and in the running system.
|
|
# All DASD access need to be cancelled prior to running
|
|
# this script.
|
|
#
|
|
# Usage:
|
|
# dasd_reload
|
|
#
|
|
# Return values:
|
|
# 1 Cannot read /proc/modules
|
|
# 2 Missing module programs
|
|
# 3 /sys not mounted
|
|
# 4 Failure on deactivate DASDs
|
|
#
|
|
|
|
if [ ! -r /proc/modules ]; then
|
|
echo "Cannot read /proc/modules"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -x /usr/sbin/rmmod -o ! -x /usr/sbin/modprobe ]; then
|
|
echo "Missing module programs"
|
|
exit 2
|
|
fi
|
|
|
|
if [ ! -d /sys/bus ]; then
|
|
echo "sysfs not mounted"
|
|
exit 3
|
|
fi
|
|
|
|
let anymd=0
|
|
if [ -f /proc/mdstat ]; then
|
|
for mddevice in $(grep active /proc/mdstat | cut -f1 -d:); do
|
|
mdadm -S /dev/${mddevice}
|
|
let anymd=1
|
|
done
|
|
udevadm settle
|
|
fi
|
|
|
|
#
|
|
# Setting HyperPAV alias devices offline
|
|
#
|
|
dasd_alias=
|
|
let EXITRC=0
|
|
for dev in /sys/bus/ccw/devices/*; do
|
|
if [ -f ${dev}/use_diag ]; then
|
|
read _online < ${dev}/online
|
|
read _alias < ${dev}/alias
|
|
if [ "$_online" -eq 1 -a "$_alias" -eq 1 ]; then
|
|
echo "setting DASD HyperPAV alias $(basename ${dev}) offline"
|
|
echo "0" > ${dev}/online
|
|
read _online < ${dev}/online
|
|
dasd_alias="${dasd_alias} $(basename ${dev})"
|
|
if [ "$_online" -eq 1 ]; then
|
|
echo "failure on setting DASD HyperPAV alias $(basename ${dev}) offline !"
|
|
let EXITRC=4
|
|
fi
|
|
fi
|
|
fi
|
|
done
|
|
|
|
#
|
|
# Setting "normal" DASD and HyperPAV base devices offline
|
|
#
|
|
dasd_base=
|
|
for dev in /sys/bus/ccw/devices/*; do
|
|
if [ -f ${dev}/use_diag ]; then
|
|
read _online < ${dev}/online
|
|
read _alias < ${dev}/alias
|
|
if [ "$_online" -eq 1 -a "$_alias" -eq 0 ]; then
|
|
echo "setting DASD $(basename ${dev}) offline"
|
|
echo "0" > ${dev}/online
|
|
read _online < ${dev}/online
|
|
dasd_base="${dasd_base} $(basename ${dev})"
|
|
if [ "$_online" -eq 1 ]; then
|
|
echo "failure on setting DASD $(basename ${dev}) offline !"
|
|
let EXITRC=4
|
|
fi
|
|
fi
|
|
fi
|
|
done
|
|
|
|
udevadm settle
|
|
|
|
module_list=
|
|
module_test_list="dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod"
|
|
for module in ${module_test_list}; do
|
|
if grep -q "${module}" /proc/modules; then
|
|
module_list="${module} ${module_list}"
|
|
: Unloading ${module}
|
|
/usr/sbin/rmmod ${module}
|
|
fi
|
|
done
|
|
|
|
udevadm settle
|
|
sleep 2
|
|
|
|
if [ -d /etc/udev/rules.d ]; then
|
|
cd /etc/udev/rules.d
|
|
#
|
|
# Re-activating "normal" DASD and HyperPAV base devices
|
|
#
|
|
# We need to move all the DASD udev rules out from /etc/udev/rules.d
|
|
# because if we don't, then when the first DASD volume gets brought
|
|
# back online, they are all brought back online, in a non-deterministic
|
|
# order, not the numeric order we expect.
|
|
#
|
|
mv -i 41-dasd-*.rules 51-dasd-*.rules /tmp
|
|
cd /tmp
|
|
for dasd in ${dasd_base}; do
|
|
for file in 41-dasd-*-${dasd}.rules 51-dasd-${dasd}.rules; do
|
|
[ -f "${file}" ] || continue
|
|
#
|
|
# Special handling is needed for old udev rules that start with 51-
|
|
# since the chzdev command won't look for that name
|
|
#
|
|
prefix="$(echo ${file} | cut -f1 -d-)"
|
|
if [ "${prefix}" == "51" ]; then
|
|
if [ -h /sys/bus/ccw/drivers/dasd-eckd/${dasd} ]; then
|
|
mv -i ${file} 41-dasd-eckd-${dasd}.rules
|
|
elif [ -h /sys/bus/ccw/drivers/dasd-fba/${dasd} ]; then
|
|
mv -i ${file} 41-dasd-fba-${dasd}.rules
|
|
else echo "DASD volume ${dasd} is neither an ECKD or FBA device."
|
|
let EXITRC=4
|
|
fi
|
|
fi
|
|
echo Activating ${dasd}
|
|
mv -i "${file}" /etc/udev/rules.d/
|
|
/usr/sbin/chzdev dasd --apply --configured -q --no-root-update ${dasd}
|
|
lsdasd
|
|
break
|
|
done
|
|
done
|
|
|
|
#
|
|
# Re-activating HyperPAV alias devices
|
|
#
|
|
for dasd in ${dasd_alias}; do
|
|
for file in 41-dasd-*-${dasd}.rules 51-dasd-${dasd}.rules; do
|
|
[ -f "${file}" ] || continue
|
|
echo Activating ${dasd}
|
|
mv -i "${file}" /etc/udev/rules.d/
|
|
/usr/sbin/chzdev dasd --apply --configured -q --no-root-update ${dasd}
|
|
break
|
|
done
|
|
done
|
|
fi
|
|
|
|
exit ${EXITRC}
|