forked from pool/s390-tools
Accepting request 1125589 from home:ngueorguiev:branches:Base:System
Upgrade s390-tools from version 2.25.0 to version 2.29.0 (Updated) OBS-URL: https://build.opensuse.org/request/show/1125589 OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=182
This commit is contained in:
parent
d48f194e6b
commit
ff04561a05
3
cputype
3
cputype
@ -62,7 +62,8 @@ case "${machine}" in
|
||||
3907) echo "${machine} = z14 ZR1 IBM z14 ZR1" ;;
|
||||
8561) echo "${machine} = z15 T01 IBM z15 T01" ;;
|
||||
8562) echo "${machine} = z15 T02 IBM z15 T02" ;;
|
||||
3931) echo "${machine} = z16 IBM z16" ;;
|
||||
3931) echo "${machine} = z16 A01 IBM z16 A01" ;;
|
||||
3932) echo "${machine} = z16 A02 IBM z16 A02" ;;
|
||||
*) echo "An unknown machine type was reported: ${machine}" >&2
|
||||
echo "Please file a bug report with this output:" >&2
|
||||
/bin/cat /proc/cpuinfo >&2
|
||||
|
@ -44,14 +44,6 @@ debug_mesg () {
|
||||
esac
|
||||
}
|
||||
|
||||
add_cio_channel() {
|
||||
echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
remove_cio_channel() {
|
||||
[ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${0} <read channel> <write channel> <online> [<protocol>]"
|
||||
echo " read/write channel = x.y.ssss where"
|
||||
@ -120,9 +112,3 @@ RC=${?}
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit ${RC}
|
||||
fi
|
||||
|
||||
if [ ${ON_OFF} == 1 ]; then
|
||||
add_cio_channel "${CTC_READ_CHAN},${CTC_WRITE_CHAN}"
|
||||
else remove_cio_channel "${CTC_READ_CHAN}"
|
||||
remove_cio_channel "${CTC_WRITE_CHAN}"
|
||||
fi
|
||||
|
120
dasd_configure.8
120
dasd_configure.8
@ -19,11 +19,11 @@ is always 0 until IBM creates something that uses that number.
|
||||
.RE
|
||||
.RS
|
||||
.B y
|
||||
is the logical channel subsystem (lcss) number. Most often this is 0, but it could be non-zero.
|
||||
is the subchannel set ID (SSID). Most often this is 0, but it could be non-zero.
|
||||
.RE
|
||||
.RS
|
||||
.B ssss
|
||||
is the four digit subchannel address of the device, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
is the four digit device address of the subchannel, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
.RE
|
||||
.IP online
|
||||
Either a literal 1 to bring the volume online or a literal 0 to take it offline
|
||||
@ -32,121 +32,29 @@ Either a literal 1 to bring the volume online or a literal 0 to take it offline
|
||||
Either a literal 1 to use the DIAG driver for this device, or a literal 0 to use the "normal" driver.
|
||||
.RE
|
||||
.SH FILES
|
||||
.I /etc/udev/rules.d/51-dasd-<ccwid>.rules
|
||||
.RS
|
||||
This file provides the udev rules necessary to activate a specific DASD volume.
|
||||
.RE
|
||||
Please see the documentation of
|
||||
.B chzdev.
|
||||
.SH ENVIRONMENT
|
||||
.IP DEBUG
|
||||
If set to "yes" some minimal debugging information is output during execution.
|
||||
.SH DIAGNOSTICS
|
||||
The following messages may be issued on stdout:
|
||||
.IP
|
||||
.B /sysfs not present
|
||||
.RS
|
||||
The sysfs file system could not be found in /proc/mounts, so there's nothing the script can do. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Invalid device status $ONLINE It must be a zero or a one.
|
||||
.RS
|
||||
A value other than 0 or 1 was specified for the second parameter, online. Return code 2 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${CCW_CHAN_ID}
|
||||
.RS
|
||||
A non-existent <ccwid> was specified for the DASD volume. Remember the x.y.ssss format is necessary. Return code 3 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not set the device offline for DIAG access
|
||||
.RS
|
||||
You specified that the DIAG driver be used for this device. However, the device was already online without DIAG mode set, and something prevented it from being taken offline. (The use_diag value can only be modified when the disk is offline to the system.) Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not set device ${CCW_CHAN_ID} online
|
||||
.RS
|
||||
The attempt to bring the DASD volume online failed. Try "dmesg" to see if there is any indication why. Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not set device ${CCW_CHAN_ID} offline
|
||||
.RS
|
||||
The attempt to take the DASD volume offline failed. Try "dmesg" to see if there is any indication why. Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Not a DASD device (cu $_cutype, dev $_devtype)
|
||||
.RS
|
||||
The ccwid you specified does not refer to a DASD volume. Return code 5 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not load module ${MODULE}
|
||||
.RS
|
||||
The dasd_eckd_mod.ko or dasd_fba_mod.ko module failed to load. Try "dmesg" to see if there is any indication why. Return code 6 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Failed to activate device ${CCW_CHAN_ID}, device in state $_dasd_state
|
||||
.RS
|
||||
The attempt to bring the DASD volume online failed. The volume was left in the state described (which will not be online or offline.) Return code 7 is set.
|
||||
.RE
|
||||
Messages and return codes are determined by the
|
||||
.B chzdev
|
||||
command.
|
||||
Except for:
|
||||
.IP
|
||||
.B Device ${CCW_CHAN_ID} is unformatted
|
||||
.RS
|
||||
The DASD volume was brought online, but it has not been formatted with dasdfmt. This condition is really only important for YaST to determine if it should prompt the user to decide if they want to format it or not at that point. The udev rules are not created. After the disk has been formatted, re-run dasd_configure to take the volume offline, and then again to bring it online. Return code 8 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Only dasd-eckd or dasd-fba are supported.
|
||||
.RS
|
||||
Either an invalid -t value was specified, or -f was specified without -t. Return code 9 is set.
|
||||
The DASD volume was brought online, but it has not been formatted with dasdfmt. This condition is really only important for YaST to determine if it should prompt the user to decide if they want to format it or not at that point. Return code 8 is set.
|
||||
.RE
|
||||
|
||||
If environment variable DEBUG is set to "yes," the following messages may be issued on stdout:
|
||||
If environment variable DEBUG is set to "yes," it shows the command line of the invoked
|
||||
.B chzdev.
|
||||
Additionally, the following messages may be issued on stdout:
|
||||
.IP
|
||||
.B Configuring device ${CCW_CHAN_ID}
|
||||
.B DASD ${CCW_CHAN_ID} did not come online.
|
||||
.RS
|
||||
Just a little bit of verbosity, since it just indicates that we got past certain error checks and will now try to do something useful.
|
||||
.RE
|
||||
.IP
|
||||
.B Setting device offline for DIAG access
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B Setting device read-only
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B Activating DIAG access mode
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B DIAG mode not available
|
||||
.RS
|
||||
You specified that the DIAG driver should be used for this DASD volume. The script tried to honor this, but was not able to do so. Non-DIAG mode was used instead.
|
||||
.RE
|
||||
.IP
|
||||
.B Deactivating DIAG access mode
|
||||
.RS
|
||||
You specified that the DIAG driver NOT be used for this DASD volume, but the use_diag flag was already set for it.
|
||||
.RE
|
||||
.IP
|
||||
.B Setting device online
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B Device ${CCW_CHAN_ID} is already online
|
||||
.RS
|
||||
An attempt was made to bring the DASD volume online when it was already online.
|
||||
.RE
|
||||
.IP
|
||||
.B Setting device offline
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B Device ${CCW_CHAN_ID} is already offline
|
||||
.RS
|
||||
An attempt was made to take the DASD volume offline when it was already offline.
|
||||
The DASD volume did not come online within the waiting time. Could not check if the DASD is formatted (see above). Return code 17 is set.
|
||||
.RE
|
||||
.SH BUGS
|
||||
Gotta be some, I'm sure. If you find one, please open a bug report.
|
||||
|
@ -18,9 +18,9 @@
|
||||
# dasd-fba are supported - Deprecated
|
||||
# ccwid = x.y.ssss where
|
||||
# x is always 0 until IBM creates something that uses that number
|
||||
# y is the logical channel subsystem (lcss) number. Most often
|
||||
# y is the subchannel set ID (SSID). Most often
|
||||
# this is 0, but it could be non-zero
|
||||
# ssss is the four digit subchannel address of the device, in
|
||||
# ssss is the four digit device address of the subchannel, in
|
||||
# hexidecimal, with leading zeros.
|
||||
# online = 0 to take the device offline
|
||||
# 1 to bring the device online
|
||||
@ -43,14 +43,6 @@ debug_mesg () {
|
||||
esac
|
||||
}
|
||||
|
||||
add_cio_channel() {
|
||||
echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
remove_cio_channel() {
|
||||
[ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${0} [-f -t <dasd_type> ] <ccwid> <online> [use_diag]"
|
||||
echo
|
||||
@ -59,9 +51,9 @@ usage(){
|
||||
echo " dasd-fba are supported - Deprecated"
|
||||
echo " ccwid = x.y.ssss where"
|
||||
echo " x is always 0 until IBM creates something that uses that number"
|
||||
echo " y is the logical channel subsystem (lcss) number. Most often"
|
||||
echo " y is the subchannel set ID (SSID). Most often"
|
||||
echo " this is 0, but it could be non-zero"
|
||||
echo " ssss is the four digit subchannel address of the device, in"
|
||||
echo " ssss is the four digit device address of the subchannel, in"
|
||||
echo " hexidecimal, with leading zeros."
|
||||
echo " online = 0 to take the device offline"
|
||||
echo " 1 to bring the device online"
|
||||
@ -165,9 +157,4 @@ elif [ ${ON_OFF} == 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${ON_OFF} == 1 ]; then
|
||||
add_cio_channel "${CCW_CHAN_ID}"
|
||||
else remove_cio_channel "${CCW_CHAN_ID}"
|
||||
fi
|
||||
|
||||
exit ${exitcode}
|
||||
|
@ -18,9 +18,9 @@
|
||||
# dasd-fba are supported - Deprecated
|
||||
# ccwid = x.y.ssss where
|
||||
# x is always 0 until IBM creates something that uses that number
|
||||
# y is the logical channel subsystem (lcss) number. Most often
|
||||
# y is the subchannel set ID (SSID). Most often
|
||||
# this is 0, but it could be non-zero
|
||||
# ssss is the four digit subchannel address of the device, in
|
||||
# ssss is the four digit device address of the subchannel, in
|
||||
# hexidecimal, with leading zeros.
|
||||
# online = 0 to take the device offline
|
||||
# 1 to bring the device online
|
||||
@ -43,14 +43,6 @@ debug_mesg () {
|
||||
esac
|
||||
}
|
||||
|
||||
add_cio_channel() {
|
||||
echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
remove_cio_channel() {
|
||||
[ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${0} [-f -t <dasd_type> ] <ccwid> <online> [use_diag]"
|
||||
echo
|
||||
@ -59,9 +51,9 @@ usage(){
|
||||
echo " dasd-fba are supported - Deprecated"
|
||||
echo " ccwid = x.y.ssss where"
|
||||
echo " x is always 0 until IBM creates something that uses that number"
|
||||
echo " y is the logical channel subsystem (lcss) number. Most often"
|
||||
echo " y is the subchannel set ID (SSID). Most often"
|
||||
echo " this is 0, but it could be non-zero"
|
||||
echo " ssss is the four digit subchannel address of the device, in"
|
||||
echo " ssss is the four digit device address of the subchannel, in"
|
||||
echo " hexidecimal, with leading zeros."
|
||||
echo " online = 0 to take the device offline"
|
||||
echo " 1 to bring the device online"
|
||||
@ -165,9 +157,4 @@ elif [ ${ON_OFF} == 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${ON_OFF} == 1 ]; then
|
||||
add_cio_channel "${CCW_CHAN_ID}"
|
||||
else remove_cio_channel "${CCW_CHAN_ID}"
|
||||
fi
|
||||
|
||||
exit ${exitcode}
|
||||
|
@ -31,7 +31,7 @@ use warnings;
|
||||
use Fcntl;
|
||||
use Getopt::Long;
|
||||
|
||||
my $VERSION = "2.0.3";
|
||||
my $VERSION = "2.0.4";
|
||||
|
||||
my $BLKID = "/usr/sbin/blkid";
|
||||
my $PARTED = "/usr/sbin/parted";
|
||||
@ -44,8 +44,7 @@ my $ZGETDUMP = "/usr/sbin/zgetdump";
|
||||
|
||||
# temporary DASD device configuration file for Zipl
|
||||
my $MDPATH = "/tmp/mvdump.conf.".`mcookie`;
|
||||
# zFCP dump dir, without a leading '/'
|
||||
my $ZFCP_DUMP_DIR = "mydumps";
|
||||
chomp($MDPATH);
|
||||
|
||||
my $OPT_DEBUG = 0;
|
||||
my $OPT_FORCE = 0;
|
||||
@ -148,23 +147,68 @@ sub is_dasd
|
||||
}
|
||||
}
|
||||
|
||||
sub has_free_single_kpartx
|
||||
{
|
||||
my $device = substr(shift(), 5);
|
||||
return(0) unless ($device =~ /^dm-[0-9]+$/);
|
||||
my $blockpath = "/sys/block/$device";
|
||||
my @holders = glob("$blockpath/holders/*");
|
||||
return(0) unless (@holders == 1);
|
||||
my $dmuuid = read_file("$holders[0]/dm/uuid");
|
||||
return(0) unless ($dmuuid =~ /^part1-mpath-/);
|
||||
my @holderparts = split(/\//, $holders[0]);
|
||||
my $holder = "/dev/" . $holderparts[-1];
|
||||
if(-b $holder and sysopen(my $blockdev, $holder, O_RDWR|O_EXCL)) {
|
||||
close($blockdev);
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub is_zfcp
|
||||
{
|
||||
# remove leading /dev/
|
||||
my $device = substr(shift(), 5);
|
||||
my $blockpath = "/sys/block/$device";
|
||||
my $dmname = undef;
|
||||
|
||||
# if user passed a device name on cmdline that we listed before
|
||||
# convert to a dm-[0-9]+ kernel device name
|
||||
if ($device =~ /^mapper\//) {
|
||||
$device = substr(readlink("/dev/" . $device), 3);
|
||||
$blockpath = "/sys/block/" . $device;
|
||||
}
|
||||
# check if dm-multipath and get one path member
|
||||
if ($device =~ /^dm-[0-9]+$/) {
|
||||
my $dmuuid = read_file("$blockpath/dm/uuid");
|
||||
return(undef) unless $dmuuid =~ /^mpath-/;
|
||||
$dmname = read_file("$blockpath/dm/name");
|
||||
opendir(DIR, "$blockpath/slaves/") or return(undef);
|
||||
while (defined(my $pathmember = readdir(DIR))) {
|
||||
# skip ".", "..", or other non scsi disk entries
|
||||
next unless $pathmember =~ /^sd[a-z]+$/;
|
||||
$device = $pathmember;
|
||||
last;
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
my $devpath = "/sys/block/$device/device";
|
||||
|
||||
unless (-r "$devpath/hba_id" or -r "$devpath/type") {
|
||||
return(0);
|
||||
return(undef);
|
||||
}
|
||||
|
||||
my $devtype = read_file("$devpath/type");
|
||||
|
||||
# SCSI type '0' means disk
|
||||
if ($devtype == 0) {
|
||||
return(1);
|
||||
if (defined $dmname) {
|
||||
return("/dev/mapper/$dmname");
|
||||
} else {
|
||||
return("/dev/$device");
|
||||
}
|
||||
} else {
|
||||
return(0);
|
||||
return(undef);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,8 +226,13 @@ sub print_device
|
||||
{
|
||||
my $device = shift();
|
||||
my $only_dump_disks = shift();
|
||||
my $devpath;
|
||||
|
||||
my $devpath = "/sys/block/" . substr($device, 5);
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
$devpath = "/sys/block/" . substr(readlink($device), 3);
|
||||
} else {
|
||||
$devpath = "/sys/block/" . substr($device, 5);
|
||||
}
|
||||
my $output = $device;
|
||||
my $dump_device = 0;
|
||||
|
||||
@ -219,6 +268,19 @@ sub print_device
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# get one path member to fill path info for "yast onpanic"
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
my $blockdev = substr(readlink($device), 3);
|
||||
my $blockpath = "/sys/block/" . $blockdev;
|
||||
opendir(DIR, "$blockpath/slaves/") or return(undef);
|
||||
while (defined(my $pathmember = readdir(DIR))) {
|
||||
# skip ".", "..", or other non scsi disk entries
|
||||
next unless $pathmember =~ /^sd[a-z]+$/;
|
||||
$devpath = "/sys/block/" . $pathmember;
|
||||
last;
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
my $adapter = read_file("$devpath/device/hba_id");
|
||||
my $wwpn = read_file("$devpath/device/wwpn");
|
||||
my $lun = read_file("$devpath/device/fcp_lun");
|
||||
@ -280,7 +342,9 @@ sub determine_free_disks
|
||||
opendir(DIR, $path) or exit_with("Unable to find $path: $!", 15);
|
||||
while (defined(my $file = readdir(DIR))) {
|
||||
# no need to add other devices then dasd* or sd*
|
||||
if ($file =~ /^dasd[a-z]+$/ or $file =~ /^sd[a-z]+$/) {
|
||||
# or dm-multipath
|
||||
if ($file =~ /^dasd[a-z]+$/ or $file =~ /^sd[a-z]+$/ or
|
||||
$file =~ /^dm-[0-9]+$/) {
|
||||
push(@devices, $file);
|
||||
}
|
||||
}
|
||||
@ -289,6 +353,8 @@ sub determine_free_disks
|
||||
for my $entry (@devices) {
|
||||
# only allow disks, no partitions
|
||||
my ($device) = $entry =~ /^([a-z]+)$/;
|
||||
# dm devices other than dm-multipath are filtered by is_zfcp()
|
||||
($device) = $entry =~ /^(dm-[0-9]+)$/ unless ($device);
|
||||
next unless ($device);
|
||||
|
||||
$device = "/dev/$device";
|
||||
@ -299,8 +365,21 @@ sub determine_free_disks
|
||||
if (is_dasd($device)) {
|
||||
push(@dasd, $device);
|
||||
}
|
||||
if (is_zfcp($device)) {
|
||||
push(@zfcp, $device);
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp) {
|
||||
push(@zfcp, $zfcp);
|
||||
}
|
||||
} else {
|
||||
# A dm-multipath device with a single holder
|
||||
# being a kpartx partition number 1 could still
|
||||
# be free or contain a zfcpdump boot record.
|
||||
# Due to the kpartx linear dm mapping, such
|
||||
# dm-multipath device cannot open exclusively.
|
||||
if (has_free_single_kpartx($device)) {
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp) {
|
||||
push(@zfcp, $zfcp);
|
||||
}
|
||||
}
|
||||
}
|
||||
# wait for udev to process all events triggered by sysopen(,O_EXCL)
|
||||
@ -418,7 +497,13 @@ sub setup_zfcpdump
|
||||
|
||||
# install bootloader
|
||||
print("Creating dump record.\n");
|
||||
run_cmd("${ZIPL} -V -d ${device}1");
|
||||
my $partdev;
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
$partdev = $device . "-part1"; # kpartx partition on multipath
|
||||
} else {
|
||||
$partdev = $device . "1"; # real partition, single path SCSI
|
||||
}
|
||||
run_cmd("${ZIPL} -V -d ${partdev}");
|
||||
|
||||
cleanup();
|
||||
}
|
||||
@ -535,14 +620,17 @@ sub analyze_cmd_parameters
|
||||
if (grep(/$device/, @devices)) {
|
||||
exit_with("$device is mentioned more than once.", 14);
|
||||
}
|
||||
if ( $device =~ /^\/dev\/[a-z]+$/ == 0) {
|
||||
# dm devices other than dm-multipath are filtered by is_zfcp()
|
||||
if ( $device =~ /^\/dev\/[a-z]+$/ == 0 and
|
||||
$device !~ /^\/dev\/mapper\// ) {
|
||||
exit_with("The device parameter $device is inaccurate. Only whole disks are allowed.", 14);
|
||||
}
|
||||
if (grep(/$device/, (@$dasd_ref, @$zfcp_ref))) {
|
||||
if (is_zfcp($device) and @ARGV > 1) {
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp and @ARGV > 1) {
|
||||
exit_with("Multi-volume dumps aren't supported with zFCP.", 14);
|
||||
}
|
||||
push(@devices, $device);
|
||||
push(@devices, (defined $zfcp) ? $zfcp : $device);
|
||||
} else {
|
||||
if (-b $device) {
|
||||
exit_with("$device is in use or not a DASD/zFCP disk!", 14);
|
||||
@ -565,8 +653,9 @@ sub main
|
||||
my @devices = analyze_cmd_parameters();
|
||||
|
||||
# only one dump device is possible with zFCP which is enforced in analyze_cmd_parameters
|
||||
if (is_zfcp($devices[0])) {
|
||||
setup_zfcpdump($devices[0]);
|
||||
my $zfcp = is_zfcp($devices[0]);
|
||||
if (defined $zfcp) {
|
||||
setup_zfcpdump($zfcp);
|
||||
} else {
|
||||
setup_dasddump(@devices);
|
||||
}
|
||||
|
121
mkdump.pl.suse
121
mkdump.pl.suse
@ -31,7 +31,7 @@ use warnings;
|
||||
use Fcntl;
|
||||
use Getopt::Long;
|
||||
|
||||
my $VERSION = "2.0.3";
|
||||
my $VERSION = "2.0.4";
|
||||
|
||||
my $BLKID = "/sbin/blkid";
|
||||
my $PARTED = "/usr/sbin/parted";
|
||||
@ -44,8 +44,7 @@ my $ZGETDUMP = "/sbin/zgetdump";
|
||||
|
||||
# temporary DASD device configuration file for Zipl
|
||||
my $MDPATH = "/tmp/mvdump.conf.".`mcookie`;
|
||||
# zFCP dump dir, without a leading '/'
|
||||
my $ZFCP_DUMP_DIR = "mydumps";
|
||||
chomp($MDPATH);
|
||||
|
||||
my $OPT_DEBUG = 0;
|
||||
my $OPT_FORCE = 0;
|
||||
@ -148,23 +147,68 @@ sub is_dasd
|
||||
}
|
||||
}
|
||||
|
||||
sub has_free_single_kpartx
|
||||
{
|
||||
my $device = substr(shift(), 5);
|
||||
return(0) unless ($device =~ /^dm-[0-9]+$/);
|
||||
my $blockpath = "/sys/block/$device";
|
||||
my @holders = glob("$blockpath/holders/*");
|
||||
return(0) unless (@holders == 1);
|
||||
my $dmuuid = read_file("$holders[0]/dm/uuid");
|
||||
return(0) unless ($dmuuid =~ /^part1-mpath-/);
|
||||
my @holderparts = split(/\//, $holders[0]);
|
||||
my $holder = "/dev/" . $holderparts[-1];
|
||||
if(-b $holder and sysopen(my $blockdev, $holder, O_RDWR|O_EXCL)) {
|
||||
close($blockdev);
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub is_zfcp
|
||||
{
|
||||
# remove leading /dev/
|
||||
my $device = substr(shift(), 5);
|
||||
my $blockpath = "/sys/block/$device";
|
||||
my $dmname = undef;
|
||||
|
||||
# if user passed a device name on cmdline that we listed before
|
||||
# convert to a dm-[0-9]+ kernel device name
|
||||
if ($device =~ /^mapper\//) {
|
||||
$device = substr(readlink("/dev/" . $device), 3);
|
||||
$blockpath = "/sys/block/" . $device;
|
||||
}
|
||||
# check if dm-multipath and get one path member
|
||||
if ($device =~ /^dm-[0-9]+$/) {
|
||||
my $dmuuid = read_file("$blockpath/dm/uuid");
|
||||
return(undef) unless $dmuuid =~ /^mpath-/;
|
||||
$dmname = read_file("$blockpath/dm/name");
|
||||
opendir(DIR, "$blockpath/slaves/") or return(undef);
|
||||
while (defined(my $pathmember = readdir(DIR))) {
|
||||
# skip ".", "..", or other non scsi disk entries
|
||||
next unless $pathmember =~ /^sd[a-z]+$/;
|
||||
$device = $pathmember;
|
||||
last;
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
my $devpath = "/sys/block/$device/device";
|
||||
|
||||
unless (-r "$devpath/hba_id" or -r "$devpath/type") {
|
||||
return(0);
|
||||
return(undef);
|
||||
}
|
||||
|
||||
my $devtype = read_file("$devpath/type");
|
||||
|
||||
# SCSI type '0' means disk
|
||||
if ($devtype == 0) {
|
||||
return(1);
|
||||
if (defined $dmname) {
|
||||
return("/dev/mapper/$dmname");
|
||||
} else {
|
||||
return("/dev/$device");
|
||||
}
|
||||
} else {
|
||||
return(0);
|
||||
return(undef);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,8 +226,13 @@ sub print_device
|
||||
{
|
||||
my $device = shift();
|
||||
my $only_dump_disks = shift();
|
||||
my $devpath;
|
||||
|
||||
my $devpath = "/sys/block/" . substr($device, 5);
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
$devpath = "/sys/block/" . substr(readlink($device), 3);
|
||||
} else {
|
||||
$devpath = "/sys/block/" . substr($device, 5);
|
||||
}
|
||||
my $output = $device;
|
||||
my $dump_device = 0;
|
||||
|
||||
@ -219,6 +268,19 @@ sub print_device
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# get one path member to fill path info for "yast onpanic"
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
my $blockdev = substr(readlink($device), 3);
|
||||
my $blockpath = "/sys/block/" . $blockdev;
|
||||
opendir(DIR, "$blockpath/slaves/") or return(undef);
|
||||
while (defined(my $pathmember = readdir(DIR))) {
|
||||
# skip ".", "..", or other non scsi disk entries
|
||||
next unless $pathmember =~ /^sd[a-z]+$/;
|
||||
$devpath = "/sys/block/" . $pathmember;
|
||||
last;
|
||||
}
|
||||
closedir(DIR);
|
||||
}
|
||||
my $adapter = read_file("$devpath/device/hba_id");
|
||||
my $wwpn = read_file("$devpath/device/wwpn");
|
||||
my $lun = read_file("$devpath/device/fcp_lun");
|
||||
@ -280,7 +342,9 @@ sub determine_free_disks
|
||||
opendir(DIR, $path) or exit_with("Unable to find $path: $!", 15);
|
||||
while (defined(my $file = readdir(DIR))) {
|
||||
# no need to add other devices then dasd* or sd*
|
||||
if ($file =~ /^dasd[a-z]+$/ or $file =~ /^sd[a-z]+$/) {
|
||||
# or dm-multipath
|
||||
if ($file =~ /^dasd[a-z]+$/ or $file =~ /^sd[a-z]+$/ or
|
||||
$file =~ /^dm-[0-9]+$/) {
|
||||
push(@devices, $file);
|
||||
}
|
||||
}
|
||||
@ -289,6 +353,8 @@ sub determine_free_disks
|
||||
for my $entry (@devices) {
|
||||
# only allow disks, no partitions
|
||||
my ($device) = $entry =~ /^([a-z]+)$/;
|
||||
# dm devices other than dm-multipath are filtered by is_zfcp()
|
||||
($device) = $entry =~ /^(dm-[0-9]+)$/ unless ($device);
|
||||
next unless ($device);
|
||||
|
||||
$device = "/dev/$device";
|
||||
@ -299,8 +365,21 @@ sub determine_free_disks
|
||||
if (is_dasd($device)) {
|
||||
push(@dasd, $device);
|
||||
}
|
||||
if (is_zfcp($device)) {
|
||||
push(@zfcp, $device);
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp) {
|
||||
push(@zfcp, $zfcp);
|
||||
}
|
||||
} else {
|
||||
# A dm-multipath device with a single holder
|
||||
# being a kpartx partition number 1 could still
|
||||
# be free or contain a zfcpdump boot record.
|
||||
# Due to the kpartx linear dm mapping, such
|
||||
# dm-multipath device cannot open exclusively.
|
||||
if (has_free_single_kpartx($device)) {
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp) {
|
||||
push(@zfcp, $zfcp);
|
||||
}
|
||||
}
|
||||
}
|
||||
# wait for udev to process all events triggered by sysopen(,O_EXCL)
|
||||
@ -418,7 +497,13 @@ sub setup_zfcpdump
|
||||
|
||||
# install bootloader
|
||||
print("Creating dump record.\n");
|
||||
run_cmd("${ZIPL} -V -d ${device}1");
|
||||
my $partdev;
|
||||
if ($device =~ /^\/dev\/mapper\//) {
|
||||
$partdev = $device . "-part1"; # kpartx partition on multipath
|
||||
} else {
|
||||
$partdev = $device . "1"; # real partition, single path SCSI
|
||||
}
|
||||
run_cmd("${ZIPL} -V -d ${partdev}");
|
||||
|
||||
cleanup();
|
||||
}
|
||||
@ -535,14 +620,17 @@ sub analyze_cmd_parameters
|
||||
if (grep(/$device/, @devices)) {
|
||||
exit_with("$device is mentioned more than once.", 14);
|
||||
}
|
||||
if ( $device =~ /^\/dev\/[a-z]+$/ == 0) {
|
||||
# dm devices other than dm-multipath are filtered by is_zfcp()
|
||||
if ( $device =~ /^\/dev\/[a-z]+$/ == 0 and
|
||||
$device !~ /^\/dev\/mapper\// ) {
|
||||
exit_with("The device parameter $device is inaccurate. Only whole disks are allowed.", 14);
|
||||
}
|
||||
if (grep(/$device/, (@$dasd_ref, @$zfcp_ref))) {
|
||||
if (is_zfcp($device) and @ARGV > 1) {
|
||||
my $zfcp = is_zfcp($device);
|
||||
if (defined $zfcp and @ARGV > 1) {
|
||||
exit_with("Multi-volume dumps aren't supported with zFCP.", 14);
|
||||
}
|
||||
push(@devices, $device);
|
||||
push(@devices, (defined $zfcp) ? $zfcp : $device);
|
||||
} else {
|
||||
if (-b $device) {
|
||||
exit_with("$device is in use or not a DASD/zFCP disk!", 14);
|
||||
@ -565,8 +653,9 @@ sub main
|
||||
my @devices = analyze_cmd_parameters();
|
||||
|
||||
# only one dump device is possible with zFCP which is enforced in analyze_cmd_parameters
|
||||
if (is_zfcp($devices[0])) {
|
||||
setup_zfcpdump($devices[0]);
|
||||
my $zfcp = is_zfcp($devices[0]);
|
||||
if (defined $zfcp) {
|
||||
setup_zfcpdump($zfcp);
|
||||
} else {
|
||||
setup_dasddump(@devices);
|
||||
}
|
||||
|
@ -48,14 +48,6 @@ debug_mesg () {
|
||||
esac
|
||||
}
|
||||
|
||||
add_cio_channel() {
|
||||
echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
remove_cio_channel() {
|
||||
[ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${0} [options] <read chan> <write chan> <data chan> <online>"
|
||||
echo " -i Configure IP takeover"
|
||||
@ -165,10 +157,3 @@ RC=${?}
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit ${RC}
|
||||
fi
|
||||
|
||||
if [ ${ON_OFF} == 1 ]; then
|
||||
add_cio_channel "${QETH_READ_CHAN},${QETH_WRITE_CHAN},${QETH_DATA_CHAN}"
|
||||
else remove_cio_channel "${QETH_READ_CHAN}"
|
||||
remove_cio_channel "${QETH_WRITE_CHAN}"
|
||||
remove_cio_channel "${QETH_DATA_CHAN}"
|
||||
fi
|
||||
|
111
qeth_configure.8
111
qeth_configure.8
@ -50,112 +50,17 @@ QETH port number to use, 0 or 1. Only needed for real, not virtual devices.
|
||||
.IP "-p portname"
|
||||
QETH Portname to use. Only needed if sharing a real OSA with z/OS.
|
||||
.SH FILES
|
||||
.I /etc/udev/rules.d/51-hsi-<ccwid>.rules
|
||||
.RE
|
||||
.I /etc/udev/rules.d/51-osn-<ccwid>.rules
|
||||
.RE
|
||||
.I /etc/udev/rules.d/51-qeth-<ccwid>.rules
|
||||
.RS
|
||||
These files provide the udev rules necessary to activate a specific adapter.
|
||||
.RE
|
||||
Please see the documentation of
|
||||
.B chzdev.
|
||||
.SH ENVIRONMENT
|
||||
.IP DEBUG
|
||||
If set to "yes" some minimal debugging information is output during execution.
|
||||
.SH DIAGNOSTICS
|
||||
The following messages may be issued on stdout:
|
||||
.IP
|
||||
.B /sysfs not present
|
||||
.RS
|
||||
The sysfs file system could not be found in /proc/mounts, so there's nothing the script can
|
||||
do. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Invalid device status ${ONLINE}
|
||||
.RS
|
||||
A value other than 0 or 1 was specified for the third parameter, online. Return code 2 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${QETH_READ_CHAN}
|
||||
.RS
|
||||
A non-existent <ccwid> was specified for the read_channel parameter. Remember the x.y.ssss format is necessary. Return code 3 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${QETH_WRITE_CHAN}
|
||||
.RS
|
||||
A non-existent <ccwid> was specified for the write_channel parameter. Remember the x.y.ssss format is necessary. Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${QETH_DATA_CHAN}
|
||||
.RS
|
||||
A non-existent <ccwid> was specified for the data_channel parameter. Remember the x.y.ssss format is necessary. Return code 4 is set.. Return code 5 is st.
|
||||
.RE
|
||||
.IP
|
||||
.B Only qeth, hsi and osn are supported.
|
||||
.RS
|
||||
The device type specified by the -t option is not one of the supported types. Return code 6 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Not a valid QETH device (cu $_cutype, dev $_devtype)
|
||||
.RS
|
||||
The device number specified does not correspond to a valid QETH device type. Return code 6 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not load module ${CCW_DRV}
|
||||
.RS
|
||||
The kernel module for the device type failed to load. Try "dmesg" to see if there is any indication why. Return code 7 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B CCW devices grouped to different devices
|
||||
.RS
|
||||
Two or more of the read, write and channels are already grouped, but not within the same interface. Try again with different devices. Return code 8 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not group $CCW_DRV devices $QETH_READ_CHAN/$QETH_WRITE_CHAN/$QETH_DATA_CHAN
|
||||
.RS
|
||||
The attempt to group the read, write and data channels into an interface failed. Try "dmesg" to see if there is any indication why. Return code 9 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not set device ${CCW_CHAN_ID} online
|
||||
.RS
|
||||
The attempt to bring the grouped devices online failed. Try "dmesg" to see if there is any indication why. Return code 10 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not set device ${CCW_CHAN_ID} offline
|
||||
.RS
|
||||
The attempt to take the grouped devices offline failed. Try "dmesg" to see if there is any indication why. Return code 11 is set.
|
||||
.RE
|
||||
|
||||
If environment variable DEBUG is set to "yes," the following messages may be issued on stdout:
|
||||
.IP
|
||||
.B
|
||||
Configuring QETH device ${QETH_READ_CHAN}/${QETH_WRITE_CHAN}/${QETH_DATA_CHAN}
|
||||
.RS
|
||||
Just a little bit of verbosity, since it just indicates that we got past certain error checks and will now try to do something useful.
|
||||
.RE
|
||||
.IP
|
||||
.B No portname required for $QETH_CARD adapters
|
||||
.RS
|
||||
If a QETH_CARD type other than "qeth" is specified or detected, a portname is not used, so using the -p option is unnecessary.
|
||||
.RE
|
||||
.IP
|
||||
.B Invalid option $opt_name
|
||||
.RS
|
||||
Either portname, ipa_takeover, layer2, or a completely unknown QETH parameter was specified via the -o parameter. For portname, ipa_takeover, and layer2, use the -p, -i, or -l options, respectively.
|
||||
.RE
|
||||
.IP
|
||||
.B Device ${CCW_CHAN_ID} is already online
|
||||
.RS
|
||||
An attempt was made to bring the adapter online when it was already online.
|
||||
.RE
|
||||
.IP
|
||||
.B Setting device offline
|
||||
.RS
|
||||
Just a little bit of verbosity.
|
||||
.RE
|
||||
.IP
|
||||
.B Device ${CCW_CHAN_ID} is already offline
|
||||
.RS
|
||||
An attempt was made to take the adapter offline when it was already offline.
|
||||
.RE
|
||||
Messages and return codes are determined by the
|
||||
.B chzdev
|
||||
command.
|
||||
If environment variable DEBUG is set to "yes," it shows the command line of the invoked
|
||||
.B chzdev,
|
||||
and a message for each command line option is issued on stdout.
|
||||
.SH BUGS
|
||||
Gotta be some, I'm sure. If you find one, please open a bug report.
|
||||
|
@ -1,7 +1,3 @@
|
||||
---
|
||||
etc/udev/rules.d/59-dasd.rules | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: s390-tools-2.29.0/etc/udev/rules.d/59-dasd.rules
|
||||
===================================================================
|
||||
--- s390-tools-2.29.0.orig/etc/udev/rules.d/59-dasd.rules
|
||||
|
@ -12,8 +12,8 @@ so we should be suppressing the error message for these devices, too.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
fdasd/fdasd.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
fdasd/fdasd.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/fdasd/fdasd.c
|
||||
===================================================================
|
||||
|
@ -10,7 +10,7 @@ References: bnc#808042
|
||||
|
||||
Signed-off-by: Robert Milasan <rmilasan@suse.de>
|
||||
---
|
||||
etc/udev/rules.d/59-dasd.rules | 2 +-
|
||||
etc/udev/rules.d/59-dasd.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: s390-tools-2.29.0/etc/udev/rules.d/59-dasd.rules
|
||||
|
@ -1,7 +1,3 @@
|
||||
---
|
||||
zipl/boot/menu.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/zipl/boot/menu.c
|
||||
===================================================================
|
||||
--- s390-tools-2.29.0.orig/zipl/boot/menu.c
|
||||
|
@ -1,7 +1,3 @@
|
||||
---
|
||||
etc/sysconfig/dumpconf | 162 ++++++++++++++++++++++++++++++++++---------------
|
||||
1 file changed, 114 insertions(+), 48 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/etc/sysconfig/dumpconf
|
||||
===================================================================
|
||||
--- s390-tools-2.29.0.orig/etc/sysconfig/dumpconf
|
||||
|
@ -7,9 +7,9 @@ Allow the user to specify several devices as arguments to dasdfmt.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dasdfmt/dasdfmt.8 | 5 -
|
||||
dasdfmt/dasdfmt.c | 197 +++++++++++++++++++++++++++++++-----------------------
|
||||
2 files changed, 119 insertions(+), 83 deletions(-)
|
||||
dasdfmt/dasdfmt.8 | 5 +-
|
||||
dasdfmt/dasdfmt.c | 175 ++++++++++++++++++++++++++++++------------------------
|
||||
2 files changed, 100 insertions(+), 80 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/dasdfmt/dasdfmt.8
|
||||
===================================================================
|
||||
|
@ -7,9 +7,10 @@ Allow dasdfmt to run in parallel when several devices are specified.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dasdfmt/dasdfmt.8 | 16 +++++++++++++-
|
||||
dasdfmt/dasdfmt.c | 58 ++++++++++++++++++++++++++++++++++++++++++------------
|
||||
2 files changed, 60 insertions(+), 14 deletions(-)
|
||||
dasdfmt/dasdfmt.8 | 16 ++++++++++++++--
|
||||
dasdfmt/dasdfmt.c | 50 +++++++++++++++++++++++++++++++++++++++++++-------
|
||||
dasdfmt/dasdfmt.h | 1 +
|
||||
3 files changed, 58 insertions(+), 9 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/dasdfmt/dasdfmt.8
|
||||
===================================================================
|
||||
|
@ -7,9 +7,10 @@ Implement an option '-Y' to suppress most output.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dasdfmt/dasdfmt.8 | 7 ++++-
|
||||
dasdfmt/dasdfmt.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++------
|
||||
2 files changed, 72 insertions(+), 8 deletions(-)
|
||||
dasdfmt/dasdfmt.8 | 7 ++++++-
|
||||
dasdfmt/dasdfmt.c | 27 ++++++++++++++++++++-------
|
||||
dasdfmt/dasdfmt.h | 1 +
|
||||
3 files changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/dasdfmt/dasdfmt.8
|
||||
===================================================================
|
||||
|
@ -9,9 +9,9 @@ version of YaST we should accept this option, too.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
dasdfmt/dasdfmt.8 | 6 +++++-
|
||||
dasdfmt/dasdfmt.c | 10 ++++++++++
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
dasdfmt/dasdfmt.8 | 6 +++++-
|
||||
dasdfmt/dasdfmt.c | 8 ++++++++
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: s390-tools-2.29.0/dasdfmt/dasdfmt.8
|
||||
===================================================================
|
||||
|
@ -16,8 +16,8 @@ References: bsc#937340
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
dasdfmt/dasdfmt.c | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
dasdfmt/dasdfmt.c | 21 ++++++++++++++++++---
|
||||
1 file changed, 18 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/dasdfmt/dasdfmt.c
|
||||
===================================================================
|
||||
|
@ -1,7 +1,3 @@
|
||||
---
|
||||
common.mak | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: s390-tools-2.29.0/common.mak
|
||||
===================================================================
|
||||
--- s390-tools-2.29.0.orig/common.mak
|
||||
|
@ -1,47 +1,49 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 6 06:10:19 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
Mon Nov 13 13:13:11 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Added a patch (jsc#PED-6373)
|
||||
* s390-tools-sles15sp6-zkey-Support-EP11-AES-keys-with-prepended-header-to-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 28 15:52:15 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Amended read_value.c for newer z16 models (bsc#1214534)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 8 08:00:14 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Upgrade to version 2.29.0 (jsc#PED-3275)
|
||||
* s390-tools now supports tools written in Rust.
|
||||
* Add compdb Makefile target to create 'compile_commands.json' to support LSP
|
||||
backends in IDEs and editors
|
||||
- Add new tools / libraries:
|
||||
* Upgrade 390-tools from version 2.25.0 to version v2.29.0 (Latest)
|
||||
* * * *
|
||||
- General:
|
||||
- s390-tools now supports tools written in Rust.
|
||||
- Add compdb Makefile target to create 'compile_commands.json' to support LSP
|
||||
- backends in IDEs and editors
|
||||
- Add new tools / libraries:
|
||||
* rust/pv: Library for pv tools written in rust
|
||||
* rust/pvsecret: Tool to manage UV-secrets
|
||||
- Changes of existing tools:
|
||||
* dbginfo.sh: Global IFS variable
|
||||
* genprotimg: Add support for add-secret requests
|
||||
* genprotimg: Build debuginfo files for bootloader
|
||||
* hyptop: Add real SMT utilization field
|
||||
* hyptop: Allow users to set speedup factor
|
||||
* pvattest: Add yaml-output for verify command
|
||||
* zipl: Build debuginfo files for bootloader
|
||||
- Bug Fixes:
|
||||
* dump2tar: Fix truncated paths
|
||||
* zdev/dracut: fix kdump build to integrate with site support
|
||||
- Amended .spec for version 2.29.0, including Rust integration
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 14 11:24:27 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Upgrade to version 2.27.0 (jsc#PED-3275)
|
||||
- Changes of existing tools:
|
||||
* s390-tools cross-compile and non-s390x support:
|
||||
* Changes of existing tools:
|
||||
- dbginfo.sh: Global IFS variable
|
||||
- genprotimg: Add support for add-secret requests
|
||||
- genprotimg: Build debuginfo files for bootloader
|
||||
- hyptop: Add real SMT utilization field
|
||||
- hyptop: Allow users to set speedup factor
|
||||
- pvattest: Add yaml-output for verify command
|
||||
- zipl: Build debuginfo files for bootloader
|
||||
* Bug Fixes:
|
||||
- dump2tar: Fix truncated paths
|
||||
- zdev/dracut: fix kdump build to integrate with site support
|
||||
* * * *
|
||||
* v2.28.0
|
||||
- Changes of existing tools:
|
||||
- chzcrypt: Support for SE AP pass-through support
|
||||
- genprotimg: Add support for non-s390x architectures
|
||||
- lszcrypt: Support for SE AP pass-through support
|
||||
- zdev: Add support for autoquiesce related sysfs attributes
|
||||
* Bug Fixes:
|
||||
- ap_tools/ap-check: Handle missing 'matrix' and 'control_domains' attrs
|
||||
- ap_tools/ap-check: Hold ap config file lock over get attributes
|
||||
- s390-tools: Fix build for ppc64le
|
||||
- zdev: Add missing label in the udev-rules
|
||||
- zdev: Add proper value input for the ZDEV_SITE_ID key
|
||||
- zdev: Use rename-file to avoid any symlinks created
|
||||
- zipl/dump: fix ngdump dracut helper script
|
||||
* * * *
|
||||
* v2.27.0
|
||||
* Changes of existing tools:
|
||||
- s390-tools cross-compile and non-s390x support:
|
||||
- pkg-config is now mandatory for the build process
|
||||
- Add PKG_CONFIG Makefile variable to select pkg-config program;
|
||||
default pkg-config or $(CROSS_COMPILE)pkg-config if
|
||||
CROSS_COMPILE is set
|
||||
- default pkg-config or $(CROSS_COMPILE)pkg-config if
|
||||
- CROSS_COMPILE is set
|
||||
- Rename Makefile variable ARCH to HOST_ARCH. HOST_ARCH is the
|
||||
architecture that will run the produced (executable) objects
|
||||
- Add the Makefile variable BUILD_ARCH. BUILD_ARCH is the
|
||||
@ -51,42 +53,99 @@ Wed Jun 14 11:24:27 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
convention is very similar to the Meson convention (see
|
||||
https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine).
|
||||
- Limit build targets for non-s390x architectures (pvattest)
|
||||
* dasdfmt: Fall back to full format if space release fails
|
||||
* dbginfo.sh: Add nstat for network and SNMP stats
|
||||
* dbginfo.sh: Rework crypto data collection
|
||||
* hyptop: Show thread util by default
|
||||
* zipl: Add support for list-directed IPL dump from ECKD DASD
|
||||
- Bug Fixes:
|
||||
* lszcrypt: Fix argument parsing
|
||||
* zdev/dracut: Fix out-of-memory (OOM) situations in the kdump crashkernel environment
|
||||
* ziomon/ziorep_config: Fix for SCSI devices of type disk without block dev
|
||||
* pvextract-hdr: Fix parsing issues on little-endian systems
|
||||
- Amended the .patches to fit the 2.27 version
|
||||
- Removed obsolete patches (the fixes are included in this version)
|
||||
* s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch
|
||||
* s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch
|
||||
* s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
|
||||
* s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch
|
||||
* s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch
|
||||
* s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch
|
||||
* s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch
|
||||
* s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch
|
||||
* s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch
|
||||
* s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch
|
||||
* s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch
|
||||
* s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch
|
||||
* s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch
|
||||
* s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch
|
||||
* s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
|
||||
* s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
|
||||
* s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
|
||||
* s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
|
||||
* s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch
|
||||
* s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch
|
||||
* s390-tools-sles15sp5-fix-chown-commands-syntax.patch
|
||||
- dasdfmt: Fall back to full format if space release fails
|
||||
- dbginfo.sh: Add nstat for network and SNMP stats
|
||||
- dbginfo.sh: Rework crypto data collection
|
||||
- hyptop: Show thread util by default
|
||||
- zipl: Add support for list-directed IPL dump from ECKD DASD
|
||||
* Bug Fixes:
|
||||
- lszcrypt: Fix argument parsing
|
||||
- zdev/dracut: Fix out-of-memory (OOM) situations in the kdump crashkernel environment
|
||||
- ziomon/ziorep_config: Fix for SCSI devices of type disk without block dev
|
||||
- pvextract-hdr: Fix parsing issues on little-endian systems
|
||||
* * * *
|
||||
* v2.26.0
|
||||
* Remove tools / libraries:
|
||||
- Remove vmconvert and libvmdump in favor of vmdump file support in zdump
|
||||
* Changes of existing tools:
|
||||
- ipl_tools: Add support for list-directed IPL from ECKD DASD
|
||||
- lszcrypt: Display hardware filtering support capability
|
||||
- vmur: Remove option -c for dump file conversion (See zdump changes)
|
||||
- zdev: Add zfcp ber_stop parameter handling
|
||||
- zdump: Add vmdump dfi for vmdump format to elf format
|
||||
- zkey: Support EP11 host library version
|
||||
* Bug Fixes:
|
||||
- zipl: Move dump parmline processing and verification
|
||||
- zipl/genprotimg: Various build improvements
|
||||
* * * *
|
||||
* Removed obsolete IBM patches
|
||||
- s390-tools-sles15sp5-zipl-boot-disable-Warray-bounds-for-now.patch
|
||||
- s390-tools-sles15sp5-zkey-Support-EP11-host-library-version-4.patch
|
||||
* Removed obsolete patches for bug 1208527, and bug 1206173
|
||||
- s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
|
||||
- s390-tools-sles15sp5-02-zipl-boot-declare-that-no-executable-stack-is-requir.patch
|
||||
- s390-tools-sles15sp5-03-zipl-boot-use-no-warn-rwx-segments-linker-flag.patch
|
||||
- s390-tools-sles15sp5-04-zipl-boot-disable-build-id.patch
|
||||
- s390-tools-sles15sp5-05-zipl-boot-simplify-objcopy-commands.patch
|
||||
- s390-tools-sles15sp5-06-zipl-move-STAGE2_MAX_SIZE-and-STAGE1B_LOAD_ADDR-to-l.patch
|
||||
- s390-tools-sles15sp5-07-zipl-boot-use-linker-scripts-for-all-bootloaders.patch
|
||||
- s390-tools-sles15sp5-08-genprotimg-boot-declare-that-no-executable-stack-is-.patch
|
||||
- s390-tools-sles15sp5-09-genprotimg-boot-use-no-warn-rwx-segments-linker-flag.patch
|
||||
- s390-tools-sles15sp5-10-genprotimg-boot-disable-build-id.patch
|
||||
- s390-tools-sles15sp5-11-genprotimg-boot-Makefile-simplify-objcopy-command.patch
|
||||
- s390-tools-sles15sp5-12-genprotimg-boot-improve-linker-scripts.patch
|
||||
- s390-tools-sles15sp5-13-genprotimg-boot-stage3b-add-size-check-to-the-linker.patch
|
||||
- s390-tools-sles15sp5-14-genprotimg-boot-stage3b_reloc.bin-add-linker-script.patch
|
||||
- s390-tools-sles15sp5-15-zipl-Embed-loader-data-directly-into-boot-object.patch
|
||||
* Removed obsolete patch for bug 1209196
|
||||
- s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
|
||||
* Removed obsolete patches for bug 1211008
|
||||
- s390-tools-sles15sp5-01-ziomon-ziorep_config-fix-missing-SG-major-minor-for-.patch
|
||||
- s390-tools-sles15sp5-02-ziomon-ziorep_config-fix-for-SCSI-devices-of-type-di.patch
|
||||
* Removed obsolete patch for bug 1213377
|
||||
- s390-tools-sles15sp5-01-zdev-add-missing-label-in-the-udev-rules.patch
|
||||
* Removed obsolete patches for bug 1213852
|
||||
- s390-tools-sles15sp5-01-zdev-add-proper-value-input-for-the-ZDEV_SITE_ID-key.patch
|
||||
- s390-tools-sles15sp5-02-zdev-use-rename-file-to-avoid-any-symlinks-created.patch
|
||||
* Removed obsolete patch for bug 1214114
|
||||
- s390-tools-sles15sp5-dasdfmt-Fall-back-to-full-format-if-space-release-fa.patch
|
||||
* Removed obsolete patch
|
||||
- s390-tools-sles15sp5-fix-chown-commands-syntax.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 4 08:32:36 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
Thu Nov 2 09:31:19 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Applied a patch (jsc#PED-6539, jsc#PED-6373)
|
||||
* s390-tools-sles15sp6-zkey-Support-EP11-AES-keys-with-prepended-header-to-.patch
|
||||
- Updated read_values.c (bsc#1214466, bsc#1214534)
|
||||
* Update read_values.c to support the new IBM z Processors
|
||||
- Updated SUSE's tools and their corresponding man pages (bsc#1216257)
|
||||
* ctc_configure
|
||||
* dasd_configure.opensuse
|
||||
* dasd_configure.8
|
||||
* dasd_configure.suse
|
||||
* mkdump.pl.opensuse
|
||||
* mkdump.pl.suse
|
||||
* qeth_configure
|
||||
* qeth_configure.8
|
||||
* zfcp_disk_configure
|
||||
* zfcp_disk_configure.8
|
||||
* zfcp_host_configure.8
|
||||
* zfcp_host_configure
|
||||
- Updated cputype script
|
||||
* Amended cputype to support the new IBM z Processors
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 21 13:29:47 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Applies patches (bsc#1213377, bsc#1213852, bsc#1214114)
|
||||
* s390-tools-sles15sp5-01-zdev-add-missing-label-in-the-udev-rules.patch
|
||||
* s390-tools-sles15sp5-01-zdev-add-proper-value-input-for-the-ZDEV_SITE_ID-key.patch
|
||||
* s390-tools-sles15sp5-02-zdev-use-rename-file-to-avoid-any-symlinks-created.patch
|
||||
* s390-tools-sles15sp5-dasdfmt-Fall-back-to-full-format-if-space-release-fa.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 4 11:06:54 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Applied patches for ziomon: fix for SCSI devices of type disk without block dev
|
||||
(bsc#1211008)
|
||||
@ -115,20 +174,20 @@ Thu Mar 23 12:45:57 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
- Amended read_value.c
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 13 15:33:43 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
Mon Mar 13 10:56:44 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Applied a patch (bsc#1209196)
|
||||
* s390-tools-sles15sp5-lszcrypt-use-separate-index-for-inner-sub-device-loo.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 8 09:38:46 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
Wed Mar 8 09:10:20 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Updated cputype (bsc#1208983)
|
||||
* Changed the script to avoid "/usr/bin/cputype: line xx: nnnn: command not found",
|
||||
when machine type was found more than once in the /proc/cpuinfo.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 21 13:49:29 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
Tue Feb 21 13:46:33 UTC 2023 - Nikolay Gueorguiev <nikolay.gueorguiev@suse.com>
|
||||
|
||||
- Applied the following patches (bsc#1208527, bsc#1206173)
|
||||
* s390-tools-sles15sp5-01-zipl-boot-discard-.eh_frame-and-.interp-input-sectio.patch
|
||||
|
@ -131,6 +131,7 @@ Source200: cargo_config
|
||||
Source201: vendor.tar.gz
|
||||
###
|
||||
|
||||
###
|
||||
# IBM patches
|
||||
###
|
||||
# SUSE patches
|
||||
@ -150,11 +151,9 @@ Patch908: s390-tools-sles15sp3-dasdfmt-retry-BIODASDINFO-if-device-is-busy
|
||||
Patch909: s390-tools-sles12-fdasd-skip-partition-check-and-BLKRRPART-ioctl.patch
|
||||
Patch910: s390-tools-sles15sp1-11-zdev-Do-not-call-zipl-on-initrd-update.patch
|
||||
Patch911: s390-tools-sles15sp5-remove-no-pie-link-arguments.patch
|
||||
#
|
||||
Patch912: s390-tools-sles15sp6-zkey-Support-EP11-AES-keys-with-prepended-header-to-.patch
|
||||
#
|
||||
Patch999: s390-tools-ALP-zdev-live.patch
|
||||
#
|
||||
Patch912: s390-tools-ALP-zdev-live.patch
|
||||
Patch913: s390-tools-sles15sp6-zkey-Support-EP11-AES-keys-with-prepended-header-to-.patch
|
||||
###
|
||||
|
||||
BuildRequires: curl-devel
|
||||
BuildRequires: dracut
|
||||
@ -319,9 +318,7 @@ operational path.
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
#
|
||||
cp -vi %{SOURCE22} CAUTION
|
||||
#
|
||||
|
||||
###
|
||||
install -D -m 0644 %{SOURCE200} .cargo/config
|
||||
@ -330,8 +327,6 @@ tar -xzvf %{SOURCE201}
|
||||
|
||||
%build
|
||||
|
||||
#
|
||||
#
|
||||
# The "DISTRELEASE=%%{release}" needs to be on both the make and make install
|
||||
# commands, since make install runs sed commands against various scripts to
|
||||
# modify the "-v" output appropriately.
|
||||
@ -347,8 +342,6 @@ export KERNELIMAGE_MAKEFLAGS="%%{?_smp_mflags}"
|
||||
gcc -static -o read_values ${OPT_FLAGS} %{SOURCE86} -lqc
|
||||
|
||||
%install
|
||||
|
||||
#
|
||||
mkdir -p %{buildroot}/boot/zipl
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/zkey/repository
|
||||
%make_install \
|
||||
@ -446,7 +439,7 @@ if [ ! -d %{_bindir} ]; then
|
||||
fi
|
||||
install -D -m755 %{SOURCE24} %{buildroot}%{_bindir}/cputype
|
||||
|
||||
install -m644 -t %{buildroot}/%{_mandir}/man1 %{SOURCE25}
|
||||
install -m644 -t %{buildroot}/%{_mandir}/man8 %{SOURCE25}
|
||||
|
||||
# If building for openSUSE, move all the binaries installed via
|
||||
# the IBM-provided Makefile from /sbin to /usr/sbin/ to
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# Configures a zfcp SCSI disk by calling the IBM-provided chzdev command.
|
||||
# Configures a zfcp-attached Logical Unit by calling the IBM-provided chzdev command.
|
||||
# Whereas this script used to validate the parameters provided to it,
|
||||
# we now rely on chzdev to do that instead. The script is intended only
|
||||
# as a "translation layer" to provide backward compatability for older
|
||||
@ -15,9 +15,9 @@
|
||||
#
|
||||
# ccwid = x.y.ssss where
|
||||
# x is always 0 until IBM creates something that uses that number
|
||||
# y is the logical channel subsystem (lcss) number. Most often
|
||||
# y is the subchannel set ID (SSID). Most often
|
||||
# this is 0, but it could be non-zero
|
||||
# ssss is the four digit subchannel address of the device, in
|
||||
# ssss is the four digit device address of the subchannel, in
|
||||
# hexidecimal, with leading zeros.
|
||||
# online = 0 to take the device offline
|
||||
# 1 to bring the device online
|
||||
@ -41,9 +41,9 @@ usage(){
|
||||
echo "Usage: ${0} <ccwid> <wwpn> <lun> <online>"
|
||||
echo " ccwid = x.y.ssss where"
|
||||
echo " x is always 0 until IBM creates something that uses that number"
|
||||
echo " y is the logical channel subsystem (lcss) number. Most often"
|
||||
echo " y is the subchannel set ID (SSID). Most often"
|
||||
echo " this is 0, but it could be non-zero"
|
||||
echo " ssss is the four digit subchannel address of the device, in"
|
||||
echo " ssss is the four digit device address of the subchannel, in"
|
||||
echo " hexidecimal, with leading zeros."
|
||||
echo " online = 0 to take the device offline"
|
||||
echo " 1 to bring the device online"
|
||||
|
@ -1,11 +1,11 @@
|
||||
.TH zfcp_disk_configure "8" "February 2013" "s390-tools"
|
||||
.SH NAME
|
||||
zfcp_disk_configure \- Configures or deconfigures a SCSI over zFCP disk (LUN).
|
||||
zfcp_disk_configure \- Configures or deconfigures a zfcp-attached SCSI Logical Unit (LU).
|
||||
.SH SYNOPSIS
|
||||
.B zfcp_disk_configure ccwid wwpn lun online
|
||||
.SH DESCRIPTION
|
||||
.B zfcp_disk_configure
|
||||
is intended to make it easy to persistently add and remove SCSI over zFCP disks. In addition to bringing the disk online or offline, it will also create or delete the necessary udev rules for the disk.
|
||||
is intended to make it easy to persistently add and remove zfcp-attached SCSI Logical Units. In addition to bringing the LU online or offline, it will also create or delete the necessary udev rules for the LU.
|
||||
.SH PARAMETERS
|
||||
.IP ccwid
|
||||
The device number of the zFCP adapter. Takes the form x.y.ssss where
|
||||
@ -15,111 +15,32 @@ is always 0 until IBM creates something that uses that number.
|
||||
.RE
|
||||
.RS
|
||||
.B y
|
||||
is the logical channel subsystem (lcss) number. Most often this is 0, but it could be non-zero.
|
||||
is the subchannel set ID (SSID). Most often this is 0, but it could be non-zero.
|
||||
.RE
|
||||
.RS
|
||||
.B ssss
|
||||
is the four digit subchannel address of the device, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
is the four digit device address of the subchannel, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
.RE
|
||||
.IP wwpn
|
||||
Is the World Wide Port Number of the storage array in which the LUN resides. This will be a 16 digit hexidecimal number of the form 0x0123456789abcdef. You must obtain this number from the administrator of the storage array.
|
||||
.IP lun
|
||||
Is the Logical Unit Number of the specific disk in the storage array. This will also be a 16 digit hexidecimal number of the form 0x0123456789abcdef. You must obtain this number from the administrator of the storage array. Be careful in that some storage array administrator interfaces disply the LUN in decimal, and must be converted to hexidecimal to be used in this command.
|
||||
.IP online
|
||||
Either a literal 1 to bring the adapter online or a literal 0 to take it offline
|
||||
Either a literal 1 to attach the LU or a literal 0 to detach the LU.
|
||||
.SH FILES
|
||||
.I /etc/udev/rules.d/51-zfcp-<ccwid>.rules
|
||||
.RS
|
||||
This file provides the udev rules necessary to activate a specific zFCP adapter and the LUNs associated with it. Rules relating to the zFCP adapter are added by the zfcp_host_configure(8) script.
|
||||
Please see the documentation of
|
||||
.B chzdev.
|
||||
.RE
|
||||
.SH ENVIRONMENT
|
||||
.IP DEBUG
|
||||
If set to "yes" some minimal debugging information is output during execution.
|
||||
.SH DIAGNOSTICS
|
||||
The following messages may be issued on stdout:
|
||||
.IP
|
||||
.B /sysfs not present
|
||||
.RS
|
||||
The sysfs file system could not be found in /proc/mounts, so there's nothing the script can do. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No CCW device specified
|
||||
.RS
|
||||
This message should never be seen, since the script checks to make sure there are exactly four parameters specified. I.e., it is a sanity check. If it is seen, please open a bug report. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Invalid device status ${ONLINE}
|
||||
.RS
|
||||
A value other than 0 or 1 was specified for the second parameter, online. Return code 2 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${CCW_CHAN_ID}
|
||||
.RS
|
||||
If a non-existent <ccwid> was specified for the first parameter. Remember the x.y.ssss format is necessary. Return code 3 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B WWPN ${FCP_WWPN} invalid
|
||||
.RS
|
||||
Activation of the WWPN failed. Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B WWPN ${FCP_WWPN} for adapter ${CCW_CHAN_ID} not found
|
||||
.RS
|
||||
The WWPN specified isn't being "seen" by the zFCP adapter. This could have a number of different causes, such as an incorrect configuration on the storage array or SAN switch, a typographical error entering this command, etc. Return code 5 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not activate FCP disk ${FCP_WWPN}:${FCP_LUN}
|
||||
.RS
|
||||
An attempt was made to activate the specified LUN, which failed. Return code 6 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not deactivate SCSI disk ${_zfcp_scsi_id}
|
||||
.RS
|
||||
An attempt was made to deactivate the specified LUN, which failed. Return code 7 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not deregister FCP LUN ${FCP_LUN}
|
||||
.RS
|
||||
An attempt was made to remove the specified LUN from the zFCP adapter, which failed. Return code 8 is set.
|
||||
.RE
|
||||
|
||||
If environment variable DEBUG is set to "yes," the following messages may be issued on stdout:
|
||||
.IP
|
||||
.B No configuration file for adapter ${CCW_CHAN_ID}
|
||||
.RS
|
||||
The /etc/udev/rules.d/51-zfcp-<ccwid>.rules file does not exist. No return code is set, and execution continues.
|
||||
.RE
|
||||
.IP
|
||||
.B FCP disk ${FCP_WWPN}:${FCP_LUN} already configured
|
||||
.RS
|
||||
The parameters specified activating the LUN, but it was already activated. Return code 0 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B FCP disk ${FCP_WWPN}:${FCP_LUN} does not exist
|
||||
.RS
|
||||
The parameters specified deactivating the LUN, but it is not currently activated. Return code 0 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Configuring FCP disk ${FCP_WWPN}:${FCP_LUN}
|
||||
.RS
|
||||
Just a little bit of verbosity, since it just indicates that we got past certain error checks and will now try to do something useful.
|
||||
.RE
|
||||
.IP
|
||||
.B ERP failed on FCP disk ${FCP_WWPN}:${FCP_LUN}
|
||||
.RS
|
||||
An attempt to bring the specified LUN online succeeded, but the device is marked as "failed" by the SCSI layer. Return code 7 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Deconfiguring FCP disk ${FCP_WWPN}:${FCP_LUN}
|
||||
.RS
|
||||
Another bit of verbosity, which also just indicates that we got past certain error checks and will now try to do something useful.
|
||||
.RE
|
||||
.IP
|
||||
.B No SCSI disk found for FCP disk ${FCP_WWPN}:${FCP_LUN}
|
||||
.RS
|
||||
This indicates that deactivating a SCSI disk was successful.
|
||||
.RE
|
||||
Messages and return codes are determined by the
|
||||
.B chzdev
|
||||
command.
|
||||
If environment variable DEBUG is set to "yes," it shows the command line of the invoked
|
||||
.B chzdev.
|
||||
.SH BUGS
|
||||
Gotta be some, I'm sure. If you find one, please open a bug report.
|
||||
.SH SEE ALSO
|
||||
zfcp_host_configure(8), zfcp_san_disc(8)
|
||||
zfcp_host_configure(8), zfcp_san_disc(8), chzdev(8)
|
||||
|
@ -16,9 +16,9 @@
|
||||
#
|
||||
# ccwid = x.y.ssss where
|
||||
# x is always 0 until IBM creates something that uses that number
|
||||
# y is the logical channel subsystem (lcss) number. Most often
|
||||
# y is the subchannel set ID (SSID). Most often
|
||||
# this is 0, but it could be non-zero
|
||||
# ssss is the four digit subchannel address of the device, in
|
||||
# ssss is the four digit device address of the subchannel, in
|
||||
# hexidecimal, with leading zeros.
|
||||
# online = 0 to take the device offline
|
||||
# 1 to bring the device online
|
||||
@ -38,21 +38,13 @@ debug_mesg () {
|
||||
esac
|
||||
}
|
||||
|
||||
add_cio_channel() {
|
||||
echo "$* # ${DATE}" >> /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
remove_cio_channel() {
|
||||
[ -w /boot/zipl/active_devices.txt ] && sed -i -e "/^${1}/d" /boot/zipl/active_devices.txt
|
||||
}
|
||||
|
||||
usage(){
|
||||
echo "Usage: ${0} <ccwid> <online>"
|
||||
echo " ccwid = x.y.ssss where"
|
||||
echo " x is always 0 until IBM creates something that uses that number"
|
||||
echo " y is the logical channel subsystem (lcss) number. Most often"
|
||||
echo " y is the subchannel set ID (SSID). Most often"
|
||||
echo " this is 0, but it could be non-zero"
|
||||
echo " ssss is the four digit subchannel address of the device, in"
|
||||
echo " ssss is the four digit device address of the subchannel, in"
|
||||
echo " hexidecimal, with leading zeros."
|
||||
echo " online = 0 to take the device offline"
|
||||
echo " 1 to bring the device online"
|
||||
@ -88,8 +80,3 @@ RC=${?}
|
||||
if [ ${RC} -ne 0 ]; then
|
||||
exit ${RC}
|
||||
fi
|
||||
|
||||
if [ ${ON_OFF} == 1 ]; then
|
||||
add_cio_channel "${CCW_CHAN_ID}"
|
||||
else remove_cio_channel "${CCW_CHAN_ID}"
|
||||
fi
|
||||
|
@ -15,77 +15,28 @@ is always 0 until IBM creates something that uses that number.
|
||||
.RE
|
||||
.RS
|
||||
.B y
|
||||
is the logical channel subsystem (lcss) number. Most often this is 0, but it could be non-zero.
|
||||
is the subchannel set ID (SSID). Most often this is 0, but it could be non-zero.
|
||||
.RE
|
||||
.RS
|
||||
.B ssss
|
||||
is the four digit subchannel address of the device, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
is the four digit device address of the subchannel, in hexidecimal, with leading zeros. If entered in upper/mixed case, this is automatically converted to lower case.
|
||||
.RE
|
||||
.IP online
|
||||
Either a literal 1 to bring the adapter online or a literal 0 to take it offline
|
||||
.SH FILES
|
||||
.I /etc/udev/rules.d/51-zfcp-<ccwid>.rules
|
||||
.RS
|
||||
This file provides the udev rules necessary to activate a specific zFCP adapter and the LUNs associated with it. Rules relating to the LUNs are added by the zfcp_disk_configure(8) script.
|
||||
Please see the documentation of
|
||||
.B chzdev.
|
||||
.RE
|
||||
.SH ENVIRONMENT
|
||||
.IP DEBUG
|
||||
If set to "yes" some minimal debugging information is output during execution.
|
||||
.SH DIAGNOSTICS
|
||||
The following messages may be issued on stdout:
|
||||
.IP
|
||||
.B /sysfs not present
|
||||
.RS
|
||||
The sysfs file system could not be found in /proc/mounts, so there's nothing the script can do. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No CCW device specified
|
||||
.RS
|
||||
This message should never be seen, since the script checks to make sure there are exactly two parameters specified. I.e., it is a sanity check. If it is seen, please open a bug report. Return code 1 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Invalid device status $ONLINE
|
||||
.RS
|
||||
A value other than 0 or 1 was specified for the second parameter, online. Return code 2 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B No device ${CCW_CHAN_ID}
|
||||
.RS
|
||||
If a non-existent <ccwid> was specified for the first parameter. Remember the x.y.ssss format is necessary. Return code 3 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not load module ${MODULE}
|
||||
.RS
|
||||
The zfcp.ko module failed to load. Try "dmesg" to see if there is any indication why. Return code 4 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not activate adapter, status $wwpn_status
|
||||
.RS
|
||||
An attempt was made to bring the adapter online, which failed. The $wwpn_status value comes from /sys/bus/ccw/devices/$CCW_CHAN_ID/status. The adapter is explicitly set offline. Return code 5 is set.
|
||||
.RE
|
||||
.IP
|
||||
.B Could not change status of device ${CCW_CHAN_ID} to 0
|
||||
.RS
|
||||
An attempt was made to take the adapter offline, which failed. Return code 5 is set.
|
||||
.RE
|
||||
|
||||
If environment variable DEBUG is set to "yes," the following messages may be issued on stdout:
|
||||
.IP
|
||||
.B zFCP adapter ${CCW_CHAN_ID} already in status ${ONLINE}
|
||||
.RS
|
||||
An attempt was made to bring the adapter online when it was already online, or take it offline when it was already offline.
|
||||
.RE
|
||||
.IP
|
||||
.B Configuring device ${CCW_CHAN_ID}
|
||||
.RS
|
||||
Just a little bit of verbosity, since it just indicates that we got past certain error checks and will now try to do something useful.
|
||||
.RE
|
||||
.IP
|
||||
.B zFCP adapter at ${CCW_CHAN_ID} deactivated
|
||||
.RS
|
||||
Another bit of verbosity, which means that the adapter was taken offline and the udev rules deleted.
|
||||
.RE
|
||||
Messages and return codes are determined by the
|
||||
.B chzdev
|
||||
command.
|
||||
If environment variable DEBUG is set to "yes," it shows the command line of the invoked
|
||||
.B chzdev.
|
||||
.SH BUGS
|
||||
Gotta be some, I'm sure. If you find one, please open a bug report.
|
||||
.SH SEE ALSO
|
||||
zfcp_disk_configure(8), zfcp_san_disc(8)
|
||||
zfcp_disk_configure(8), zfcp_san_disc(8), chzdev(8)
|
||||
|
Loading…
Reference in New Issue
Block a user