IBM SUSE 12 SP2 Device Commands
IBM SUSE 12 SP2 Device Commands
SC34-2745-02
Linux on z Systems and LinuxONE IBM
SC34-2745-02
Note
Before using this document, be sure to read the information in Notices on page 697.
This edition applies to SUSE Linux Enterprise Server 12 SP2 and to all subsequent releases and modifications until
otherwise indicated in new editions.
Copyright IBM Corporation 2000, 2016.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Summary of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Chapter 11. Storage-class memory device driver supporting Flash Express . . . . . 187
Chapter 14. qeth device driver for OSA-Express (QDIO) and HiperSockets . . . . . . 209
| Chapter 30. Data compression with GenWQE and zEDC Express . . . . . . . . . . 363
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
Contents v
vi Device Drivers, Features, and Commands on SLES 12 SP2
Summary of changes
This revision reflects changes for SUSE Linux Enterprise Server 12 Service Pack 2.
New information
v You can now read measurement data for PCIe devices, see Reading statistics for
a PCIe device on page 22.
v The snipl tool now supports IPv6 connections between the Linux instance
where snipl runs and the SE, HMC, or z/VM CP instance that controls the
LPARs or guest virtual machines you want to work with, see Chapter 8,
Remotely controlling virtual hardware - snipl, on page 85.
v A HiperSockets port can be configured as a member of a Linux software
bridge, see Layer 2 bridge port function on page 221.
v Priority queueing for QDIO devices now supports IPv6. There are also two new
values that you can set, prio_queueing_vlan for VLANs and prio_queueing_skb
for other cases. See Using priority queueing on page 230.
v NUMA emulation is now available for Linux on z Systems. See Chapter 22,
NUMA emulation, on page 329.
v A new device driver facilitates hardware-accelerated data compression and
decompression through a PCIe-attached Field Programmable Gate Array (FPGA)
acceleration adapter, see Chapter 30, Data compression with GenWQE and
zEDC Express, on page 363.
v Information has been added about using hardware-acceleration for in-kernel
cryptographic operations, see Chapter 43, Hardware-accelerated in-kernel
cryptography, on page 449.
v There is a new section about obtaining information about your system and its
capabilities, Chapter 51, Displaying system information, on page 483.
v You can now view z Systems specific kernel messages through an app for
mobile devices. See Viewing messages with the IBM Doc Buddy app on page
486.
v A new command, cpacfstats, lets you monitor CPACF activity, see cpacfstats -
Monitor CPACF cryptographic activity on page 522.
v With new parameters for the vmur command, you can control the CLASS, DEST,
FORM, and DIST spooling options for virtual unit record devices. See vmur -
Work with z/VM spool file queues on page 652.
v A new section describes the fips kernel parameter, which enables the FIPS mode
of operation, fips - Run Linux in FIPS mode on page 675.
Changed Information
v You can now IPL from subchannel sets other than 0, see Booting from DASD
on page 61 and Attributes for ccw on page 70.
v The format of SCSI device nodes that are based on bus IDs has changed, see
SCSI device nodes on page 147.
This revision also includes maintenance and editorial changes. Technical changes
or additions to the text and illustrations are indicated by a vertical line to the left
of the change.
Deleted Information
v CLAW devices are no longer supported and the description of the CLAW device
driver has been removed.
New information
v Linux on z Systems now includes a HMC media device driver to access files on
removable media at systems that run the HMC. Installers on suitably prepared
installation DVDs can use this device driver to install Linux in an LPAR. See the
following sections:
Loading Linux from removable media or from an FTP server on page 65
Chapter 29, HMC media device driver, on page 359
hmcdrvfs - Mount a FUSE file system for remote access to media in the
HMC media drive on page 560
lshmc - List media contents in the HMC media drive on page 586
v You can now, if needed, tune the behavior of the automatic port scan, see
Controlling automatic port scanning on page 161.
v New attributes for FCP-attached SCSI devices let you check whether a device is
trying to recover, recovery failed, or access is denied. See Table 29 on page 172,
and Recovering failed SCSI devices on page 175.
v Linux in LPAR mode now supports simultaneous multithreading, see
Simultaneous multithreading on page 323.
v The cryptographic device driver now exploits the Crypto Express5S (CEX5S)
feature, see Hardware and software prerequisites on page 430.
v The pseudorandom number generator device driver now supports version 5 of
the Message Security Assist (MSA), available as of the EC12 with the latest
firmware level. See Chapter 42, Pseudo-random number device driver, on
page 445.
v The support for the z/Architecture CPU-measurement facilities now includes
the CPU-measurement sampling facility, see Chapter 46, Using the
CPU-measurement counter facility, on page 463. A new command helps you to
display details about supported and authorized counters and sampling modes,
see lscpumf - Display information about the CPU-measurement facilities on
page 577.
v The hyptop command can now display additional data, see hyptop - Display
hypervisor performance data on page 564.
Time data by thread for LPARs with multithreading.
Management time for z/VM mode.
This revision also includes maintenance and editorial changes. Technical changes
or additions to the text and illustrations are indicated by a vertical line to the left
of the change.
Deleted Information
v The mem= kernel parameter has become obsolete and is no longer described.
Summary of changes ix
x Device Drivers, Features, and Commands on SLES 12 SP2
About this publication
This publication describes the device drivers, features, and commands available to
SUSE Linux Enterprise Server 12 SP2 for the control of IBM z Systems devices
and attachments. Unless stated otherwise, in this publication the terms device
drivers and features are understood to refer to device drivers and features for SUSE
Linux Enterprise Server 12 SP2 for z Systems.
Unless stated otherwise, all z/VM related information in this document assumes a
current z/VM version, see www.vm.ibm.com/techinfo/lpmigr/vmleos.html.
For more specific information about the device driver structure, see the documents
in the kernel source tree at /usr/src/linux-<version>/Documentation/s390
For what is new, known issues, prerequisites, restrictions, and frequently asked
questions, see the SUSE Linux Enterprise Server 12 SP2 release notes at
www.suse.com/releasenotes
You can find the latest version of this publication on the developerWorks website
at www.ibm.com/developerworks/linux/linux390/documentation_suse.html
Part two contains chapters about device drivers and features that are used in the
context of booting and shutting down Linux.
Part five contains chapters about device drivers and features that help to manage
the resources of the real or virtual hardware.
Part six contains chapters that describe device drivers and features in support of
z/VM virtual server integration.
Part seven contains chapters about device drivers and features that support
security aspects of SUSE Linux Enterprise Server 12 SP2 for z Systems.
Part nine contains chapters about device drivers and features that are used in the
context of diagnostics and problem solving.
The following general assumptions are made about your background knowledge:
v You have an understanding of basic computer architecture, operating systems,
and programs.
v You have an understanding of Linux and z Systems terminology.
v You are familiar with Linux device driver software.
v You are familiar with the z Systems devices attached to your system.
Authority
Most of the tasks described in this document require a user with root authority. In
particular, writing to procfs, and writing to most of the described sysfs attributes
requires root authority.
Terminology
In this publication, the term booting is used for running boot loader code that loads
the Linux operating system. IPL is used for issuing an IPL command to load boot
loader code or a stand-alone dump utility. See also IPL and booting on page 53.
debugfs
This document assumes that debugfs has been mounted at /sys/kernel/debug.
Number prefixes
In this publication, KB means 1024 bytes, MB means 1,048,576 bytes, and GB
means 1,073,741,824 bytes.
Hexadecimal numbers
Mainframe publications and Linux publications tend to use different styles for
writing hexadecimal numbers. Thirty-one, for example, would typically read X'1F'
in a mainframe publication and 0x1f in a Linux publication.
Because the Linux style is required in many commands and is also used in some
code samples, the Linux style is used throughout this publication.
Highlighting
This publication uses the following highlighting styles:
v Paths and URLs are highlighted in monospace.
v Variables are highlighted in <italics within angled brackets>.
v Commands in text are highlighted in monospace bold.
v Input and output as normally seen on a computer screen is shown
within a screen frame.
Prompts are shown as hash signs:
#
This information at an overview level describes concepts that apply across different
device drivers and kernel features.
Newest version
You can find the newest version of this publication on IBM Knowledge Center at
www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_suse.html
Some major numbers are reserved for particular device drivers. Other device nodes
are dynamically assigned to a device driver when Linux boots. For example, major
number 94 is always the major number for DASD devices while the device driver
for channel-attached tape devices has no fixed major number. A major number can
also be shared by multiple device drivers. See /proc/devices to find out how
major numbers are assigned on a running Linux instance.
The device driver uses the minor number <minor> to distinguish individual
physical or logical devices. For example, the DASD device driver assigns four
minor numbers to each DASD: one to the DASD as a whole and the other three for
up to three partitions.
User space programs access character and block devices through device nodes also
referred to as device special files. When a device node is created, it is associated with
a major and minor number (see Figure 2).
SUSE Linux Enterprise Server 12 SP2 uses udev to create device nodes for you.
Standard device nodes match the device name that is used by the kernel, but
Network interfaces
The Linux kernel representation of a network device is an interface.
Figure 3. Interfaces
Interface names
The interface names are assigned by the Linux network stack.
Interface names are of the form <base_name><n> where <base_name> is a base name
that is used for a particular interface type. <n> is an index number that identifies
an individual interface of a particular type.
Table 1 summarizes the base names that are used for the network device drivers
for interfaces that are associated with real hardware.
Table 1. Interface base names for real devices.
This table lists interface type and applicable device driver for the available base names.
Base name Interface type Device driver Hardware
module
eth Ethernet qeth, lcs OSA-Express features
eth Ethernet mlx4_en RoCE Express feature
This table is intended as an overview only. For details about which version of a
particular hardware is supported by a device driver, see the applicable section
about the device driver.
Table 2 on page 5 summarizes the base names that are used for the network device
drivers for interfaces that are associated with virtual hardware:
This table lists interface type and applicable device driver for the available base names.
Base name Interface type Device driver Comment
module
hsi HiperSockets , virtual qeth Real HiperSockets or
NIC virtual NIC type
HiperSockets coupled
to a guest LAN
eth virtual NIC qeth QDIO virtual NIC
coupled to a guest
LAN or virtual
switch
When the first device for a particular interface name is set online, it is assigned the
index number 0, the second is assigned 1, the third 2, and so on. For example, the
first HiperSockets interface is named hsi0, the second hsi1, the third hsi2, and so
on.
When a network device is set offline, it retains its interface name. When a device is
removed, it surrenders its interface name and the name can be reassigned as
network devices are defined in the future. When an interface is defined, the Linux
kernel always assigns the interface name with the lowest free index number for the
particular type. For example, if the network device with an associated interface
name hsi1 is removed while the devices for hsi0 and hsi2 are retained, the next
HiperSockets interface to be defined becomes hsi1.
SUSE Linux Enterprise Server 12 SP2 uses udev to track the network interface
name and preserves the mapping of interface names to network devices across
IPLs.
How you can keep track of the mapping yourself differs depending on the
network device driver. For qeth, you can use the lsqeth command (see lsqeth -
List qeth-based network devices on page 591) to obtain a mapping.
After setting a device online, read /var/log/messages or issue dmesg to find the
associated interface name in the messages that are issued in response to the device
being set online.
For each network device that is online, there is a symbolic link of the form
/sys/class/net/<interface>/device where <interface> is the interface name. This
link points to a sysfs directory that represents the corresponding network device.
You can read this symbolic link with readlink to confirm that an interface name
corresponds to a particular network device.
| To configure a network device, use tools provided with SUSE Linux Enterprise
| Server 12 SP2. See SUSE Linux Enterprise Server 12 SP2 Administration Guide.
Device categories
There are several Linux on z Systems specific device categories in the /sys/devices
directory.
Figure 4. sysfs
The following sections provide more details about devices and their representation
in sysfs.
Device directories
Each device that is known to Linux is represented by a directory in sysfs.
For CCW and CCW group devices the name of the directory is a bus ID that
identifies the device within the scope of a Linux instance. For a CCW device, the
bus ID is the device's device number with a leading 0.<n>., where <n> is the
subchannel set ID. For example, 0.1.0ab1.
CCW group devices are associated with multiple device numbers. For CCW group
devices, the bus ID is the primary device number with a leading 0.<n>., where
<n> is the subchannel set ID.
Device views in sysfs on page 11 tells you where you can find the device
directories with their attributes in sysfs.
Device attributes
The device directories contain attributes. You control a device by writing values to
its attributes.
Some attributes are common to all devices in a device category, other attributes are
specific to a particular device driver. The following attributes are common to all
CCW devices:
online
You use this attribute to set the device online or offline. To set a device online,
write the value 1 to its online attribute. To set a device offline, write the value
0 to its online attribute.
cutype
specifies the control unit type and model, if applicable. This attribute is
read-only.
cmb_enable
enables I/O data collection for the device. See Enabling, resetting, and
switching off data collection on page 456 for details.
devtype
specifies the device type and model, if applicable. This attribute is read-only.
availability
indicates whether the device can be used. The following values are possible:
good
This is the normal state. The device can be used.
boxed
The device is locked by another operating system instance and cannot be
used until the lock is surrendered or the DASD is accessed by force (see
Accessing DASD by force on page 125).
or
ccw:t<cu_type>m<cu_model>dt<dev_type>dm<dev_model>
Setting attributes
Directly write to attributes or, for CCW devices, use the chccwdev command to set
attribute values.
Procedure
v You can set a writable attribute by writing the designated value to the
corresponding attribute file.
v For CCW devices, you can also use the chccwdev command (see chccwdev - Set
CCW device attributes on page 492) to set attributes.
With a single chccwdev command you can:
Set an attribute for multiple devices
Set multiple attributes for a device, including setting the device online
Set multiple attributes for multiple devices
Procedure
Use the following steps before you work with a newly available device to avoid
such errors:
1. Attach the device, for example, with a z/VM CP ATTACH command.
2. Assure that the sysfs structures for the new device are complete.
This command returns control after all pending updates to sysfs are complete.
Tip: For CCW devices you can omit this step if you then use chccwdev (see
chccwdev - Set CCW device attributes on page 492) to work with the devices.
chccwdev triggers cio_settle for you and waits for cio_settle to complete.
Results
You can now work with the new device, For example, you can set the device
online or set attributes for the device.
Many paths in sysfs contain device bus-IDs to identify devices. Device bus-IDs of
subchannel-attached devices are of the form:
0.<n>.<devno>
where <n> is the subchannel set-ID and <devno> is the device number.
where:
<bus> is the device category, for example, ccw or ccwgroup.
<driver>
is a name that specifies an individual device driver or the device driver
component that controls the device (see Table 3 on page 8).
<device_bus_id>
identifies an individual device (see Device directories on page 9).
Examples
v This example shows the path for an ECKD type DASD device:
/sys/bus/ccw/drivers/dasd-eckd/0.0.b100
v This example shows the path for a qeth device:
/sys/bus/ccwgroup/drivers/qeth/0.0.a100
The device category view does not sort the devices according to their device
drivers. All devices of the same category are contained in a single directory. The
device category view is of the form:
/sys/bus/<bus>/devices/<device_bus_id>
where:
<bus> is the device category, for example, ccw or ccwgroup.
<device_bus_id>
identifies an individual device (see Device directories on page 9).
Examples
v This example shows the path for a CCW device.
/sys/bus/ccw/devices/0.0.b100
v This example shows the path for a CCW group device.
/sys/bus/ccwgroup/devices/0.0.a100
v This example shows the path for a cryptographic device:
/sys/bus/ap/devices/card3b
Device view
This view sorts devices according to their device drivers, but independent from the
device category. It also includes logical devices that are not categorized.
where:
<driver>
is a name that specifies an individual device driver or the device driver
component that controls the device.
<device>
identifies an individual device. The name of this directory can be a device
bus-ID or the name of a DCSS or IUCV device.
Examples
v This example shows the path for a qeth device.
/sys/devices/qeth/0.0.a100
v This example shows the path for a DCSS block device.
/sys/devices/dcssblk/mydcss
where:
<subchannel>
is a subchannel number with a leading 0.<n>., where <n> is the
subchannel set ID.
I/O subchannels show the devices in relation to their respective subchannel sets
and subchannels. An I/O subchannel is of the form:
/sys/devices/css0/<subchannel>/<device_bus_id>
where:
<subchannel>
is a subchannel number with a leading 0.<n>., where <n> is the
subchannel set ID.
<device_bus_id>
is a device number with a leading 0.<n>., where <n> is the subchannel
set ID (see Device directories on page 9).
Examples
v This example shows a CCW device with device number 0xb100 that is associated
with a subchannel 0x0001.
/sys/devices/css0/0.0.0001/0.0.b100
v This example shows a CCW device with device number 0xb200 that is associated
with a subchannel 0x0001 in subchannel set 1.
/sys/devices/css0/0.1.0001/0.1.b200
v The entries for a group device show as separate subchannels. If a CCW group
device uses three subchannels 0x0002, 0x0003, and 0x0004 the subchannel
information could be:
/sys/devices/css0/0.0.0002/0.0.a100
/sys/devices/css0/0.0.0003/0.0.a101
/sys/devices/css0/0.0.0004/0.0.a102
Each subchannel is associated with a device number. Only the primary device
number is used for the bus ID of the device in the device driver view and the
device view.
v This example lists the information available for a non-I/O subchannel with
which no device is associated:
ls /sys/devices/css0/0.0.ff00/
bus driver modalias subsystem type uevent
Subchannel attributes
There are sysfs attributes that represent subchannel properties, including common
attributes and information specific to the subchannel type.
These two attributes are the only ones that are always present. Some subchannels,
like I/O subchannels, might contain devices and further attributes.
Apart from the bus ID of the attached device, I/O subchannel directories typically
contain these attributes:
chpids
is a list of the channel-path identifiers (CHPIDs) through with the device is
connected. See also Channel path ID information on page 15.
pimpampom
provides the path installed, path available, and path operational masks. See
z/Architecture Principles of Operation, SA22-7832 for details about the masks.
/sys/devices/css0/cm_enable
With the cm_enable attribute you can enable and disable the extended channel-path
measurement facility. It can take the following values:
0 Deactivates the measurement facility and remove the measurement-related
attributes for the channel paths. No action if measurements are not active.
1 Attempts to activate the measurement facility and create the
measurement-related attributes for the channel paths. No action if
measurements are already active.
Two sysfs attributes are added for each channel path object:
cmg Specifies the channel measurement group or unknown if no characteristics
are available.
shared
Specifies whether the channel path is shared between LPARs or unknown
if no characteristics are available.
If measurements are active, two more sysfs attributes are created for each channel
path object:
measurement
A binary sysfs attribute that contains the extended channel-path
measurement data for the channel path. It consists of eight 32-bit values
and must always be read in its entirety, or 0 will be returned.
measurement_chars
A binary sysfs attribute that is either empty, or contains the channel
measurement group dependent characteristics for the channel path, if the
channel measurement group is 2 or 3. If not empty, it consists of five 32-bit
values.
Example: /sys/devices/css0/chp0.4a
When a CHPID has been set logically offline from a particular Linux instance, the
CHPID is, in effect, offline for this Linux instance. A CHPID that is shared by
multiple operating system instances can be logically online to some instances and
offline to others. A CHPID can also be logically online to Linux while it has been
varied off at the SE.
Procedure
To set a CHPID logically online, set its status attribute to online by writing the
value on to it. To set a CHPID logically offline, set its status attribute to offline
by writing off to it.
where:
<CHPID>
is a two digit hexadecimal CHPID.
<value>
is either on or off.
v To read the status attribute to confirm that the CHPID is logically offline issue:
# cat /sys/devices/css0/chp0.4a/status
offline
v To read the status attribute to confirm that the CHPID is logically online issue:
# cat /sys/devices/css0/chp0.4a/status
online
Procedure
To configure a CHPID, set its configure attribute by writing the value 1 to it. To
deconfigure a CHPID, set its configure attribute by writing 0 to it.
where:
<CHPID>
is a two digit hexadecimal CHPID.
<value>
is either 1 or 0.
To query and set the configure value using commands, see chchp - Change
channel path status on page 494 and lschp - List channel paths on page 575.
Examples
v To set a channel path with the ID 0x40 to standby issue:
# echo 0 > /sys/devices/css0/chp0.40/configure
Procedure
v Find the channel-ID related files for the CHPID. These sysfs files are located
under /sys/devices/css0/chp0.<num>, where <num> is the two-digit, lowercase,
hexadecimal CHPID number. There are two attribute files:
chid The channel ID number.
chid_external
A flag that indicates whether this CHPID is associated with an internal
channel ID (value 0) or a physical channel ID (value 1).
The sysfs attribute files are created only when channel ID information is
available to Linux. For Linux on z/VM, the availability of this information
depends on the z/VM version and configuration. For Linux in LPAR mode, this
information is always available.
Example
Alternatively, read the chid and chid_external sysfs attributes, for example for
CHPID 30:
# cat /sys/devices/css0/chp0.30/chid
0390
# cat /sys/devices/css0/chp0.30/chid_external
1
PCIe functions are seen by Linux as devices, hence devices is used here
synonymously. You can assign PCIe devices to LPARs in the IOCDS.
PCIe devices are automatically configured during the system boot process. In
contrast to most z Systems devices, all PCIe devices that are in a configured state
are automatically set online. PCIe devices that are in stand-by state are not
automatically enabled.
Scanning of PCIe devices is enabled by default. To disable use of PCI devices, set
the kernel command line parameter pci=off.
pci=on
pci=off
where:
off
disables automatic scanning of PCIe devices.
on enables automatic scanning of PCIe devices (default).
Example
Only one LPAR can access a PCIe device. Other LPARs can be candidates for
access. Use the HMC or SE to define which LPAR is connected and which LPARs
are on the candidate list. A PCIe device that is defined, but not yet used, is shown
as a PCIe slot in Linux.
On Linux, you use the power sysfs attribute of a PCIe slot to connect the device to
the LPAR where Linux runs. While a PCIe device is connected to one LPAR, it is in
the reserved state for all other LPARs that are in the candidates list. A reserved
PCIe device is invisible to the operating system. The slot is removed from sysfs.
Procedure
where 00000011 is the slot. Alternatively, you can use the lspci -v command to
find the slot.
2. Write the value that you want to the power attribute:
v Write 1 to power to connect the PCIe device to the LPAR in which your Linux
instance is running. Linux automatically scans the device, registers it, and
brings it online. For example:
echo 1 > /sys/bus/pci/slots/00000011/power
A message is displayed when a PCIe device enters the error state. It is not possible
to automatically relieve the PCIe device from this state.
Procedure
1. Find the PCIe device directory in sysfs. PCIe device directories are of the form
/sys/devices/pci<dev> where <dev> is the device ID. For example:
/sys/devices/pci0000:00/0000:00:00.0/.
2. Write 1 to the recover attribute of the PCIe device. For example:
# echo 1 > /sys/devices/pci0000:00/0000:00:00.0/recover
| All PCIe devices collect measurement data by default. You can read the data in a
| sysfs attribute file in the debug file system, by default mounted at
| /sys/kernel/debug.
| You can turn data collection on and off. To switch off measurement data collecting
| for the current session, write "0" to the statistics attribute. To enable data
| collection again, write "1" to the statistics attribute.
| Example
Use kernel parameters to configure the base kernel and any optional kernel parts
that have been compiled into the kernel image. Use module parameters to configure
separate kernel modules. Do not confuse kernel and module parameters. Although
a module parameter can have the same syntax as a related kernel parameter,
kernel and module parameters are specified and processed differently.
Kernel parameters
Use kernel parameters to configure the base kernel and all modules that have been
compiled into the kernel.
Where possible, this document describes kernel parameters with the device driver
or feature to which they apply. Kernel parameters that apply to the base kernel or
cannot be attributed to a particular device driver or feature are described in
Chapter 54, Selected kernel parameters, on page 669. You can also find
descriptions for most of the kernel parameters in Documentation/kernel-
parameters.txt in the Linux source tree.
This section applies to all interfaces for specifying kernel parameters, except the
kernel parameter file that you can use when booting from the z/VM reader.
During the boot process, first the auxiliary kernel and GRUB 2 are started.
GRUB 2 then proceeds to start the target SUSE Linux Enterprise Server 12 SP2
kernel (see Figure 13 on page 53).
The auxiliary kernel and the target SUSE Linux Enterprise Server 12 SP2 kernel use
the same set of kernel parameters. Be cautious when making changes to the
parameters in the boot configuration.
v New or changed parameters might adversely affect the auxiliary kernel.
v Replacing the entire kernel parameter line eliminates parameters that are
required by the auxiliary kernel.
See SUSE Linux Enterprise Server 12 SP2 Administration Guide about how to specify
kernel parameters with GRUB 2.
Note:
v Kernel parameters that you add when booting Linux are not persistent. Such
parameters enter the default reboot configuration, but are omitted after a regular
shutdown. To define a permanent set of kernel parameters for a Linux instance,
include these parameters in the boot configuration.
v Kernel parameters that you add when booting might interfere with parameters
that SUSE Linux Enterprise Server 12 SP2 sets for you. Read /proc/cmdline to
find out which parameters were used to start a running Linux instance.
Important: The preferred method for specifying kernel parameters when booting is
through the GRUB 2 interactive boot menu.
You might be able to use one or more of these interfaces for specifying kernel
parameters:
z/VM guest virtual machine with a CCW boot device
When booting Linux in a z/VM guest virtual machine from a CCW boot
device, you can use the PARM parameter of the IPL command to specify
kernel parameters. CCW boot devices include DASD and the z/VM reader.
For details, see the subsection of Booting Linux in a z/VM guest virtual
machine on page 56 that applies to your boot device.
z/VM guest virtual machine with a SCSI boot device
When booting Linux in a z/VM guest virtual machine from a SCSI boot
device, you can use the SET LOADDEV command with the SCPDATA
option to specify kernel parameters. See Booting from a SCSI device on
page 57 for details.
LPAR mode with a SCSI boot device
When booting Linux in LPAR mode from a SCSI boot device, you can
specify kernel parameters in the Operating system specific load
parameters field on the HMC Load panel. See Figure 17 on page 64.
In total, the combined kernel parameter string that is passed to the Linux kernel
for booting can be up to 4096 characters.
For some kernel parameters, multiple instances in the kernel parameter string are
treated cumulatively. For example, multiple specifications for cio_ignore= are all
processed and combined.
If the kernel parameter string contains kernel parameters with mutually exclusive
settings, the last specification in the string overrides preceding ones. Thus, you can
specify a kernel parameter when booting to override an unwanted setting in the
boot configuration.
Examples:
v If the kernel parameters in your boot configuration include possible_cpus=8 but
you specify possible_cpus=2 when booting, Linux uses possible_cpus=2.
v If the kernel parameters in your boot configuration include resume=/dev/dasda2
to specify a disk from which to resume the Linux instance when it has been
suspended, you can circumvent the resume process by specifying noresume when
booting.
Parameters on the kernel parameter string that the kernel does not recognize as
kernel parameters are ignored by the kernel and made available to user space
programs. How multiple specifications and conflicts are resolved for such
parameters depends on the program that evaluates them.
See Booting from the z/VM reader on page 59 about using a kernel parameter
file in the z/VM reader.
See Chapter 54, Selected kernel parameters, on page 669 for more examples of
kernel parameters.
Apart from kernel parameters, which are evaluated by the Linux kernel, the kernel
parameter line can contain parameters that are evaluated by user space programs,
for example, modprobe.
See also Displaying current IPL parameters on page 68 about displaying the
parameters that were used to IPL and boot the running Linux instance.
Example:
# cat /proc/cmdline
root=UUID=93722c3c-85ed-4537-ac68-8528a5bdef0c hvc_iucv=8 TERM=dumb OsaMedium=eth crashkernel=204M-:102M
By default, Linux uses the current kernel parameters for rebooting. See Rebooting
from an alternative source on page 70 about setting up Linux to use different
kernel parameters for re-IPL and the associated reboot.
Module parameters
Use module parameters to configure kernel modules that are compiled as separate
modules that can be loaded by the kernel.
Separate kernel modules must be loaded before they can be used. Many modules
are loaded automatically by SUSE Linux Enterprise Server 12 SP2 when they are
needed and you use YaST to specify the module parameters.
To keep the module parameters in the context of the device driver or feature
module to which they apply, this information describes module parameters as part
of the syntax you would use to load the module with modprobe.
To find the separate kernel modules for SUSE Linux Enterprise Server 12 SP2, list
the contents of the subdirectories of /lib/modules/<kernel-release> in the Linux
file system. In the path, <kernel-release> denotes the kernel level. You can query
the value for <kernel-release> with uname -r.
YaST is the preferred tool for specifying module parameters for SUSE Linux
Enterprise Server 12 SP2. You can use alternative means to specify module
parameters, for example, if a particular setting is not supported by YaST. Avoid
specifying the same parameter through multiple means.
Module parameters that are specified as arguments to modprobe are effective only
until the module is unloaded.
Note: Parameters that you specify as command arguments might interfere with
parameters that SUSE Linux Enterprise Server 12 SP2 sets for you.
One of these programs is modprobe, which SUSE Linux Enterprise Server 12 SP2
uses to load modules for you. modprobe interprets module parameters that are
specified on the kernel parameter line if they are qualified with a leading module
prefix and a dot.
For example, you can include a specification with cmm.sender=TESTID on the kernel
parameter line. modprobe evaluates this specification as the sender= module
parameter when it loads the cmm module.
Procedure
Perform these steps to provide module parameters for modules that are included
in the initial RAM disk:
1. Make your configuration changes with YaST or an alternative method.
2. If YaST does not perform this task for you, run dracut -f to create an initial
RAM disk that includes the module parameters.
The parameters for modules are available as sysfs attributes of the form:
/sys/module/<module_name>/parameters/<parameter_name>
You can display information about modules that fulfill these prerequisites:
v The module must be loaded.
v The module must export the parameters to sysfs.
Procedure
To find and display the parameters for a module, follow these steps:
1. Optional: Confirm that the module of interest is loaded by issuing a command
of this form:
# lsmod | grep <module_name>
4. If the previous command listed parameters, you can display the value for the
parameter you are interested in. Issue a command of the form:
# cat /sys/module/<module_name>/parameters/<parameter_name>
Example
v To list the module parameters for the ap module, issue:
# ls /sys/module/ap/parameters
domain
...
These device drivers and features are useful for booting and shutting down SUSE
Linux Enterprise Server 12 SP2.
Newest version
You can find the newest version of this publication on IBM Knowledge Center at
www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_suse.html
Restrictions
The only interface to a Linux instance in an LPAR before the boot process is
completed is the Hardware Management Console (HMC), see Figure 6. After the
boot process has completed, you typically use a network connection to access
Linux through a user login, for example, in an ssh session. The possible
connections depend on the configuration of your particular Linux instance.
Selected
mainframe system
Selected LPAR
Operating System Messages
With Linux on z/VM, you typically use a 3270 terminal or terminal emulator to
log in to z/VM first. From the 3270 terminal, you IPL the Linux boot device.
Again, after boot you typically use a network connection to access Linux through a
user login rather than a 3270 terminal.
These HMC applets are accessed through the service-call logical processor
(SCLP) console interface.
3270 terminal
This terminal can be based on physical 3270 terminal hardware or a 3270
terminal emulation.
z/VM can use the 3270 terminal as a 3270 device or perform a protocol
translation and use it as a 3215 device. As a 3215 device it is a line-mode
terminal for the United States code page (037).
The iucvconn program
You can use the iucvconn program from Linux on z/VM to access terminal
devices on other Linux instances that run as guests of the same z/VM
system.
See How to Set up a Terminal Server Environment on z/VM, SC34-2596 for
information about the iucvconn program.
The console device drivers support these terminals as output devices for Linux
kernel messages.
Figure 7. Linux kernel messages on the HMC Operating System Messages applet
Console terminology
Terminal and console have special meanings in Linux.
Linux terminal
An input/output device through which users interact with Linux and
Linux applications. Login programs and shells typically run on Linux
terminals and provide access to the Linux system.
Linux console
An output-only device to which the Linux kernel can write kernel
messages. Linux console devices can be associated with Linux terminal
devices. Thus, console output can be displayed on a Linux terminal.
Mainframe terminal
Any device that gives a user access to operating systems and applications
that run on a mainframe. A mainframe terminal can be a physical device
such as a 3270 terminal hardware that is linked to the mainframe through
a controller. It can also be a terminal emulator on a workstation that is
connected through a network. For example, you access z/OS through a
mainframe terminal.
Hardware Management Console (HMC)
A device that gives a system programmer control over z Systems hardware
resources, for example, LPARs. The HMC is a web application on a web
server that is connected to the support element (SE). The HMC can be
accessed from the SE but more commonly is accessed from a workstation
within a secure network.
On the mainframe, the Linux console and Linux terminals can both be connected
to a mainframe terminal.
Depending on your setup, a zipl boot menu, a GRUB 2 boot menu, or both might
be displayed when you perform an IPL.
zipl boot menu
The zipl boot menu is part of the boot loader for the auxiliary kernel that
provides GRUB 2 and is displayed before a Linux terminal is set up.
GRUB 2 boot menu
GRUB 2 might display a menu for selecting the target kernel to be booted.
For more information about GRUB 2, see SUSE Linux Enterprise Server 12
SP2 Administration Guide.
Table 5 on page 34 lists the terminal device drivers with the corresponding device
names and console names.
As shown in Table 5, the console with name ttyS0 can be provided either by the
SCLP console device driver or by the 3215 line-mode terminal device driver. The
system environment and settings determine which device driver provides ttyS0.
For details, see the information about the conmode kernel parameter in Console
kernel parameter syntax on page 38.
Of the terminal devices that are provided by the z/VM IUCV HVC device driver
only hvc0 is associated with a console.
Device nodes
Applications, for example, login programs, access terminal devices by device
nodes.
For example, with the default conmode settings, udev creates the following device
nodes:
Table 6. Device nodes created by udev
Device driver On LPAR On z/VM
SCLP line-mode terminal device driver /dev/sclp_line0 n/a
SCLP VT220 terminal device driver /dev/ttysclp0 /dev/ttysclp0
3215 line-mode terminal device driver n/a /dev/ttyS0
3270 terminal device driver /dev/3270/tty1 to /dev/3270/tty1 to
/dev/3270/tty<N> /dev/3270/tty<N>
z/VM IUCV HVC device driver n/a /dev/hvc0 to /dev/hvc7
Terminal modes
The Linux terminals that are provided by the console device drivers include
line-mode terminals, block-mode terminals, and full-screen mode terminals.
On a full-screen mode terminal, pressing any key immediately results in data being
sent to the terminal. Also, terminal output can be positioned anywhere on the
screen. This feature facilitates advanced interactive capability for terminal-based
applications like the vi editor.
On a line-mode terminal, the user first types a full line, and then presses Enter to
indicate that the line is complete. The device driver then issues a read to get the
completed line, adds a new line, and hands over the input to the generic TTY
routines.
The 3270 terminal device driver provides three different views. See Switching the
views of the 3270 terminal device driver on page 45 for details.
The diagrams in the following sections omit device drivers that are not relevant for
the particular access scenario.
Network
HMC Linux
Operating System SCLP line-mode
ttyS0 terminal
Workstation Messages device driver
While the ASCII system console is attached to the z/VM guest virtual machine
where the Linux instance runs, you can access the ttyS1 terminal device from the
HMC Integrated ASCII Console applet.
Workstation
Browser
Network
HMC z/VM
Operating System Linux
Messages
ATTACH SYSASCII
Integrated ttyS1 SCLP VT220
ASCII Console terminal device driver
Figure 9. Accessing terminal devices from the HMC for Linux on z/VM
Use the CP ATTACH SYSASCII command to attach the ASCII system console to
your z/VM guest virtual machine.
z/VM
Network Linux
protocol
Workstation
3215
3270 terminal
3270
Note: Figure 10 shows two console devices with the name ttyS0. Only one of these
devices can be present at any one time.
The terminal device drivers continue to support 3270 terminal hardware, which, if
available at your installation, can be used instead of a 3270 terminal emulation.
z/VM
Network
Linux Linux
shell
z/VM IUCV HVC device driver
Workstation hvc7
Terminal iucvconn hvc1
session hvc0
IUCV
As illustrated in Figure 11, you access the devices with the iucvconn program from
another Linux instance. Both Linux instances are guests of the same z/VM system.
IUCV provides the communication between the two Linux instances. With this
setup, you can access terminal devices on Linux instances with no external
network connection.
Note: Of the terminal devices that are provided by the z/VM IUCV HVC device
driver only hvc0 can be activated to receive Linux kernel messages.
console=<console_name>
conmode= hwc
sclp
3215
3270
sclp_con_drop=0 sclp_con_pages=6
sclp_con_drop=1 sclp_con_pages=<n>
hvc_iucv=1
hvc_iucv=<number_of_devices> ,
Note: If you specify both the conmode= and the console= parameter, specify them
in the sequence that is shown, conmode= first.
where:
conmode
specifies which one of the line-mode or block-mode terminal devices is present
and provided by which device driver.
A Linux kernel might include multiple console device drivers that can provide
a line-mode terminal:
v SCLP line-mode terminal device driver
v 3215 line-mode terminal device driver
v 3270 terminal device driver
On a running Linux instance, only one of these device drivers can provide a
device. Table 8 shows how the device driver that is used by default depends
on the environment.
Table 8. Default device driver for the line-mode terminal device
Mode Default
LPAR SCLP line-mode terminal device driver
You can use the sclp_con_pages= parameter to set the number of output
buffers.
sclp_con_pages=<n>
specifies the number of 4-KB memory pages to be used as the output buffer for
the SCLP line-mode and VT220 terminals. Depending on the line length, each
output buffer can hold multiple lines. Use many buffer pages for a kernel with
frequent phases of producing console output faster than it can be written to the
output device.
Depending on the setting for the sclp_con_drop=, running out of pages can
slow down Linux or cause it to lose console output.
The value is a positive integer. The default is 6.
hvc_iucv=<number_of_devices>
specifies the number of terminal devices that are provided by the z/VM IUCV
HVC device driver. <number_of_devices> is an integer in the range 0 - 8. Specify
0 to switch off the z/VM IUCV HVC device driver.
hvc_iucv_allow=<z/VM user ID>,<z/VM user ID>, ...
specifies an initial list of z/VM guest virtual machines that are allowed to
connect to HVC terminal devices. If this parameter is omitted, any z/VM guest
virtual machine that is authorized to establish the required IUCV connection is
also allowed to connect. On the running system, you can change this list with
the chiucvallow command. See How to Set up a Terminal Server Environment on
z/VM, SC34-2596 for more information.
Examples
v To activate ttyS1 in addition to ttyS0, and to use ttyS1 as the preferred console,
add the following specification to the kernel command line:
console=ttyS1
v To activate ttyS1 in addition to ttyS0, and to keep ttyS0 as the preferred
console, add the following specification to the kernel command line:
console=ttyS1 console=ttyS0
v To use an emulated HMC Operating System Messages applet in a z/VM
environment specify:
conmode=sclp
v To activate hvc0 in addition to ttyS0, use hvc0 as the preferred console,
configure the z/VM IUCV HVC device driver to provide four devices, and limit
the z/VM guest virtual machines that can connect to HVC terminal devices to
lxtserv1 and lxtserv2, add the following specification to the kernel command
line:
console=hvc0 hvc_iucv=4 hvc_iucv_allow=lxtserv1,lxtserv2
v The following specification selects the SCLP line-mode terminal and configures
32 4-KB pages (128 KB) for the output buffer. If buffer pages run out, the SCLP
line-mode terminal device driver does not wait for pages to be written to an
output device. Instead of pausing, it reuses output buffer pages at the expense of
losing content.
console=sclp sclp_con_pages=32 sclp_con_drop=1
See Setting up your z/VM guest virtual machine for IUCV on page 316 for
details about setting up the z/VM guest virtual machine.
For information about accessing Linux through the iucvtty program rather than
through the z/VM IUCV HVC device driver, see How to Set up a Terminal Server
Environment on z/VM, SC34-2596 or the man pages for the iucvtty and iucvconn
commands.
The preferred user access to a running SUSE Linux Enterprise Server 12 SP2
instance is through a user login that runs, for example, in an ssh session. See
Terminal modes on page 34 for information about the available line-mode
terminals.
Tip: If the terminal does not provide the expected output, ensure that dumb is
assigned to the TERM environment variable. For example, enter the following
command on the bash shell:
# export TERM=dumb
See Terminal modes on page 34 for information about the available full-screen
mode terminals.
Tip: If the terminal does not provide the expected output, ensure that linux is
assigned to the TERM environment variable. For example, enter the following
command on the bash shell:
# export TERM=linux
The terminal provides limited support for full-screen applications. For example, the
ned editor is supported, but not vi.
Tip: If the terminal does not provide the expected output, ensure that linux is
assigned to the TERM environment variable. For example, enter the following
command on the bash shell:
# export TERM=linux
You must explicitly enable user logins for the HVC terminals hvc1 to hvc7 and for
any dynamically attached virtual or real 3270 terminals. On other terminals that
are, typically, available in your environment, including hvc0 and 3270/tty1,
systemd automatically enables user logins for you.
Procedure
Perform these steps to use a getty service for enabling user logins on any
dynamically added real or virtual 3270 terminals.
1. Enable the new getty service by issuing a command of this form:
# systemctl enable serial-getty@<terminal>.service
Results
At the next system start, systemd automatically starts the getty service for you.
Example
If user logins are enabled on unavailable HVC terminals hvc1 to hvc7, systemd
might keep respawning the getty program. To be free to change the conditions that
affect the availability of these terminals, use the ttyrun service to enable user logins
for them. HVC terminals are operational only in a z/VM environment, and they
depend on the hvc_iucv= kernel parameter (see Console kernel parameter syntax
on page 38).
Procedure
Perform these steps to use a ttyrun service for enabling user logins on a terminal:
1. Enable the ttyrun service by issuing a command of this form:
# systemctl enable ttyrun-getty@hvc<n>.service
Results
At the next system start, systemd starts the ttyrun service for hvc<n>. The ttyrun
service starts a getty only if this terminal is available.
Example
The following statements apply to both the line-mode terminal and the full-screen
mode terminal on the HMC:
v On an HMC, you can open each applet only once.
v Within an LPAR, there can be only one active terminal session for each applet,
even if multiple HMCs are used.
v A particular Linux instance supports only one active terminal session for each
applet.
v Security hint: Always end a terminal session by explicitly logging off (for
example, type exit and press Enter). Simply closing the applet leaves the
session active and the next user to open the applet resumes the existing session
without a logon.
v Slow performance of the HMC is often due to a busy console or increased
network traffic.
For information about accessing terminal devices that are provided by the iucvtty
program see How to Set up a Terminal Server Environment on z/VM, SC34-2596.
You access HVC terminal devices from a Linux instance where the iucvconn
program is installed. The Linux instance with the terminal device to be accessed
and the Linux instance with the iucvconn program must both run as guests of the
same z/VM system. The two guest virtual machines must be configured such that
IUCV communication is permitted between them.
Procedure
Perform these steps to access an HVC terminal device over z/VM IUCV:
1. Open a terminal session on the Linux instance where the iucvconn program is
installed.
2. Enter a command of this form:
# iucvconn <guest_ID> <terminal_ID>
where:
Example: To access HVC terminal device hvc0 on a Linux instance that runs on
a z/VM guest virtual machine LXGUEST1, enter:
# iucvconn LXGUEST1 lnxhvc0
For more details and further parameters of the iucvconn command, see the
iucvconn man page or How to Set up a Terminal Server Environment on z/VM,
SC34-2596.
3. Press Enter to obtain a prompt.
Output that is written by Linux while the terminal window is closed, is not
displayed. Therefore, a newly opened terminal window is always blank. For
most applications, like login or shell prompts, it is sufficient to press Enter to
obtain a new prompt.
Security hint
Always end terminal sessions by explicitly logging off (for example, type exit and
press Enter). If logging off results in a new login prompt, press Control and
Underscore (Ctrl+_), then press D to close the login window. Simply closing the
terminal window for a hvc0 terminal device that was activated for Linux kernel
messages leaves the device active. The terminal session can then be reopened
without a login.
Use function key 3 (PF3) to switch between the views (see Figure 12).
Linux kernel
messages
view
PF3
Full-screen Terminal I/O
application view
view
The Linux kernel messages view is available only if the terminal device is activated
for Linux kernel messages. The full-screen application view is available only if
there is an application that uses this view, for example, the ned editor.
For the Linux kernel messages view and the terminal I/O view, you can use the
PF7 key to scroll backward and the PF8 key to scroll forward. The scroll buffers are
fixed at four pages (16 KB) for the Linux kernel messages view and five pages
(20 KB) for the terminal I/O view. When the buffer is full and more terminal data
needs to be printed, the oldest lines are removed until there is enough room. The
number of lines in the history, therefore, vary. Scrolling in the full-screen
application view depends on the application.
You cannot issue z/VM CP commands from any of the three views that are
provided by the 3270 terminal device driver. If you want to issue CP commands,
use the PA1 key to switch to the CP READ mode.
This section applies to Linux on z/VM. A CCW terminal device can be:
v The tty3270 terminal device that can be activated for receiving Linux kernel
messages.
If this device exists, it comes online early during the Linux boot process. In a
default z/VM environment, the device number for this device is 0009. In sysfs, it
is represented as /sys/bus/ccw/drivers/3270/0.0.0009. You need not set this
device online and you must not set it offline.
v CCW terminal devices through which users can log in to Linux with the CP
DIAL command.
These devices are defined with the CP DEF GRAF command. They are
represented in sysfs as /sys/bus/ccw/drivers/3270/0.<n>.<devno> where <n> is
the subchannel set ID and <devno> is the virtual device number. By setting these
devices online, you enable them for user logins. If you set a device offline, it can
no longer be used for user login.
See z/VM CP Commands and Utilities Reference, SC24-6175 for more information
about the DEF GRAF and DIAL commands.
Procedure
You can use the chccwdev command (see chccwdev - Set CCW device attributes
on page 492) to set a CCW terminal device online or offline. Alternatively, you can
write 1 to the device's online attribute to set it online, or 0 to set it offline.
Examples
v To set a CCW terminal device 0.0.7b01 online, issue:
# chccwdev -e 0.0.7b01
Alternatively issue:
Alternatively issue:
# echo 0 > /sys/bus/ccw/drivers/3270/0.0.7b01/online
Also, pressing the Enter key adds a newline character to your input string. Some
applications do not tolerate such trailing newline characters.
Table 9 summarizes how to use the caret character (^) to enter some control
characters and to enter strings without appended newline characters.
Table 9. Control and special characters on line-mode terminals
For the key Enter Usage
combination
Ctrl+C ^c Cancel the process that is running in the foreground of the
terminal.
Ctrl+D ^d Generate an end of file (EOF) indication.
Ctrl+Z ^z Stop a process.
n/a ^n Suppresses the automatic generation of a new line. Thus,
you can enter single characters; for example, the characters
that are needed for yes/no answers in some utilities.
Note: For a 3215 line-mode terminal in 3215 mode, you must use United States
code page (037).
You can also call the magic sysrequest functions from the hvc0 terminal device if it
is present and is activated to receive Linux kernel messages. To call the magic
sysrequest functions from hvc0, enter the single character Ctrl+o followed by the
character for the particular function.
Note: In Table 10 Ctrl+o means pressing while holding down the control key.
Table 10 lists the main magic sysrequest functions that are known to work on
Linux on z Systems. For a more comprehensive list of functions, see
Documentation/sysrq.txt in the Linux source tree. Some of the listed functions
might not work on your system.
Procedure
Tip: You can use YaST to activate and deactivate the magic sysrequest function.
Go to yast -> system -> Kernel Settings, select or clear the enable SYSRQ option
and leave YaST with OK.
Example
The preferred terminal devices for Linux instances that run as z/VM guests are
provided by the 3215 or 3270 terminal device drivers.
The emulation requires a terminal device that is provided by the SCLP line-mode
terminal device driver. To use the emulation, you must override the default device
driver for z/VM environments (see Console kernel parameter syntax on page
38).
For the emulation, you use the z/VM CP VINPUT command instead of the
graphical user interface at the service element or HMC. Type any input to the
operating system with a leading CP VINPUT.
The examples in the sections that follow show the input line of a 3270 terminal or
terminal emulator (for example, x3270). Omit the leading #CP if you are in CP read
mode. For more information about VINPUT, see z/VM CP Commands and Utilities
Reference, SC24-6175.
Operating systems that accept this specification, process priority commands with a
higher priority than non-priority commands.
The hardware console driver can accept both if supported by the hardware console
within the specific machine or virtual machine.
Example
The specifications:
#CP VINPUT VMSG LS -L
are equivalent.
Case conversion
All lowercase characters are converted by z/VM to uppercase. To compensate for
this effect, the console device driver converts all input to lowercase.
For example, if you type VInput VMSG echo $PATH, the device driver gets ECHO
$PATH and converts it into echo $path.
Linux and bash are case-sensitive and require some specifications with uppercase
characters. To include uppercase characters in a command, use the percent sign (%)
as a delimiter. The console device driver interprets characters that are enclosed by
percent signs as uppercase.
Examples
In the following examples, the first line shows the user input. The second line
shows what the device driver receives after the case conversion by CP. The third
line shows the command that is processed by bash:
v
#cp vinput vmsg ls -l
CP VINPUT VMSG LS -L
ls -l
...
v The following input would result in a bash command that contains a variable
$path, which is not defined in lowercase:
#cp vinput vmsg echo $PATH
CP VINPUT VMSG ECHO $PATH
echo $path
...
To obtain the correct bash command enclose the uppercase string with the
conversion escape character:
#cp vinput vmsg echo $%PATH%
CP VINPUT VMSG ECHO $%PATH%
echo $PATH
...
For example, the following command passes a string in double quotation marks to
be echoed.
#cp vinput pvmsg echo ""here is ""$0
CP VINPUT PVMSG ECHO "HERE IS "$0
echo "here is "$0
here is -bash
If you are using the standard settings according to Using a 3270 terminal in 3215
mode, you must specify "# to pass # to Linux.
If you specify the end-of-line character without a leading escape character, z/VM
CP interprets it as an end-of-line character that ends the VINPUT command.
Example
In this example, a number sign is intended to mark the begin of a comment in the
bash command. This character is misinterpreted as the beginning of a second
command.
#cp vinput pvmsg echo ""%N%umber signs start bash comments"" #like this one
CP VINPUT PVMSG ECHO "%N%UMBER SIGNS START BASH COMMENTS"
LIKE THIS ONE
HCPCMD001E Unknown CP command: LIKE
...
The escape character prevents the number sign from being interpreted as an
end-of-line character.
#cp vinput pvmsg echo ""%N%umber signs start bash comments"" "#like this one
VINPUT PVMSG ECHO "%N%UMBER SIGNS START BASH COMMENTS" #LIKE THIS ONE
echo "Number signs start bash comments" #like this one
Number signs start bash comments
The default line-editing symbols depend on your terminal emulator. You can
reassign the symbols by changing the settings of LINEND, TABCHAR, CHARDEL, LINEDEL,
or ESCAPE with the CP TERMINAL command. Table 11 on page 52 shows the most
commonly used settings:
To enter a line-edit symbol, you must precede it with the escape character. In
particular, to enter the escape character, you must type it twice.
Examples
The following examples assume the settings of Table 11 with the opening bracket
character ([) as the delete line character.
v To specify a tab character, specify:
"|
v To specify a double quotation mark character, specify:
""
v If you type the character string:
#CP HALT#CP ZIPL 190[#CP IPL 1@290 PARM vmpoff=""MSG OP REBOOT"#IPL 290""
The boot loader for SUSE Linux Enterprise Server 12 SP2 is GRUB 2. Use GRUB 2
to prepare DASD and SCSI devices as IPL devices for booting Linux. For details
about GRUB 2, see SUSE Linux Enterprise Server 12 SP2 Administration Guide.
Figure 13 illustrates the main steps of booting SUSE Linux Enterprise Server 12
SP2.
(1) IPL: (2) Boot process 1: (3) Boot process 2: (4) Result:
firmware loads zipl boot loader GRUB 2 loads target kernel
zipl boot loads auxiliary target kernel gets control
loader code kernel
Figure 13. IPL and boot process
If your Linux instance is to run in LPAR mode, you can also use the HMC or the
service element (SE) to copy the Linux kernel to the mainframe memory (see
Loading Linux from removable media or from an FTP server on page 65).
Typically, this method applies to an initial installation of a Linux instance.
Apart from starting a boot process, an IPL can also start a dump process. See Using
the Dump Tools on SUSE Linux Enterprise Server 12 SP1, SC34-2746 for more
information about dumps.
You can find the newest version of this publication on IBM Knowledge Center at
www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_suse.html
If your Linux instance is to run in LPAR mode, the control point is the mainframe's
Support Element (SE) or an attached Hardware Management Console (HMC). For
Linux on z/VM, the control point is the control program (CP) of the hosting
z/VM.
The media that can be used as boot devices also depend on where Linux is to run.
Table 12 provides an overview of the possibilities:
Table 12. Boot media
DASD SCSI z/VM reader CD-ROM/FTP
z/VM guest U U U
LPAR U U U
DASDs and SCSI devices that are attached through an FCP channel can be used for
both LPAR and z/VM guest virtual machines. A SCSI device can be a disk or an
FC-attached CD-ROM or DVD drive. The z/VM reader is available only in a
z/VM environment.
For Linux in LPAR mode, you can also boot from a CD-ROM drive on the SE or
HMC, or you can obtain the boot data from a remote FTP server.
For the z/VM reader, as a sequential I/O boot device, the order in which this data
is provided is significant. For random access devices there is no required order.
On SUSE Linux Enterprise Server 12 SP2, kernel images are installed into the /boot
directory and are named image-<version>. For information about where to find the
images and how to start an installation, see SUSE Linux Enterprise Server 12 SP2
Deployment Guide.
If you want to boot a kernel image from a device that does not correspond to the
included boot loader code, you can provide alternate boot loader code separate
from the kernel image.
Use GRUB 2 to prepare boot devices with separate DASD or SCSI boot loader
code. You can then boot from these devices, regardless of the boot loader code in
the kernel image.
Kernel parameters
The kernel parameters are in form of an ASCII text string of up to 895 characters.
If the boot device is the z/VM reader, the string can also be encoded in EBCDIC.
You specify kernel parameters when you create your boot configuration with
GRUB 2. Depending on your boot method, you can add kernel parameters when
starting the boot process.
Important: Do not specify parameters that prevent SUSE Linux Enterprise Server
12 SP2 from booting. See Avoid parameters that break GRUB 2 on page 23.
For example, booting from DASD requires the DASD device driver. If you want to
boot from DASD but the DASD device driver has not been compiled into your
kernel, you need to provide the DASD device driver module on an initial RAM
disk.
SUSE Linux Enterprise Server 12 SP2 provides a ramdisk in /boot and named
initrd-<kernel version>.
For SUSE Linux Enterprise Server 12, such components and their configuration are
provided through an initial RAM disk.
Procedure
Perform these steps to make configuration changes for components in the initrd
take effect:
1. Issue dracut -f to update the initial RAM disk of your target kernel.
2. Issue grub2-install to update the initial RAM disk of the auxiliary kernel and
to rewrite the zipl boot record.
For more general information about z/VM guest environments for Linux, see z/VM
Getting Started with Linux on System z, SC24-6194.
Procedure
where:
<devno>
specifies the device number of the boot device as seen by the guest.
<n>
selects the kernel to be booted.
0 or 1
immediately starts GRUB 2 for booting the target SUSE Linux
Enterprise Server 12 SP2 kernel.
2 boots a rescue kernel.
This example illustrates how a zipl menu is displayed on the z/VM guest virtual
machine console.
00: zIPL interactive boot menu
00:
00: 0. default (grub2)
00:
00: 1. grub2
00: 2. skip-grub
00:
00: Note: VM users please use #cp vi vmsg <number> <kernel-parameters>
00:
00: Please choose (default will boot in 30 seconds): #cp vi vmsg 1
Procedure
where:
<wwpn>
specifies the world wide port name (WWPN) of the target port in
hexadecimal format. A blank separates the first eight digits from the final
eight digits.
<lun>
specifies the LUN of the SCSI boot disk in hexadecimal format. A blank
separating the first eight digits from the final eight digits.
4. Optional for menu configurations: Specify the boot configuration (boot program
in z/VM terminology) to be used. Enter a command of this form:
#cp set loaddev bootprog <n>
If you omit this specification, GRUB 2 is started after a timeout period has
expired.
Example: To start GRUB 2 and proceed with booting the target kernel, issue
this command:
#cp set loaddev bootprog 0
where:
<kernel_parameters>
specifies a set of kernel parameters to be stored as system control program
data (SCPDATA). When booting Linux, these kernel parameters are
concatenated to the end of the existing kernel parameters that are used by
your boot configuration.
where
<devno>
is the device number of the FCP channel that provides access to the SCSI
boot disk.
loadparm g<grub_parameters>
optionally specifies parameters for GRUB 2. Typically, this specification
selects a boot option from a GRUB 2 boot menu. For details, see
Specifying GRUB 2 parameters on page 68.
Tip
You can specify the target port and LUN of the SCSI boot disk, a boot
configuration, and SCPDATA all with a single SET LOADDEV command. See
z/VM CP Commands and Utilities Reference, SC24-6175 for more information about
the SET LOADDEV command.
You need the following files, all in record format fixed 80:
v Linux kernel image with built-in z/VM reader boot loader code. This is the case
for the default SUSE Linux Enterprise Server 12 SP2 kernel.
v Kernel parameters (optional)
v Initial RAM disk image (optional)
This information is a summary of how to boot Linux from a z/VM reader. For
more details, see Redpaper Building Linux Systems under IBM VM, REDP-0120.
Procedure
c. Use the CMS PUNCH command to transfer each of the required files to the
reader. Be sure to use the no header option to omit the file headers.
First transfer the kernel image.
Second transfer the kernel parameters.
Third transfer the initial RAM disk image, if present.
For each file, issue a command of this form:
pun <file_name> <file_type> <file_mode> (noh
If you omit this step, all files are deleted from the reader during the IPL
that follows.
4. Issue the IPL command:
ipl 000c clear parm <kernel_parameters>
where:
0x000c
is the device number of the reader.
parm <kernel_parameters>
is an optional 64-byte string of kernel parameters to be concatenated to the
end of the existing kernel parameters that are used by your boot
configuration.
See also Adding kernel parameters when booting Linux on page 24.
The following description refers to an HMC, but the same steps also apply to an
SE.
Procedure
2) Select
LPAR 3) Click Load
5. Enter the device number of the DASD boot device in the Load address field.
6. Enter a specification of the form <n>g<grub_parameters> in the Load parameter
filed.
<n>
selects the kernel to be booted.
0 or 1
immediately starts GRUB 2 for booting the target SUSE Linux
Enterprise Server 12 SP2 kernel.
2 boots a rescue kernel.
If you omit this specification, GRUB 2 is started after a timeout period has
expired. Depending on your configuration, a zipl boot menu might be
displayed during the timeout period. From this menu, you can choose
between starting GRUB 2 or booting a rescue kernel.
<grub_parameters>
specifies parameters for GRUB 2. Typically, this specification selects a boot
option from a GRUB 2 boot menu. For details, see Specifying GRUB 2
parameters on page 68.
7. Click OK to start the boot process.
This example illustrates how a zipl menu is displayed on the HMC or SE.
zIPL interactive boot menu
0. default (grub2)
1. grub2
2. skip-grub
Specify 0 or 1 to immediately start GRUB 2 and proceed with booting the target
kernel. Specify 2 to start a rescue kernel. If you do not select a menu item before
the timeout expires, GRUB 2 is started.
What to do next
Check the output on the preferred console (see Console kernel parameter syntax
on page 38) to monitor the boot progress.
Procedure
2) Select
LPAR 3) Click Load
g2
Figure 17. Load panel with SCSI feature enabled - for booting from a SCSI device
5. Enter the device number of the FCP channel through which the SCSI device is
accessed in the Load address field.
6. Enter the WWPN of the SCSI device in the World wide port name field.
7. Enter the LUN of the SCSI device in the Logical unit number field.
What to do next
Check the output on the preferred console (see Console kernel parameter syntax
on page 38) to monitor the boot progress.
After the Linux kernel is loaded, Linux is started using restart PSW.
You need installation data that includes a special file with installation information
(with extension ins). This file can be in different locations:
v On a disk that is inserted in the CD-ROM or DVD drive of the system where the
HMC runs
v In the file system of an FTP server that you can access through FTP from your
HMC system
The .ins file contains a mapping of the location of installation data on the disk or
FTP server and the memory locations where the data is to be copied.
For SUSE Linux Enterprise Server 12 SP2 this file is called suse.ins and located in
the root directory of the file system on the DVD 1.
2) Select
3) Click
LPAR
Load from Removable Media or Server
6. Select suse.ins.
7. Click OK to start loading Linux.
Results
The kernel has started and the SUSE Linux Enterprise Server 12 SP2 boot process
continues.
Procedure
1. Optional: To select a GRUB 2 boot option, first use grub2-once --enum to list
the GRUB 2 boot entries, for example:
# grub2-once --enum
0 SLES12
1>0 Advanced options for SLES12>SLES12, with Linux 3.12.49-3-default
1>1 Advanced options for SLES12>SLES12, with Linux 3.12.49-3-default (recovery mode)
2. To specify a GRUB 2 boot entry, replace the greater than (>) character with the
full stop (.) character. For example, specify loadparm g1.1 for the 1>1 boot
entry.
For more information about the lsreipl command, see lsreipl - List IPL and
re-IPL settings on page 593. In sysfs, information about IPL parameters is
available in subdirectories of /sys/firmware/ipl.
/sys/firmware/ipl/ipl_type
If the device is a CCW device, the additional attributes device and loadparm are
present.
device Contains the bus ID of the CCW device that is used for IPL, for example:
# cat /sys/firmware/ipl/device
0.0.1234
loadparm
Contains up to 8 characters for the loadparm that is used for IPL, for
example:
# cat /sys/firmware/ipl/loadparm
0g2
parm
Contains additional kernel parameters that are specified with the PARM
parameter when booting with the z/VM CP IPL command. See also
Adding kernel parameters when booting Linux on page 24.
If the device is FCP, a number of additional attributes are present (also see
Chapter 10, SCSI-over-Fibre Channel device driver, on page 145 for details):
device Contains the bus ID of the FCP device that is used for IPL, for example:
# cat /sys/firmware/ipl/device
0.0.50dc
br_lba Contains the logical block address of the boot record on the boot device
(usually 0).
bootprog
Contains the boot program number. For example:
# cat /sys/firmware/ipl/bootprog
0
scp_data
Contains additional kernel parameters, if any, that are used when booting
from a SCSI device. For information about how SCPDATA can be set see
the following sections:
v Booting from a SCSI device on page 57 for z/VM
v Booting from SCSI on page 63 for LPAR
v chreipl - Modify the re-IPL configuration on page 499
binary_parameter
Contains the information of the preceding attributes in binary format.
When the system is re-IPLed, the alternative device is used to boot the kernel.
To configure the re-IPL device, use the chreipl tool (see chreipl - Modify the
re-IPL configuration on page 499).
When Linux is booted, the re-IPL attributes are set by default to the values of the
boot device, which can be found under /sys/firmware/ipl.
Important:
v If the re-IPL kernel is SUSE Linux Enterprise Server 12 or later, be sure
not to specify kernel parameters that prevent the target kernel from
booting.
v In particular, do not use a leading equal sign if the re-IPL kernel is SUSE
Linux Enterprise Server or later.
See Avoid parameters that break GRUB 2 on page 23.
If you omit this specification, GRUB 2 is started after a timeout period has
expired.
br_lba Boot record logical block address. Master boot record. Is always 0 for
Linux.
scp_data
Kernel parameters to be used for the next FCP re-IPL.
A leading equal sign (=) means that the existing kernel parameter line in
the boot configuration is ignored and the boot process uses the kernel
parameters in the scp_data attribute only.
Important:
v If the re-IPL kernel is SUSE Linux Enterprise Server 12 or later, be sure
not to specify kernel parameters that prevent the target kernel from
booting.
v In particular, do not use a leading equal sign if the re-IPL kernel is SUSE
Linux Enterprise Server or later.
See Avoid parameters that break GRUB 2 on page 23.
You cannot load SUSE Linux Enterprise Server 12 or later from an NSS. If the NSS
contains a Linux distribution that supports NSS, the value could be a string of
kernel parameters.
See also the description of the dumpconf tool in Using the Dump Tools on SUSE Linux
Enterprise Server 12 SP1, SC34-2746 on the IBM Knowledge Center website at
www.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.trouble.doc/
serviceandsupport.html
When Linux is suspended, data is written to a swap partition. The resume process
uses this data to make Linux continue from where it left off when it was
suspended. A suspended Linux instance does not require memory or processor
cycles.
Linux on z Systems suspend and resume support applies to both Linux on z/VM
and Linux instances that run directly in an LPAR.
While a Linux instance is suspended, you can run another Linux instance in the
z/VM guest virtual machine or in the LPAR where the suspended Linux instance
was running.
If such unavailable devices were offline when the Linux instance was suspended,
they are de-registered and the device name can be assigned to other devices.
If unavailable devices where online when the Linux instance was suspended,
handling depends on the respective device driver. DASD and FCP devices remain
registered as disconnected devices. The device name and the device configuration
are preserved. Devices that are controlled by other device drivers are de-registered.
If the subchannel changes for a DASD or FCP device, the device configuration is
changed to reflect the new subchannel. This change is accomplished without
de-registration. Thus, device name and device configuration are preserved.
If the subchannel changes for any other device, the device is de-registered and
registered again as a new device.
Kernel parameters
You configure the suspend and resume support by adding parameters to the kernel
parameter line.
resume=<device_node>
no_console_suspend noresume
where:
resume=<device_node>
specifies the standard device node of the swap partition with the data that is
required for resuming the Linux instance.
This swap partition must be available during the boot process (see Updating
the boot configuration on page 78).
no_console_suspend
prevents Linux consoles from being suspended early in the suspend process.
Without this parameter, you cannot see the kernel messages that are issued by
the suspend process.
noresume
boots the kernel without resuming a previously suspended Linux instance.
Add this parameter to circumvent the resume process, for example, if the data
written by the previous suspend process is damaged.
Example
Set up a swap partition that is at least the size of the available LPAR memory or
the memory of the z/VM guest virtual machine.
Do not use this swap partition for any other operating system that might run in
the LPAR or z/VM guest virtual machine while the Linux instance is suspended.
You cannot suspend a Linux instance while most of the memory and most of the
swap space are in use. If there is not sufficient remaining swap space to hold the
data for resuming the Linux instance, suspending the Linux instance fails.
To assure sufficient swap space you might have to configure two swap partitions,
one partition for regular swapping and another for suspending the Linux instance.
Configure the swap partition for suspending the Linux instance with a lower
priority than the regular swap partition.
Use the pri= parameter to specify the swap partitions in /etc/fstab with different
priorities. See the swapon man page for details.
The following example shows two swap partitions with different priorities:
# cat /etc/fstab
...
/dev/disk/by-path/ccw-0.0.b101-part1 swap swap pri=-1 0 0
/dev/disk/by-path/ccw-0.0.b100-part2 swap swap pri=-2 0 0
Procedure
Perform these steps to create a boot configuration that supports resuming your
Linux instance:
1. Run dracut -f to create an initial RAM disk with the module parameter that
identifies your device with the swap partition and with the device driver
required for this device.
2. Reboot your Linux instance.
With a thousand or more available devices, the resume process can take longer
than an IPL. If the duration of the resume process is critical for a Linux instance
with many devices, include unused devices in the exclusion list (see cio_ignore -
List devices to be ignored on page 670 and cio_ignore - Manage the I/O
exclusion list on page 514).
Attention: Only suspend a Linux instance for which you have specified the
resume= kernel parameter. Without this parameter, you cannot resume the
suspended Linux instance.
Procedure
Results
On the Linux console you might see progress indications until the console itself is
suspended. Most of these messages require log level 7 or higher to be printed. See
Using the magic sysrequest feature on page 47 about setting the log level. You
cannot see such progress messages if you suspend the Linux instance from an ssh
session.
Use the same kernel, initial RAM disk, and kernel parameters that you used to first
boot the suspended Linux instance.
You must reestablish any terminal session for HVC terminal devices and for
terminals that are provided by the iucvtty program. You also must reestablish all
ssh sessions that have timed out while the Linux instance was suspended.
If resuming the Linux instance fails, boot Linux again with the noresume kernel
parameter. The boot process then ignores the data that was written to the swap
partition and starts Linux without resuming the suspended instance.
Use lsshut to find out which shutdown action is configured for each shutdown
trigger, see lsshut - List the current system shutdown actions on page 596.
Use the applicable command for setting the actions to be taken on shutdown:
v For halt, power off, and reboot use chshut, see chshut - Control the system
shutdown actions on page 503.
v For panic use dumpconf, see Using the Dump Tools on SUSE Linux Enterprise Server
12 SP1, SC34-2746
Note: kdump is not a shutdown action that you can set as a sysfs attribute value
for a shutdown trigger. See Using the Dump Tools on SUSE Linux Enterprise Server 12
SP1, SC34-2746 about how to set up kdump.
on_halt
on_poff
/sys/firmware shutdown_actions on_reboot
on_restart
on_panic
The preferred way to read or change these settings is using the lsshut, chshut, and
dumpconf commands. Alternatively, you can read and write to the
/sys/firmware/shutdown_actions/on_<trigger> attributes.
Examples
v This command reads the shutdown setting for the poff shutdown trigger.
# cat /sys/firmware/shutdown_actions/on_poff
stop
v This command changes the setting for the restart shutdown trigger to ipl:
# echo ipl > /sys/firmware/shutdown_actions/on_restart
Details for the ipl, reipl, dump, and vmcmd shutdown actions are contained in the
corresponding subdirectories in /sys/firmware. For example, /sys/firmware/ipl
contains specifications for an IPL device and other IPL parameters.
| You can specify multiple z/VM CP commands that are separated by the newline
| character \n. Each newline is counted as one character. When writing values
| with multiple commands, use this syntax to ensure that the newline character is
| processed correctly:
| # echo -e <cmd1>\n<cmd2>... | cat > /sys/firmware/vmcmd/on_<trigger>
|
|
| The -e echo option and redirect through cat are required because of the newline
| character.
| Issue the following command to configure the z/VM CP LOGOFF command as the
| shutdown action for the poff shutdown trigger.
| # chshut poff vmcmd "LOGOFF"
|
|
| Alternatively, you can issue the following commands to directly write the
| shutdown configuration to sysfs:
| # echo vmcmd > /sys/firmware/shutdown_actions/on_poff
| # echo LOGOFF > /sys/firmware/vmcmd/on_poff
|
|
| Figure 22 on page 84 illustrates the relationship of the sysfs attributes for this
| example.
|
| Alternatively, you can issue the following commands to directly write the
| shutdown configuration to sysfs:
| # echo vmcmd > /sys/firmware/shutdown_actions/on_poff
| # echo -e "MSG OPERATOR Going down\nLOGOFF" | cat > /sys/firmware/vmcmd/on_poff
|
|
This information applies to simple network IPL (snipl) version 2.3.0. A snipl
package is provided with SUSE Linux Enterprise Server 12 SP2.
You can use snipl to activate and deactivate virtual z Systems hardware with
Linux instances. You can set up a Linux instance on a mainframe system or on a
different hardware platform for running snipl.
snipl helps you to automate tasks that are typically performed by human
operators, for example, through the graphical interfaces of the HMC or SE.
Automation is required, for example, for failover setups within Linux clusters.
snipl can run in one of two modes, LPAR mode or z/VM mode.
LPAR mode
In LPAR mode, snipl provides basic z Systems support element (SE) functions.
With snipl in LPAR mode, you can perform the following tasks:
v Activate, reset, or deactivate an LPAR.
v Load (IPL) an LPAR from a disk device, for example, a DASD device or a SCSI
device.
v Create a dump on a DASD or SCSI dump device.
v Send commands to the operating system and retrieve operating system
messages.
Customize the API settings on the HMC or SE you want to connect to:
v Configure SNMP support.
v Add the IP address of the Linux instance where snipl runs and set the SNMP
community.
If the communication is through IPv6, an IPv6 community string must be set.
v In the firewall settings, ensure that UDP port 161 and TCP port 3161 are
enabled.
You can obtain these publications from IBM Resource Link at www.ibm.com/
servers/resourcelink.
Overview for LPAR mode summarizes snipl command in LPAR mode. Details
for each option are provided in context in the sections that follow.
snipl
Where:
<image_name>
specifies an LPAR. If snipl directly accesses the SE, this is the LPAR name as
defined in the hardware setup.
If snipl accesses the SE through an HMC, the specification has the format
<mainframe_system>-<lpar_name> where <mainframe_system> is the name that
identifies the mainframe on the HMC. If you are using a snipl configuration
file that defines an alias for an LPAR, you can specify the alias.
SE Example: lpar204
lpar-access-data:
--timeout 60000
--timeout <timeout>
Notes:
1 -L can be omitted if the required information is specified through a
configuration file.
snipl <image_name>
(1)
--profilename <defaultprofile>
lpar-access-data -a
-F --profilename <filename>
-d
-F
-r
-F
-o
-g
Notes:
1 If not specified, the HMC or SE default profile for the specified LPAR is
used.
Where:
<image_name>
see Overview for LPAR mode on page 86.
|lpar-access-data|
see Specifying access data for LPAR mode on page 87.
-a or --activate
activates the specified LPARs.
--profilename <filename>
specifies an activation profile. If omitted, the SE or an HMC default profile for
the specified LPAR is used.
-d or --deactivate
deactivates the specified LPARs.
-r or --reset
resets the specified LPARs.
-o or --stop
stops all CPUs for the specified LPARs.
-g or --getstatus
returns the status for the specified LPARs.
-F or --force
unconditionally forces the operation.
Examples
v The following command deactivates an LPAR SZ01LP02 with the force option:
# snipl SZ01LP02 -L 192.0.2.4 -P -d -F
Enter password:
Warning : No default configuration file could be found/opened.
processing......
SZ01LP02: acknowledged.
For IPL from a SCSI device, see Perform an IPL or dump operation from a SCSI
device on page 91.
-A <load_address> --parameters_load <string>
--load_timeout 60
--load_timeout <timeout> --noclear --storestatus
Where:
<image_name>
specifies the LPARs for which to perform the IPL. If multiple LPARs are
specified, the same IPL device and IPL parameters are used for all of them. See
also Overview for LPAR mode on page 86.
|lpar-access-data|
see Specifying access data for LPAR mode on page 87.
-l or --load
performs an IPL for the specified LPARs.
-F or --force
unconditionally forces the IPL operation.
Examples:
| v The following command performs an IPL from a CCW device with bus ID
| 0.0.5119 for an LPAR SZ02LP03 on a mainframe system that is identified as SZ02
| on an HMC with an IP address 2001:0db8::11a0:
| # snipl SZ02-SZ02LP03 -L 2001:0db8::11a0 -P -l -A 5119
| Enter password:
| Warning : No default configuration file could be found/opened.
| processing......
| SZ02-SZ02LP03: acknowledged.
|
|
| v To perform an IPL from a CCW device in subchannel set 1 with the bus ID
| 0.1.5119 for an LPAR SZ03LP00:
| % snipl SZ03LP00 -L 192.0.2.4 -P -l -A 15119
|
|
For IPL from a CCW device, see Perform an IPL operation from a CCW device
on page 90.
-A <load_address> --parameters_load <string>
--wwpn_scsiload <portname> --lun_scsiload <unitnumber>
--bps_scsiload <selector> --ossparms_scsiload <string>
--bootrecord_scsiload <hexaddress>
Where:
<image_name>
specifies the LPARs for which to perform the IPL or dump operation. If
multiple LPARs are specified, the same command parameters apply to all of
them. See also Overview for LPAR mode on page 86.
|lpar-access-data|
see Specifying access data for LPAR mode on page 87.
-s or --scsiload
performs an IPL from a SCSI device for the specified LPARs.
-D or --scsidump
creates a dump for the specified LPAR to a SCSI device.
-F or --force
unconditionally forces the operation.
-A <loadaddress> or --address_load <loadaddress>
specifies the hexadecimal four-digit device number of the IPL device. If this
parameter is omitted, the IPL device of the most recent SCSI IPL of the LPAR
is used.
Example: The following command performs a SCSI IPL for an LPAR SZ01LP00:
# snipl SZ01LP00 -L 192.0.2.4 -P -s -A 3d0f --wwpn_scsiload 500507630303c562 \
--lun_scsiload 4010404900000000
Enter password:
Warning : No default configuration file could be found/opened.
processing...
SZ01LP00: acknowledged.
Note: Instead of using the continuation sign (\) at the end of the first line, you can
specify the complete command on a single line.
List LPARs
To list all LPARs that are controlled by an HMC or SE, snipl requires specifications
for the HMC or SE and the corresponding access data.
snipl lpar-access-data -x
<image_name>
Where:
Example: The following command lists the LPARs for an SE with IP address
192.0.2.4:
# snipl -L 192.0.2.4 -P -x
Enter password:
Warning : No default configuration file could be found/opened.
--msgtimeout 5000
--msgtimeout <interval> --msgfilename <name>
Where:
<image_name>
specifies the LPAR for which you want to emulate the HMC or SE Operating
Systems Messages applet (see also Overview for LPAR mode on page 86).
|lpar-access-data|
see Specifying access data for LPAR mode on page 87.
-i or --dialog
starts an emulation of the HMC or SE Operating System Message applet for
the specified LPAR.
--msgtimeout <interval>
specifies the timeout for retrieving operating system messages in milliseconds.
The default value is 5000 ms.
z/VM mode
With snipl in z/VM mode, you can log on, reset, or log off a z/VM guest virtual
machine.
If snipl in z/VM mode repeatedly reports RPC: Port mapper failure - RPC timed
out, it is most likely that the z/VM system is inaccessible, or not set up correctly.
Although only one of the communication methods uses RPC, this method is the
fallback method that is tried if the other method fails.
snipl can access the systems management API through a SMAPI request server.
The following configuration is required for the z/VM systems you want to work
with:
v An AF_INET based SMAPI request server must be configured.
v A port on which the request server listens must be set up.
v A z/VM user ID to be specified with the snipl command must be set up. This
user ID must be authorized for the request server.
snipl can access the systems management API through a VSMSERVE service
machine on your z/VM system. The following configuration is required for the
z/VM systems you want to work with:
v The VSMSERVE service machine must be configured and authorized for the
directory manager.
snipl <guest_id>
zvm-access-data -a
-X 300
-d
-X <maxperiod>
-F
-r
-g
-x
zvm-access-data:
-V <ip_address>
(1)
-z <portnumber>
(2)
-f <defaultfile>
-u <user_id> -p <password>
-P -f <filename>
--timeout 60000
--timeout <timeout>
Notes:
1 Required for connections through a SMAPI request server, unless the port
is specified through a configuration file.
2 -V, -u, and -p can be omitted if the required data is specified through a
configuration file.
Where:
<guest_id>
specifies the z/VM guest virtual machine you want to work with. Specify
multiple z/VM user IDs to perform the same action for multiple z/VM guest
virtual machines.
If you are using a snipl configuration file that defines an alias for a z/VM
guest virtual machine, you can specify the alias.
You can omit this parameter for the -x option if other specifications on the
command line identify a section in the configuration file.
-V <ip_address> or --vmserver <ip_address>
specifies the IP address or host name of the SMAPI request server or
Examples
v The following command logs on two z/VM guest virtual machines:
# snipl sndlnx04 sndlnx05 -V sandbox.www.example.com -z 44444 -u sndadm01 -p pw42play -a
Warning : No default configuration file could be found/opened.
* ImageActivate : Image sndlnx04 Request Successful
* ImageActivate : Image sndlnx05 Request Successful
See Specifying access data for LPAR mode on page 87 or Command line syntax
(z/VM mode) on page 96 about how to include a configuration file when issuing
a snipl command.
A snipl configuration file contains one or more sections. Each section consists of
multiple lines with specifications of the form <keyword>=<value> for either a z/VM
system or an SE.
Table 15 on page 100 summarizes the keywords for the configuration file and the
command -line equivalents for LPAR mode and z/VM mode.
(required)
user n/a A z/VM user ID that is authorized for -u or --user
the SMAPI request server or VSMSERVE
(See note 2) service machine.
password The value for community in the SNMP The password for the z/VM user ID -p or
settings of the SE. specified with the user keyword. --password
(See note 3)
If not specified through either the (See note 2)
configuration file or the command,
the default, public, is used.
port n/a Required if the server keyword specifies -z or --port
the IP address or host name of a SMAPI
request server.
image An LPAR name as defined in the A z/VM user ID that specifies a target A list of one or
mainframe hardware configuration. z/VM guest virtual machine. more items that
A valid section are separated by
must have one If the server keyword specifies an You can define an alias name for the blanks and
or more lines HMC, the specification begins with z/VM user ID by appending a forward specified
with this the name that identifies the slash (/) to the ID and specifying the without a
keyword. mainframe on the HMC, followed by alias after the slash. switch.
a hyphen (-), followed by the LPAR
name.
Note:
1. Jointly, the server and type keywords are equivalent to the command-line
option -L for LPAR mode or to -V for z/VM mode.
2. Can be omitted and specified on the command line instead.
3. Do not include passwords in the snipl configuration file unless the security
policy at your installation permits you to do so.
Figure 23 on page 101 shows a configuration file example with multiple sections,
including sections for LPAR mode and for z/VM mode.
Examples
The examples that follow assume that the configuration file of Figure 23 is used.
v The following command logs on two z/VM guest virtual machines, sndlnx01
and sndlnx03 (with alias tutor). In the example, the command output shows
that sndlnx03 is already logged on.
# snipl sndlnx01 sndlnx03 -V sandbox.www.example.com -z 44444 -u sndadm01 -p pw42play -a
Warning : No default configuration file could be found/opened.
* ImageActivate : Image sndlnx01 Request Successful
* ImageActivate : Image sndlnx03 Image Already Active
Assuming that the configuration file of Figure 23 on page 101 is used by default,
an equivalent command would be:
# snipl sndlnx01 tutor -a
Server sandbox.www.example.com from config file /etc/snipl.conf is used
* ImageActivate : Image sndlnx01 Request Successful
* ImageActivate : Image sndlnx03 Image Already Active
Assuming that the configuration file of Figure 23 on page 101 is used by default,
an equivalent command would be:
# snipl SZ01LP03 -l -P -A 5000
Enter password:
Server 192.0.2.4 from config file /etc/snipl.conf is used
SZ01LP03: acknowledged.
The following return codes indicate snipl syntax errors or specifications that are
not valid:
1 An unknown command option was specified.
2 A command option with an invalid value was specified.
3 A command option was specified more than once.
4 Conflicting command options was specified.
5 No command option was specified.
6 No SE, HMC, SMAPI request server or VSMSERVE service machine was
specified on the command line or through a configuration file.
7 No LPAR or z/VM guest virtual machine was specified.
8 No z/VM user ID was specified on the command line or through a
configuration file.
9 No password was specified on the command line or through a
configuration file.
10 A specified LPAR or z/VM guest virtual machine does not exist on the
specified SE or z/VM system.
22 More than one LPAR was specified for option --dialog.
Connection errors
If a connection error occurs (for example, a timeout), snipl sends a message to
stderr.
To recover connection errors, try again to issue the command. If the problem
persists, a networking failure is most likely. In this case, increase the timeout value.
In the message, <rc> is a return code from the network management application
programming interfaces (HWMCAAPI) on the SE.
Example
LPARLNX1: not acknowledged command was not successful rc is 135921664
STONITH is usually used as part of this framework but can also be used
independently. snipl provides a plug-in to STONITH.
Using stonith
When using stonith commands for Linux on z/VM or for Linux in LPAR mode
you must provide <keyword>=<value> pairs as described in The snipl
configuration file on page 99. There are two ways to specify this information:
v On the command line with the stonith command, using the -p option and the
snipl_parm keyword.
v Through a configuration file, using the -p option and the snipl_file keyword.
Unlike snipl, you must specify all parameters in the same way; all parameters on
the command line or all parameters in the configuration file.
-T on <image>
off
reset
Where:
-t lic_vps
specifies the server type. For STONITH with snipl, the server type is always
lic_vps.
-p specifies parameters.
snipl_param <parameters>
specifies comma-separated <keyword>=<value> pairs with the same keywords
as used in the configuration file (see The snipl configuration file on page 99).
For LPAR mode the following keywords are required:
v server
v type
v password
v image
For z/VM mode the following keywords are required:
v server
v port (required if the z/VM system is configured with a SMAPI request
server rather than a VSMSERVE service machine)
v type
v user
v password
v image
snipl_file <parameters>
specifies a configuration file (see The snipl configuration file on page 99).
The configuration file must contain all required keywords, including the
password. The configuration file must always be specified explicitly. No file is
used by default.
-T specifies the action to be performed.
-on
activates the specified LPAR or logs on the specified z/VM virtual machine.
-off
deactivates the specified LPAR or logs off the specified z/VM virtual machine.
-reset
resets the specified LPAR or z/VM virtual machine.
Examples
v This example command resets the z/VM guest virtual machine sndlnx04:
# stonith -t lic_vps -p "snipl_param server=sandbox.www.example.com,type=vm\
,user=sndadm01,password=pw42play,image=sndlnx04" -T reset sndlnx04
Note: Instead of using the continuation sign (\) at the end of the first line, you
can specify the complete command on a single line.
v With /etc/xcfg as shown in Example of a snipl configuration file, the following
command is equivalent:
# stonith -t lic_vps -p "snipl_file /etc/xcfg" -T reset sndlnx04
There are several z Systems specific storage device drivers for SUSE Linux
Enterprise Server 12 SP2 for z Systems.
Newest version
You can find the newest version of this publication on IBM Knowledge Center at
www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_suse.html
Restrictions
SCSI disks that are attached through an FCP channel are not classified as DASD.
They are handled by the zfcp driver (see Chapter 10, SCSI-over-Fibre Channel
device driver, on page 145).
Features
The DASD device driver supports a wide range of disk devices and disk functions.
v The DASD device driver has no dependencies on the adapter hardware that is
used to physically connect the DASDs to the z Systems hardware. You can use
any adapter that is supported by the z Systems hardware (see
www.ibm.com/systems/z/connectivity for more information).
v The DASD device driver supports ESS virtual ECKD type disks
v The DASD device driver supports the control unit attached physical ECKD
(Extended Count Key Data) and FBA (Fixed Block Access) devices as
summarized in Table 16:
Table 16. Supported control unit attached DASD
Device format Control unit type Device type
ECKD 1750 3380 and 3390
ECKD 2107 3380 and 3390
ECKD 2105 3380 and 3390
ECKD 3990 3380 and 3390
ECKD 9343 9345
ECKD 3880 3390
FBA 6310 9336
FBA 3880 3370
All models of the specified control units and device types can be used with the
DASD device driver. This includes large devices with more than 65520 cylinders,
for example, 3390 Model A. Check the storage support statement to find out
what works for SUSE Linux Enterprise Server 12 SP2.
The DASD device driver is embedded into the Linux generic support for
partitioned disks. As a result, you can use any partition table format that is
supported by Linux for your DASDs.
Traditional mainframe operating systems (such as, z/OS, z/VM, and z/VSE)
expect a standard DASD format. In particular, the format of the first two tracks of
a DASD is defined by this standard. These tracks include the z Systems IPL, label,
and for some layouts VTOC records. Partitioning schemes for platforms other than
z Systems generally do not preserve these mainframe specific records.
SUSE Linux Enterprise Server 12 SP2 for z Systems includes the IBM label
partitioning scheme that preserves the z Systems IPL, label, and VTOC records.
With this partitioning scheme, Linux can share a disk with other mainframe
operating systems. For example, a traditional mainframe operating system can
handle backup and restore for a partition that is used by Linux.
The following sections describe the layouts that are supported by the IBM label
partitioning scheme:
v z Systems compatible disk layout on page 111
v Linux disk layout on page 114
v CMS disk layout on page 114
DASD partitions
Partitioning DASD has the same advantages as for other disk types, but there are
some prerequisites and a special tool, fdasd.
With the Linux disk layout (LDL) and the CMS disk layout, you always have a
single partition only. This partition is defined by the LDL or CMS formatted area
of the disk. With the compatible disk layout, you can have up to three partitions.
There are several reasons why you might want to have multiple partitions on a
DASD, for example:
Limit data growth
Runaway processes or undisciplined users can consume disk space to an
extend that the operating system runs short of space for essential
operations. Partitions can help to isolate the space that is available to
particular processes.
Encapsulate your data
If a file system gets damaged, this damage is likely to be restricted to a
single partition. Partitioning can reduce the scope of data damage.
Recommendations
v Use fdasd to create or alter partitions on ECKD type DASD that are formatted
with the compatible disk layout. If you use another partition editor, it is your
responsibility to ensure that partitions do not overlap. If they do, data damage
occurs.
v Leave no gaps between adjacent partitions to avoid wasting space. Gaps are not
reported as errors, and can be reclaimed only by deleting and re-creating one or
more of the surrounding partitions and rebuilding the file system on them.
A disk need not be partitioned completely. You can begin by creating only one or
two partitions at the start of your disk and convert the remaining space to a
partition later.
There is no facility for moving, enlarging, or reducing partitions, because fdasd has
no control over the file system on the partition. You can only delete and re-create
them. Changing the partition table results in loss of data in all altered partitions. It
is up to you to preserve the data by copying it to another medium.
You can format only ECKD type DASD with the compatible disk layout.
Linux can address the device as a whole as /dev/dasd<x>, where <x> can be one to
four letters that identify the individual DASD (see DASD naming scheme on
page 115). See DASD device nodes on page 116 for alternative addressing
possibilities.
Disks with the compatible disk layout can have one to three partitions. Linux
addresses the first partition as /dev/dasd<x>1, the second as /dev/dasd<x>2, and
the third as /dev/dasd<x>3.
You use the dasdfmt command (see dasdfmt - Format a DASD on page 535) to
format a disk with the compatible disk layout. You use the fdasd command (see
fdasd Partition a DASD on page 552) to create and modify partitions.
Volume label
The volume label includes information about the disk layout, the VOLSER, and a
pointer to the VTOC.
The DASD volume label is located in the third block of the first track of the device
(cylinder 0, track 0, block 2). This block has a 4-byte key, and an 80-byte data area
with the following content:
key for disks with the compatible disk layout, contains the four EBCDIC
characters VOL1 to identify the block as a volume label.
label identifier
is identical to the key field.
VOLSER
is a name that you can use to identify the DASD device. A volume serial
number (VOLSER) can be one to six EBCDIC characters. If you want to use
VOLSERs as identifiers for your DASD, be sure to assign unique VOLSERs.
You can assign VOLSERs from Linux by using the dasdfmt or fdasd
command. These commands enforce that VOLSERs:
v Are alphanumeric
v Are uppercase (by uppercase conversion)
v Contain no embedded blanks
v Contain no special characters other than $, #, @, and %
All other fields of the volume label contain EBCDIC space characters (code 0x40).
VTOC
Instead of a regular Linux partition table, Linux on z Systems, like other
mainframe operating systems, uses a Volume Table Of Contents (VTOC).
The VTOC contains pointers to the location of every data set on the volume. These
data sets form the Linux partitions.
The VTOC is on the second track (cylinder 0, track 1). It contains a number of
labels, each written in a separate block:
v One format 4 DSCB that describes the VTOC itself
v One format 5 DSCB
The format 5 DSCB is required by other operating systems but is not used by
Linux. fdasd sets it to zeros.
v For volumes with more than 65636 tracks, 1 format 7 DSCB following the format
5 DSCB
v For volumes with more than 65520 cylinders (982800 tracks), 1 format 8 DSCB
following the format 5 DSCB
v A format 1 DSCB for each partition
The key of the format 1 DSCB contains the data set name, which identifies the
partition to z/OS, z/VM or z/VSE.
The VTOC can be displayed with standard z Systems tools such as VM/DITTO. A
Linux DASD with physical device number 0x0193, volume label LNX001, and
three partitions might be displayed like this example:
VM/DITTO DISPLAY VTOC LINE 1 OF 5
===> SCROLL ===> PAGE
--- FILE NAME --- (SORTED BY =,NAME ,) ---- EXT BEGIN-END RELTRK,
1...5...10...15...20...25...30...35...40.... SQ CYL-HD CYL-HD NUMTRKS
*** VTOC EXTENT *** 0 0 1 0 1 1,1
LINUX.VLNX001.PART0001.NATIVE 0 0 2 46 11 2,700
LINUX.VLNX001.PART0002.NATIVE 0 46 12 66 11 702,300
LINUX.VLNX001.PART0003.NATIVE 0 66 12 99 14 1002,498
*** THIS VOLUME IS CURRENTLY 100 PER CENT FULL WITH 0 TRACKS AVAILABLE
The ls command on Linux might list this DASD and its partitions like this
example:
# ls -l /dev/dasda*
brw-rw---- 1 root disk 94, 0 Jan 27 09:04 /dev/dasda
brw-rw---- 1 root disk 94, 1 Jan 27 09:04 /dev/dasda1
brw-rw---- 1 root disk 94, 2 Jan 27 09:04 /dev/dasda2
brw-rw---- 1 root disk 94, 3 Jan 27 09:04 /dev/dasda3
where dasda represent the whole DASD and dasda1, dasda2, and dasda3 represent
the individual partitions.
You can format only ECKD type DASD with the Linux disk layout. Apart from
accessing the disks as ECKD devices, you can also access them using the DASD
DIAG access method. See Enabling the DASD device driver to use the DIAG
access method on page 126 for how to enable DIAG.
DASDs with the Linux disk layout either have an LNX1 label or are not labeled.
The first records of the device are reserved for IPL records and the volume label,
and are not intended for use by Linux applications. All remaining records are
grouped into a single partition. You cannot have more than a single partition on a
DASD that is formatted in the Linux disk layout.
Linux can address the device as a whole as /dev/dasd<x>, where <x> can be one to
four letters that identify the individual DASD (see DASD naming scheme on
page 115). Linux can access the partition as /dev/dasd<x>1.
You use the dasdfmt command (see dasdfmt - Format a DASD on page 535) to
format a disk with the Linux disk layout.
Both ECKD or FBA type DASD can have the CMS disk layout. DASD partitions
that are formatted with this layout cannot be accessed by traditional mainframe
operating systems. Apart from accessing the disks as ECKD or FBA devices, you
can also access them using the DASD DIAG access method.
Figure 26 on page 115 illustrates two variants of the CMS disk layout.
The first variant contains IPL records, a volume label (CMS1), and a CMS data
area. Linux treats DASD like this equivalent to a DASD with the Linux disk layout,
where the CMS data area serves as the Linux partition.
The second variant is a CMS reserved volume. In this variant, the DASD was
reserved by a CMS RESERVE fn ft fm command. In addition to the IPL records and
the volume label, DASD with the CMS disk layout also have CMS metadata. The
CMS reserved file serves as the Linux partition.
For both variants of the CMS disk layout, you can have only a single Linux
partition. The IPL record, volume label and (where applicable) the CMS metadata,
are not intended for use by Linux applications.
Addressing the device and partition is the same for both variants. Linux can
address the device as a whole as /dev/dasd<x>, where <x> can be one to four
letters that identify the individual DASD (see DASD naming scheme). Linux can
access the partition as /dev/dasd<x>1.
Enabling the DASD device driver to use the DIAG access method on page 126
describes how to enable DIAG.
With 1,048,576 (20-bit) available minor numbers, the DASD device driver can
address 262,144 devices.
The DASD device driver uses a device name of the form dasd<x> for each DASD.
In the name, <x> is one to four lowercase letters. Table 18 shows how the device
names map to the available minor numbers.
Table 18. Mapping of DASD names to minor numbers
Name for device as a whole Minor number for device as a Number of
whole devices
From To From To
dasda dasdz 0 100 26
dasdaa dasdzz 104 2804 676
dasdaaa dasdzzz 2808 73108 17,576
dasdaaaa dasdnwtl 73112 1048572 243,866
Total number of devices: 262,144
The DASD device driver also uses a device name for each partition. The name of
the partition is the name of the device as a whole with a 1, 2, or 3 appended to
identify the first, second, or third partition. The three minor numbers that follow
the minor number of the device as a whole are the minor number for the first,
second, and third partition.
Examples
v dasda refers to the whole of the first disk in the system and dasda1,
dasda2, and dasda3 to the three partitions. The minor number for the whole
device is 0. The minor numbers of the partitions are 1, 2, and 3.
v dasdz refers to the whole of the 101st disk in the system and dasdz1,
dasdz2, and dasdz3 to the three partitions. The minor number for the whole
device is 100. The minor numbers of the partitions are 101, 102, and 103.
v dasdaa refers to the whole of the 102nd disk in the system and dasdaa1,
dasdaa2, and dasdaa3 to the three partitions. The minor number for the
whole device is 104. The minor numbers of the partitions are 105, 106, and 107.
The mapping between standard device nodes and the associated physical disk
space can change, for example, when you reboot Linux. To ensure that you access
the intended physical disk space, you need device nodes that are based on
properties that identify a particular DASD.
If you want to use device nodes that are based on VOLSER, be sure that
the VOLSERs in your environment are unique (see Volume label on page
112).
If you assign the same VOLSER to multiple devices, Linux can still access
each device through its standard device node. However, only one of the
devices can be accessed through the VOLSER-based device node. Thus, the
node is ambiguous and might lead to unintentional data access.
Furthermore, if the VOLSER on the device that is addressed by the node is
changed, the previously hidden device is not automatically addressed
instead. To reassign the node, you must reboot Linux or force the kernel to
reread the partition tables from disks, for example, by issuing:
# blockdev --rereadpt /dev/dasdzzz
You can assign VOLSERs to ECKD type devices with dasdfmt when
formatting or later with fdasd when creating partitions.
Device nodes that are based on file system information
udev creates device nodes of the form
/dev/disk/by-uuid/<uuid>
If a file system label exists, udev also creates a node of the form:
/dev/disk/by-label/<label>
There are no device nodes for the whole DASD that are based on file
system information.
If you want to use device nodes that are based on file system labels, be
sure that the labels in your environment are unique.
Note: If you want to use device nodes that are based on file system information
and VOLSER, be sure that they are unique for the scope of your Linux instance.
This information can be changed by a user or it can be copied, for example when
backup disks are created. If two disks with the same VOLSER or UUID are online
to the same Linux instance, the matching device node can point to either of these
disks.
Example
For a DASD that is assigned the device name dasdzzz, has two partitions, a device
bus-ID 0.0.b100 (device number 0xb100), VOLSER LNX001, and a UUID
6dd6c43d-a792-412f-a651-0031e631caed for the first and f45e955d-741a-4cf3-86b1-
380ee5177ac3 for the second partition, udev creates the following device nodes:
Example
Instead of issuing:
issue:
# fdasd /dev/disk/by-path/ccw-0.0.b100
You can make similar substitutions with other device nodes that udev provides for
you (see DASD device nodes on page 116).
In most cases, SUSE Linux Enterprise Server 12 SP2 loads the DASD device driver
for you during the boot process. You can then use YaST to set the diag attribute. If
the DASD device driver is loaded for you and you must set attributes other than
diag, see Module parameters on page 26.
eer_pages=5
modprobe dasd_mod
, eer_pages=<pages>
dasd= device-spec
autodetect
probeonly
nopav
nofcx
dasd_eckd_mod
dasd_fba_mod
dasd_diag_mod
device-spec:
<device_bus_id>
<from_device_bus_id>-<to_device_bus_id> :
( ro )
diag
erplog
failfast
Where:
The DASD base component is required by the other modules. Be sure that it is
loaded first. modprobe takes care of this dependency for you and ensures that the
base module is loaded automatically, if necessary.
Hint: modprobe might return before udev has created all device nodes for the
specified DASDs. If you must assure that all nodes are present, for example in
scripts, follow the modprobe command with:
# udevadm settle
Example
modprobe dasd_mod dasd=0.0.7000-0.0.7002,0.0.7005(ro),0.0.7006
Including the nofcx parameter suppresses High Performance FICON for all DASD:
modprobe dasd_mod dasd=nofcx,0.0.7000-0.0.7002,0.0.7005(ro),0.0.7006
See Working with newly available devices on page 10 to avoid errors when you
are working with devices that have become available to a running Linux instance.
v Preparing an ECKD type DASD for use
v Preparing an FBA-type DASD for use on page 124
v Accessing DASD by force on page 125
v Enabling the DASD device driver to use the DIAG access method on page 126
v Using extended error reporting for ECKD type DASD on page 127
v Setting a DASD online or offline on page 128
v Enabling and disabling logging on page 130
v Enabling and disabling immediate failure of I/O requests on page 130
v Setting the timeout for I/O requests on page 131
v Working with DASD statistics in debugfs on page 132
v Accessing full ECKD tracks on page 137
v Handling lost device reservations on page 139
v Reading and resetting the reservation state on page 140
v Displaying DASD information on page 141
If you format the DASD with the compatible disk layout, you need to create one,
two, or three partitions. You can then use your partitions as swap areas or to create
a Linux file system.
Procedure
Perform these steps to prepare the DASD:
1. Issue lsdasd (see lsdasd - List DASD devices on page 584) to find out if the
device is online. If necessary, set the device online using chccwdev (see
chccwdev - Set CCW device attributes on page 492).
Example:
# chccwdev -e 0.0.b100
2. Format the device with the dasdfmt command (see dasdfmt - Format a DASD
on page 535 for details). The formatting process can take hours for large
DASDs. If you want to use the CMS disk layout, and your DASD is already
formatted with the CMS disk layout, skip this step.
Tips:
v Use the largest possible block size, ideally 4096; the net capacity of an ECKD
DASD decreases for smaller block sizes. For example, a DASD formatted
with a block size of 512 byte has only half of the net capacity of the same
DASD formatted with a block size of 4096 byte.
v Use the -p option to display a progress bar.
If you create three partitions for a DASD /dev/dasdzzz, the device nodes for
the partitions are /dev/dasdzzz1, /dev/dasdzzz2, and /dev/dasdzzz3.
Result: fdasd creates the partitions and updates the partition table (see
VTOC on page 113).
4. Depending on the intended use of each partition, create a file system on the
partition or define it as a swap space.
Restriction: You must not make the block size of the file system smaller than
the block size that was used for formatting the disk with the dasdfmt
command.
Tip: Use the same block size for the file system that was used for formatting.
Example:
# mke2fs -j -b 4096 /dev/dasdzzz1
v Or define the partition as a swap space with the mkswap command (see the
man page for details).
5. Mount each file system to the mount point of your choice in Linux and enable
your swap partitions.
If a block device supports barrier requests, journaling file systems like ext3 or
raiser-fs can use this feature to achieve better performance and data integrity.
Barrier requests are supported for the DASD device driver and apply to ECKD,
FBA, and the DIAG discipline.
Write barriers are used by file systems and are enabled as a file-system specific
option. For example, barrier support can be enabled for an ext3 file system by
mounting it with the option -o barrier=1:
# mount -o barrier=1 /dev/dasdzzz1 /mnt
Note: To access FBA devices, use the DIAG access method (see Enabling the
DASD device driver to use the DIAG access method on page 126 for more
information).
Example:
# mke2fs -b 4096 /dev/dasdzzy1
v Or define the partition as a swap space with the mkswap command (see the
man page for details).
2. Mount the file system to the mount point of your choice in Linux or enable
your swap partition.
To check whether a DASD has been externally locked, read its availability attribute.
This attribute should be good. If it is boxed, the DASD has been externally
locked. Because a boxed DASD might not be recognized as DASD, it might not
show up in the device driver view in sysfs. If necessary, use the device category
view instead (see Device views in sysfs on page 11).
CAUTION:
Breaking an external lock can have unpredictable effects on the system that
holds the lock.
Procedure
1. Optional: To read the availability attribute of a DASD, issue a command of this
form:
# cat /sys/bus/ccw/devices/<device_bus_id>/availability
Example: This example shows that a DASD with device bus-ID 0.0.b110 (device
number 0xb110) has been externally locked.
# cat /sys/bus/ccw/devices/0.0.b110/availability
boxed
If the DASD is an ECKD type DASD and if you know the device bus-ID, you
can break the external lock and set the device online. This means that the lock
of the external system is broken with the unconditional reserve channel
command.
Results
If the external lock is successfully broken or if the lock has been surrendered by
the time the command is processed, the device is analyzed and set online. If it is
not possible to break the external lock (for example, because of a timeout, or
because it is an FBA-type DASD), the device remains in the boxed state. This
command might take some time to complete.
For information about breaking the look of a DASD that has already been analyzed
see tunedasd - Adjust low-level DASD settings on page 647.
This section only applies to Linux instances and DASD for which all of the
following are true:
v The Linux instance runs as a z/VM guest.
v The device can be of type ECKD with either LDL or CMS disk layout, or it can
be a device of type FBA.
v The module for the DIAG component must be loaded.
v The module for the component that corresponds to the DASD type
(dasd_eckd_mod or dasd_fba_mod) must be loaded.
v The DASD is offline.
v The DASD does not represent a parallel access volume alias device.
You can use the DIAG access method to access both ECKD and FBA-type DASD.
You use the device's use_diag sysfs attribute to enable or switch off the DIAG
access method in a system that is online. Set the use_diag attribute to 1 to enable
the DIAG access method. Set the use_diag attribute to 0 to switch off the DIAG
access method (this is the default).
Alternatively, you can specify diag on the command line, for example during IPL,
to force the device driver to access the device (range) with the DIAG access
method.
Note: When switching between an enabled and a disabled DIAG access method on
FBA-type DASD, first reinitialize the DASD, for example, with CMS format or by
overwriting any previous content. Switching without initialization might cause
data-integrity problems.
For more details about DIAG see z/VM CP Programming Services, SC24-6179.
Example
In this example, the DIAG access method is enabled for a DASD with device
number 0xb100.
1. Ensure that the driver is loaded:
# modprobe dasd_diag_mod
2. Identify the sysfs CCW-device directory for the device in question and change
to that directory:
# cd /sys/bus/ccw/devices/0.0.b100/
4. Enable the DIAG access method for this device by writing '1' to the use_diag
sysfs attribute:
# echo 1 > use_diag
What to do next
You can obtain error records for all DASD for which extended error reporting is
enabled from the character device of the extended error reporting module,
/dev/dasd_eer. The device supports these file operations:
open
Multiple processes can open the node concurrently. Each process that opens the
node has access to the records that are created from the time the node is
opened. A process cannot access records that were created before the process
opened the node.
close
You can close the node as usual.
read
Blocking read and non-blocking read are supported. When a record is partially
read and then purged, the next read returns an I/O error -EIO.
poll
The poll operation is typically used with non-blocking read.
Procedure
Use the chccwdev command (chccwdev - Set CCW device attributes on page 492)
to set a DASD online or offline.
Alternatively, you can write 1 to the device's online attribute to set it online or 0 to
set it offline. In contrast to the sysfs attribute, the chccwdev command triggers a
cio_settle for you and waits for the cio_settle to complete.
Outstanding I/O requests are canceled when you set a device offline. To wait
indefinitely for outstanding I/O requests to complete before setting the device
offline, use the chccwdev option --safeoffline or the sysfs attribute safe_offline.
Examples
v To set a DASD with device bus-ID 0.0.b100 online, issue:
# chccwdev -e 0.0.b100
or
# echo 1 > /sys/bus/ccw/devices/0.0.b100/online
or
# echo 0 > /sys/bus/ccw/devices/0.0.b100/online
v To complete outstanding I/O requests and then set a DASD with device bus-ID
0.0.4711 offline, issue:
# chccwdev -s 0.0.4711
or
# echo 1 > /sys/bus/ccw/devices/0.0.4711/safe_offline
Attention: Do not detach a device that is still being used by Linux. Detaching
devices might cause the system to hang or crash. Ensure that you unmount a
device and set it offline before you detach it.
See Working with newly available devices on page 10 to avoid errors when
working with devices that have become available to a running Linux instance.
Procedure
You can enable and disable error recovery processing (ERP) logging on a running
system. There are two methods:
v Use the dasd= parameter when you load the base module of the DASD device
driver.
Example:
Example:
echo 1 > /sys/bus/ccw/devices/<device_bus_id>/erplog
Example:
echo 0 > /sys/bus/ccw/devices/<device_bus_id>/erplog
By default, a DASD that has lost all paths waits for one of the paths to recover.
I/O requests are blocked while the DASD is waiting.
If the DASD is part of a mirror setup, this blocking might cause the entire virtual
device to be blocked. You can use the failfast attribute to immediately return I/O
requests as failed while no path to the device is available.
Attention: Use this attribute with caution and only in setups where a failed I/O
request can be recovered outside the scope of a single DASD.
Procedure
Example:
echo 1 > /sys/bus/ccw/devices/<device_bus_id>/failfast
Example:
echo 0 > /sys/bus/ccw/devices/<device_bus_id>/failfast
When the DASD device driver receives an I/O request from an application, it
issues one or more low-level I/O requests to the affected storage system. Both the
initial I/O request from the application and the resulting low-level requests to the
storage system can time out. You set the timeout values through two sysfs
attributes of the DASD.
expires
specifies the maximum time, in seconds, that the DASD device driver waits
for a response to a low-level I/O request from a storage server.
The default for the maximum response time depends on the type of DASD:
ECKD uses the default that is provided by the storage server.
FBA 300 s
DIAG 50 s
If the maximum response time is exceeded, the DASD device driver
cancels the request. Depending on your setup, the DASD device driver
might then try the request again, possibly in combination with other
recovery actions.
timeout
specifies the time interval, in seconds, within which the DASD device
driver must respond to an I/O request from a software layer above it. If
the specified time expires before the request is completed, the DASD
device driver cancels all related low-level I/O requests to storage systems
and reports the request as failed.
This setting is useful in setups where the software layer above the DASD
device driver requires an absolute upper limit for I/O requests.
A value of 0 means that there is no time limit. This value is the default.
You can use the expires and timeout attributes of a DASD to change the timeout
values for that DASD.
1. To find out the current timeout values, issue commands of this form:
# cat /sys/bus/ccw/devices/<device_bus_id>/expires
# cat /sys/bus/ccw/devices/<device_bus_id>/timeout
Example:
# cat /sys/bus/ccw/devices/0.0.7008/expires
30
# cat /sys/bus/ccw/devices/0.0.7008/timeout
0
where:
<max_wait>
is the new maximum response time, in seconds, for the storage server. The
value must be a positive integer.
<total_max>
is the new maximum total time in seconds. The value must be a positive
integer or 0. 0 disables this timeout setting.
<device_bus_id>
is the device bus-ID of the DASD.
Example:
# echo 60 > /sys/bus/ccw/devices/0.0.7008/expires
# echo 120 > /sys/bus/ccw/devices/0.0.7008/timeout
This example sets timeout values for a DASD with bus ID 0.0.7008. The
maximum response time for the storage server is set to 60 seconds and the
overall time limit for I/O requests is set to 120 seconds.
Each of these directories contains a file statistics that you can use to perform
these tasks:
v Start and stop data gathering.
v Reset statistics counters.
v Read statistics.
Where:
<directory>
is one of the directories in <mountpoint>/dasd.
<keyword>
specifies the action to be taken:
on to start data gathering.
off
to stop data gathering.
reset
to reset the statistics counters.
v To read performance data for dasda, assuming that the degbugfs mount point is
/sys/kernel/debug, issue:
# cat /sys/kernel/debug/dasd/dasda/statistics
start_time 1283518578.085869197
total_requests 0
total_sectors 0
total_pav 0
total_hpf 0
histogram_sectors 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_io_times 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_io_times_weighted 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_time_build_to_ssch 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_time_ssch_to_irq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_time_ssch_to_irq_weighted 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_time_irq_to_end 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_ccw_queue_length 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
total_read_requests 0
total_read_sectors 0
total_read_pav 0
total_read_hpf 0
histogram_read_sectors 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_read_times 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_read_time_build_to_ssch 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_read_time_ssch_to_irq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_read_time_irq_to_end 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
histogram_read_ccw_queue_length 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This section explains the raw data in the individual data rows of the statistics. Use
the dasdstat command to obtain more structured data.
start_time
is the UNIX epoch time stamp when data gathering was started or when
the counters were last reset.
Tip: Use the date tool to convert the time stamp to a more readily
human-readable format. See the date man page for details.
Single counters
have a single integer as the statistics data. All rows with labels that begin
with total_ are of this data type.
The following rows show data for the sum of all requests, read and write:
total_requests
is the number of requests that have been processed.
total_sectors
is the sum of the sizes of all requests, in units of 512-byte sectors.
Example:
# dasdstat -e dasdc
enable statistic "/sys/kernel/debug/dasd/dasdc/statistics"
Hints:
v Access a partition, rather than the whole device, to avoid directing the I/O
request towards the first 2 tracks of a CDL formatted DASD. Requests to the
first 2 tracks of a CDL formatted DASD are exceptional in that they never
use High Performance FICON.
v Assure that a significant I/O load is applied to the device. PAV aliases are
used only if multiple I/O requests for the device are processed
simultaneously.
Example:
# dd if=/dev/dasdc1 of=/dev/null bs=4k count=256
Example:
# dasdstat dasdc
--------------------------------------------------------------------------------
statistics data for statistic: dasdc
start time of data collection: Fri Dec 11 14:22:18 CET 2015
In the example, dasdc uses both Parallel Access Volume and High Performance
FICON.
With this mode, Linux can access an ECKD device regardless of the track layout.
In particular, the device does not need to be formatted for Linux.
By default, the DASD device driver accesses only the data fields of ECKD devices.
In default access mode, you can work with partitions, file systems, and files in the
file systems on the DASD.
Procedure
where:
<switch>
is 1 to activate raw data access and 0 to deactivate raw data access.
<device_bus_id>
identifies the DASD.
The initial commands ensure that both devices are offline and that the DIAG access
method is not enabled for either of them. The subsequent commands activate the
raw-track access mode for the two devices and set them both online. The lsdasd
command that follows shows the mapping between device bus-IDs and device
names.
The dd command for the copy operation specifies direct I/O for both the input and
output device and the block size of 1024 KB. After the copy operation is
completed, both devices are set offline. The access mode for the original device
then is set back to the default and the device is set back online.
#cat /sys/bus/ccw/devices/0.0.7009/online
1
# chccwdev -d 0.0.7009
# cat /sys/bus/ccw/devices/0.0.7009/use_diag
0
# cat /sys/bus/ccw/devices/0.0.70a1/online
0
# cat /sys/bus/ccw/devices/0.0.70a1/use_diag
0
# echo 1 > /sys/bus/ccw/devices/0.0.7009/raw_track_access
# echo 1 > /sys/bus/ccw/devices/0.0.70a1/raw_track_access
# chccwdev -e 0.0.7009,0.0.70a1
# lsdasd 0.0.7009 0.0.70a1
Bus-ID Status Name Device Type BlkSz Size Blocks
==============================================================================
0.0.7009 active dasdf 94:20 ECKD 4096 7043MB 1803060
0.0.70a1 active dasdj 94:36 ECKD 4096 7043MB 1803060
# echo 1024 > /sys/block/dasdf/queue/max_sectors_kb
# echo 1024 > /sys/block/dasdj/queue/max_sectors_kb
# dd if=/dev/dasdf of=/dev/dasdj bs=1024k iflag=direct oflag=direct
# chccwdev -d 0.0.7009,0.0.70a1
# echo 0 > /sys/bus/ccw/devices/0.0.7009/raw_track_access
# chccwdev -e 0.0.7009
This other system then has exclusive I/O access to the DASD for the duration of
the unconditional reservation. Such unconditional reservations can be useful for
handling error situations where:
v Your Linux instance cannot gracefully release the DASD.
v Another system requires access to the DASD, for example, to perform recovery
actions.
After the DASD is released by the other system, your Linux instance might process
pending I/O requests and write faulty data to the DASD. How to prevent pending
I/O requests from being processed depends on the reservation policy. There are
two reservation policies:
ignore All I/O operations for the DASD are blocked until the DASD is released
by the second system. When using this policy, reboot your Linux instance
before the other system releases the DASD. This policy is the default.
Procedure
Set the reservation policy with a command of this form:
# echo <policy> > /sys/bus/ccw/devices/<device_bus_id>/reservation_policy
where:
<device_bus_id>
specifies the DASD.
<policy>
is one of the available policies, ignore or fail.
Examples
v The command of this example sets the reservation policy for a DASD with bus
ID 0.0.7009 to fail.
# echo fail > /sys/bus/ccw/devices/0.0.7009/reservation_policy
v This example shows a small scenario. The first two commands confirm that the
reservation policy of the DASD is fail and that the reservation has been lost to
another system. Assuming that the error that had occurred has already been
resolved and that the other system has released the DASD, operations with the
DASD are resumed by setting it offline and back online.
# cat /sys/bus/ccw/devices/0.0.7009/reservation_policy
fail
# cat /sys/bus/ccw/devices/0.0.7009/last_known_reservation_state
lost
# chccwdev -d 0.0.7009
# chccwdev -e 0.0.7009
To find out the reservation state of a DASD issue a command of this form:
# cat /sys/bus/ccw/devices/<device_bus_id>/last_known_reservation_state
Example
The command in this example queries the reservation state of a DASD with bus ID
0.0.7009.
# cat /sys/bus/ccw/devices/0.0.7009/last_known_reservation_state
reserved
For an example of how to use PAV see How to Improve Performance with PAV,
SC33-8414 on developerWorks at
www.ibm.com/developerworks/linux/linux390/documentation_suse.html
See Reading and resetting the reservation state on page 140 for details.
online 1 if the DASD is online, 0 if it is offline (see Setting a DASD online or offline on
page 128).
raw_track_access 1 if the DASD is in raw-track access mode, 0 if it is in default access mode (see
Accessing full ECKD tracks on page 137).
readonly 1 if the DASD is read-only, 0 if it can be written to. This attribute is a device driver
setting and does not reflect any restrictions that are imposed by the device itself.
This attribute is ignored for PAV alias devices.
reservation_policy Shows the reservation policy of the DASD. Possible values are ignore and fail.
See Handling lost device reservations on page 139 for details.
There are some more attributes that are common to all CCW devices (see Device
attributes on page 9).
Example
The following sequence of commands reads the attributes for a DASD with a
device bus-ID 0.0.b100:
# cat /sys/bus/ccw/devices/0.0.b100/alias
0
# cat /sys/bus/ccw/devices/0.0.b100/discipline
ECKD
# cat /sys/bus/ccw/devices/0.0.b100/eer_enabled
0
# cat /sys/bus/ccw/devices/0.0.b100/erplog
0
# cat /sys/bus/ccw/devices/0.0.b100/expires
30
# cat /sys/bus/ccw/devices/0.0.b100/failfast
0
# cat /sys/bus/ccw/devices/0.0.b100/last_known_reservation_state
reserved
# cat /sys/bus/ccw/devices/0.0.b100/online
1
# cat /sys/bus/ccw/devices/0.0.b100/raw_track_access
0
# cat /sys/bus/ccw/devices/0.0.b100/readonly
1
# cat /sys/bus/ccw/devices/0.0.b100/reservation_policy
ignore
# cat /sys/bus/ccw/devices/0.0.b100/status
online
# cat /sys/bus/ccw/devices/0.0.b100/timeout
120
# cat /sys/bus/ccw/devices/0.0.b100/uid
IBM.75000000092461.e900.8a
# cat /sys/bus/ccw/devices/0.0.b100/use_diag
1
# cat /sys/bus/ccw/devices/0.0.b100/vendor
IBM
z Systems adapter hardware typically provides multiple channels, with one port
each. You can configure a channel to use the Fibre Channel Protocol (FCP). This
FCP channel is then virtualized into multiple FCP devices. Thus, an FCP device is a
virtual QDIO-based z Systems SCSI-over-Fibre Channel adapter with a single port.
Features
The zfcp device driver supports a wide range of SCSI devices, various hardware
adapters, specific topologies, and specific features that depend on the z Systems
hardware.
v Linux on z Systems can use various SAN-attached SCSI device types, including
SCSI disks, tapes, CD-ROMs, and DVDs. For a list of supported SCSI devices,
see
www.ibm.com/systems/z/connectivity
v SAN access through the following hardware adapters:
FICON Express16S (as of z13)
FICON Express8S
FICON Express8
FICON Express4
You can order hardware adapters as features for mainframe systems.
See Fibre Channel Protocol for Linux and z/VM on IBM System z, SG24-7266 for
more details about using FCP with Linux on z Systems.
v The zfcp device driver supports switched fabric and point-to-point topologies.
v As of zEnterprise, the zfcp device driver supports end-to-end data consistency
checking.
v As of FICON Express8S, the zfcp device driver supports the data router
hardware feature to improve performance by reducing the path length.
For information about SCSI-3, the Fibre Channel Protocol, and fiber channel related
information, see www.t10.org and www.t11.org
When Linux is booted, it senses the available FCP devices and creates directories of
the form:
/sys/bus/ccw/drivers/zfcp/<device_bus_id>
where <device_bus_id> is the device bus-ID that corresponds to an FCP device. You
use the attributes in this directory to work with the FCP device.
Example: /sys/bus/ccw/drivers/zfcp/0.0.3d0c
The zfcp device driver automatically adds port information when the FCP device is
set online and when remote storage ports (target ports) are added. Each added
target port extends this structure with a directory of the form:
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>
where <wwpn> is the worldwide port name (WWPN) of the target port. You use
the attributes of this directory to work with the port.
Example: /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562
With NPIV-enabled FCP devices, SUSE Linux Enterprise Server 12 SP2 uses
automatic LUN scanning by default. The zfcp sysfs branch ends with the target
Information about zfcp objects and their associated objects in the SCSI stack is
distributed over the sysfs tree. To ease the burden of collecting information about
zfcp devices, ports, units, and their associated SCSI stack objects, a command that
is called lszfcp is provided with s390-tools. See lszfcp - List zfcp devices on
page 609 for more details about the command.
See also Mapping the representations of SCSI devices in sysfs on page 170.
SCSI device names are assigned in the order in which the devices are detected. In a
typical SAN environment, this can mean a seemingly arbitrary mapping of names
to actual devices that can change between boots. Therefore, using standard device
nodes of the form /dev/<device_name> where <device_name> is the device name
that the SCSI stack assigns to a device, can be a challenge.
SUSE Linux Enterprise Server 12 SP2 provides udev to create device nodes for you.
Use the device nodes to identify the corresponding actual device.
Device nodes that are based on device names
udev creates device nodes that match the device names that are used by
the kernel. These standard device nodes have the form /dev/<name>.
The examples in this section use standard device nodes as assigned by the SCSI
stack. These nodes have the form /dev/sd<x> for entire disks and /dev/sd<x><n>
for partitions. In these node names <x> represents one or more letters and <n> is
an integer. See Documentation/devices.txt in the Linux source tree for more
information about the SCSI device naming scheme.
To help you identify a particular device, udev creates additional device nodes that
are based on the device's bus ID, the device label, and information about the file
system on the device. The file system information can be a universally unique
identifier (UUID) and, if available, the file system label.
| Device nodes that are based on bus IDs
| udev creates device nodes of the form
| /dev/disk/by-path/ccw-<device_bus_id>-fc-<wwpn>-lun-<lun>
| for the <n>th partition, where <wwpn> is the worldwide port number of
| the target port and <lun> is the logical unit number that represents the
| target SCSI device.
| Note: The format of these udev-created device nodes has changed and
| now matches the common code format. Device nodes of the prior form,
| ccw-<device_bus_id>-zfcp-<wwpn>:<lun> or ccw-<device_bus_id>-zfcp-
| <wwpn>:<lun>-part<n>, are no longer created.
Device nodes that are based on file system information
udev creates device nodes of the form
where <uuid> is a unique file-system identifier (UUID) for the file system
in a partition.
If a file system label was assigned, udev also creates a node of the form:
/dev/disk/by-label/<label>
There are no device nodes for the whole SCSI device that are based on file
system information.
Additional device nodes
/dev/disk/by-id contains additional device nodes for the SCSI device and
partitions, that are all based on a unique SCSI identifier generated by
querying the device.
Example
For a SCSI device that is assigned the device name sda, has two partitions labeled
boot and SWAP-sda2 respectively, a device bus-ID 0.0.3c1b (device number
0x3c1b), and a UUID 7eaf9c95-55ac-4e5e-8f18-065b313e63ca for the first and
b4a818c8-747c-40a2-bfa2-acaa3ef70ead for the second partition, udev creates the
following device nodes:
Path redundancy improves the availability of the LUNs. In Linux, you can set up
path redundancy with the device-mapper multipath tool. For information about
multipath devices and multipath partitions, see the chapter about multipathing in
How to use FC-attached SCSI devices with Linux on z Systems, SC33-8413.
udev creates device nodes for partitions automatically. For the SCSI disk /dev/sda,
the partition device nodes are called /dev/sda1, /dev/sda2, /dev/sda3, and so on.
Example
As shown in Figure 28 on page 150, the zfcp HBA API support includes a user
space library.
The zFCP HBA API library is part of SUSE Linux Enterprise Server 12 SP2. It is
available as software package libzfcphbaapi0, see Getting ready to run
applications on page 184.
The default method in SUSE Linux Enterprise Server 12 SP2 is for applications to
use the zFCP HBA API library. If you develop applications yourself, see
Developing applications on page 183.
In a Linux on z Systems environment, HBAs are usually virtualized and are shown
as FCP devices.
For information about setting up the HBA API support, see zfcp HBA API
support on page 183.
NPIV support can be configured on the SE per CHPID and LPAR for an FCP
channel. The zfcp device driver supports NPIV error messages and adapter
attributes. See Displaying FCP channel and device information on page 155 for
the Fibre Channel adapter attributes.
See also the chapter on NPIV in How to use FC-attached SCSI devices with Linux on z
Systems, SC33-8413.
The parameters are described in the context of the modprobe command. For details
about specifying kernel and module parameters, see Chapter 3, Kernel and
module parameters, on page 23.
allow_lun_scan=1 datarouter=1
modprobe zfcp
allow_lun_scan=<value> datarouter=0
port_scan_ratelimit=60000 port_scan_backoff=500
port_scan_ratelimit=<limit> port_scan_backoff=<delay>
no_auto_port_rescan=0 queue_depth=32
no_auto_port_rescan=1 queue_depth=<depth>
where:
allow_lun_scan=<value>
disables the automatic LUN scan for FCP devices that run in NPIV mode if set
to 0, n, or N. To enable the LUN scanning set the parameter to 1, y, or Y. When
Note: The hardware data routing feature becomes active only for FCP devices
that are based on adapter hardware with hardware data routing support.
dbflevel=<level>
sets the initial log level of the debug feature. The value is an integer in the
range 0 - 6, where greater numbers generate more detailed information. The
default is 3.
dbfsize=<pages>
specifies the number of pages to be used for the debug feature.
The debug feature is available for each FCP device and the following areas:
hba FCP device
san Storage Area Network
rec Error Recovery Process
scsi SCSI
pay Payloads for entries in the hba, san, rec, or scsi areas. The default is 8
pages.
The value that is given is used for all areas. The default for hba, san, rec, and
scsi is 4, that is, four pages are used for each area and FCP device. In the
following example the dbsfsize is increased to 6 pages:
zfcp.dbfsize=6
This results in six pages being used for each area and FCP device. The payload
is doubled to use 12 pages.
dif=<value>
turns on end-to-end data consistency checking if set to 1, y, or Y and off if set
to 0, n, or N. The default is 0.
port_scan_ratelimit=<limit>
sets the minimum delay, in milliseconds, between automatic port scans of your
Linux instance. The default value is 60000 milliseconds. To turn off the rate
limit, specify 0. Use this parameter to avoid frequent scans, while you still
ensure that a scan is conducted eventually.
port_scan_backoff=<delay>
sets additional random delay, in milliseconds, in which the port scans of your
Linux instance are spread. The default value is 500 milliseconds. To turn off the
random delay, specify 0. In an installation with multiple Linux instances, use
this attribute for every Linux instance to spread scans to avoid potential
multiple simultaneous scans.
no_auto_port_rescan=
turns the automatic port rescan feature off ( if set to 1, y, or Y) or on (if set to
0, n, or N). The default is 0. Automatic rescan is always run when an adapter
is set online and when user-triggered writes to the sysfs attribute port_rescan
occur.
queue_depth=<depth>
specifies the number of commands that can be issued simultaneously to a SCSI
device. The default is 32. The value that you set here is used as the default
queue depth for new SCSI devices. You can change the queue depth for each
SCSI device with the queue_depth sysfs attribute, see Setting the queue
depth on page 174.
device=<device_bus_id>, <wwpn>, <fcp_lun>
Attention: Use the procedure described here for dynamic testing of configuration
settings. For persistent configuration in a production system, use one of the
following options:
v Use the YaST GUI yast2 zfcp. If cio_ignore is enabled, you might need to free
blacklisted FCP devices before by using yast2 cio.
v Use the text-based interface yast zfcp. If cio_ignore is enabled, you might need
to free blacklisted FCP devices before by using yast cio.
v Use the command line, use zfcp_host_configure. It transparently frees the FCP
device given on the command line from cio_ignore.
See the section about IBM z Systems hard disk configuration in the SUSE Linux
Enterprise Server 12 SP2 Deployment Guide, and the procedure about configuring a
zFCP disk in SUSE Linux Enterprise Server 12 SP2 Administration Guide. The
command line tools described work not only inside the rescue environment but
also in a regularly installed Linux instance.
See Working with newly available devices on page 10 to avoid errors when you
work with devices that have become available to a running Linux instance.
Setting an FCP device online also automatically runs the scan for ports in the SAN
and waits for this port scan to complete.
To check if setting the FCP device online was successful, you can use a script that
first sets the FCP device online and after this operation completes checks if the
WWPN of a target port has appeared in sysfs.
When you set an FCP device offline, the port and LUN subdirectories are
preserved. Setting an FCP device offline in sysfs interrupts the communication
between Linux and the FCP channel. After a timeout has expired, the port and
LUN attributes indicate that the ports and LUNs are no longer accessible. The
transition of the FCP device to the offline state is synchronous, unless the device is
disconnected.
When the FCP device is set back online, the SCSI device names and minor
numbers are freshly assigned. The mapping of devices to names and numbers
might be different from what they were before the FCP device was set offline.
Procedure
There are two methods for setting an FCP device online or offline:
v Use the chccwdev command (see chccwdev - Set CCW device attributes on
page 492). This is the preferred method.
v Alternatively, you can write 1 to an FCP device's online attribute to set it online,
or 0 to set it offline.
Examples
v To set an FCP device with bus ID 0.0.3d0c online issue:
# chccwdev -e 0.0.3d0c
or
# echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/online
or
# echo 0 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/online
The FCP device must be online for the FCP channel information to be valid.
For the attributes availability, cmb_enable, and cutype, see Device attributes on
page 9. The status attribute is reserved.
Table 23. Relevant transport class attributes, fc_host attributes
Attribute Explanation
maxframe_size Maximum frame size of adapter.
node_name Worldwide node name (WWNN) of adapter.
permanent_port_name WWPN associated with the physical port of the FCP
channel.
port_id A unique ID (N_Port_ID) assigned by the fabric. In an NPIV
setup, each virtual port is assigned a different port_id.
port_name WWPN associated with the FCP device. If N_Port ID
Virtualization is not available, the WWPN of the physical
port (see permanent_port_name).
port_type The port type indicates the topology of the port.
serial_number The 32-byte serial number of the adapter hardware that
provides the FCP channel.
speed Speed of FC link.
supported_classes Supported FC service class.
Procedure
where:
<device_bus_id>
specifies an FCP device that corresponds to the FCP channel.
<attribute>
is one of the attributes in Table 21 on page 155 or Table 22 on page 155.
v To read attributes of the associated Fibre Channel host use:
where:
<host_name>
is the ID of the Fibre Channel host.
<attribute>
is one of the attributes in Table 23 on page 155.
v To read statistics attributes of the FCP channel associated with this Fibre
Channel host, use:
# cat /sys/class/fc_host/<host_name>/statistics/<attribute>
where:
<host_name>
is the ID of the Fibre Channel host.
<attribute>
is one of the attributes in Table 24 on page 156.
Examples
v In this example, information is displayed about an FCP channel that corresponds
to an FCP device with bus ID 0.0.3d0c:
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/hardware_version
0x00000000
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/lic_version
0x00009111
v Alternatively you can use lszfcp (see lszfcp - List zfcp devices on page 609) to
display attributes of an FCP channel:
Procedure
Perform these steps to find out the recovery status of an FCP device and, if
needed, start or restart recovery:
The value is 1 if recovery is under way and 0 otherwise. If the value is 0 for a
non-operational FCP device, recovery might have failed. Alternatively, the
device driver might have failed to detect that the FCP device is malfunctioning.
2. To find out whether recovery failed, read the failed attribute. Issue a
command of this form:
# cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/failed
Example
In the following example, an FCP device with a device bus-ID 0.0.3d0c is
malfunctioning. The first command reveals that recovery is not already under way.
The second command manually starts recovery for the FCP device:
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/in_recovery
0
# echo 0 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/failed
Procedure
Tip: You can use lszfcp (see lszfcp - List zfcp devices on page 609) to list the
FCP device attributes.
The port_type attribute directly indicates that NPIV is used. The example also
shows that permanent_port_name is different from port_name and neither is NULL.
The example also shows the symbolic_name attribute that shows the symbolic port
name that was registered on the FC name server.
The log entries are available through the SE Console Actions Work Area with the
View Console Logs function. In the list of logs, these entries have the prefix 1F00.
The content of the entries is intended for support specialists.
The zfcp device driver automatically adds port information to sysfs when:
v The FCP device is set online
v Target ports are added to the Fibre Channel fabric, unless the module parameter
no_auto_port_rescan is set to 1. See Setting up the zfcp device driver on page
151.
Scanning for ports might take some time to complete. Commands that you issue
against ports or LUNs while scanning is in progress are delayed and processed
when port scanning is completed.
Use the port_rescan attribute if a remote storage port was accidentally deleted
from the adapter configuration or if you are unsure whether all ports were added
to sysfs.
Procedure
where <device_bus_id> specifies the FCP device through which the target ports are
attached.
Example
In this example, a port with WWPN 0x500507630303c562 is already configured for
an FCP device with bus ID 0.0.3d0c. An additional target port with WWPN
0x500507630300c562 is automatically configured by triggering a port scan.
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630303c562
# echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/port_rescan
# ls /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x*
0x500507630303c562
0x500507630300c562
If needed, you can fine-tune the frequency and timing of automatic port scans with
the zfcp parameters port_scan_backoff and port_scan_ratelimit.
You can enable automatic port scanning with the zfcp parameter
no_auto_port_rescan=0. This value is the default.
In a large installation, where many Linux instances receive the same notifications
of SAN changes, multiple instances might trigger scans simultaneously and too
Chapter 10. SCSI-over-Fibre Channel 161
frequently. See Figure 29
These scans might put unnecessary load on the name server function of fabric
switches and potentially result in late or inconclusive results.
You can avoid excessive scanning, yet still ensure that a port scan is eventually
conducted. You can control port scanning with the zfcp parameters:
port_scan_ratelimit
sets the minimum delay, in milliseconds, between automatic port scans of
your Linux instance. The default value is 60000 milliseconds. To turn off
the rate limit, specify 0.
port_scan_backoff
sets an additional random delay, in milliseconds, in which the port scans of
your Linux instance are spread. In an installation with multiple Linux
instances, use this zfcp parameter for every Linux instance to spread scans
to avoid potential multiple simultaneous scans. The default value is 500
milliseconds. To turn off the random delay, specify 0.
Use module parameters to set values for port scanning. See Setting up the zfcp
device driver on page 151 for zfcp attributes. On a running Linux system, you can
also query or set these values by using the sysfs attributes with the same names.
However, if the rate limit is set to the same value, the scans can still occur almost
simultaneously, as for FCP device A and B in Linux 1.
Figure 31. Port scan behavior with backoff and scan rate limit.
Procedure
v To further spread scans over a certain time and thus avoid multiple
simultaneous scans, set the port_scan_backoff sysfs attribute. By default,
port_scan_backoff is turned on and has a value of 500 milliseconds. For
example, to query the setting, issue a command of this form:
# cat /sys/module/zfcp/parameters/port_scan_backoff
500
Results
The automatic port scans are delayed by the values specified. If a SAN notification
is received during the rate limit time, a port scan is conducted immediately after
the delay time passed.
Depending on the port event, one or more of the three zfcp parameters are
evaluated to schedule a port scan. For example, port scans that are triggered
manually through sysfs are not delayed. Table 25 on page 164 shows which events
evaluate which zfcp parameters.
Procedure
where:
where:
<rport_name>
is the name of the target port.
<attribute>
is one of the attributes in Table 27 on page 164.
Tip: With the HBA API package installed, you can also use the zfcp_ping and
zfcp_show commands to find out more about your ports. See Tools for
investigating your SAN configuration on page 185.
Examples
v In this example, information is displayed for a target port 0x500507630300c562
that is attached through an FCP device with bus ID 0.0.3d0c:
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/in_recovery
0
v To display transport class attributes of a target port you can use lszfcp:
# lszfcp -p 0x500507630300c562 -a
0.0.3d0c/0x500507630300c562 rport-0:0-0
...
Class = "fc_remote_ports"
active_fc4s = "0x00 0x00 0x01 ...
dev_loss_tmo = "60"
fast_io_fail_tmo = "off"
maxframe_size = "2048 bytes"
node_name = "0x5005076303ffc562"
port_id = "0x652113"
port_name = "0x500507630300c562"
port_state = "Online"
roles = "FCP Target"
scsi_target_id = "0"
supported_classes = "Class 2, Class 3"
...
Perform these steps to find out the recovery status of a port and, if needed, start or
restart recovery:
1. Issue a command of this form:
# cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/in_recovery
where:
<device_bus_id>
specifies the FCP device.
<wwpn>
is the WWPN of the target port.
The value is 1 if recovery is under way, and 0 otherwise. If the value is 0 for a
non-operational port, recovery might have failed, or the device driver might
have failed to detect that the port is malfunctioning.
2. To find out whether recovery failed, read the failed attribute. Issue a
command of this form:
# cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/failed
Example
Removing ports
Removing unused ports can save FCP channel resources. Additionally setting the
no_auto_port_rescan attribute avoids unnecessary attempts to recover unused
remote ports.
Note: The next port scan will attach all available ports, including any previously
removed ports. To prevent removed ports from being reattached automatically, use
zoning or the no_auto_port_rescan module parameter, see Setting up the zfcp
device driver on page 151.
Procedure
where:
<device_bus_id>
specifies the FCP device.
<wwpn>
is the WWPN of the port to be removed.
Example
For each FCP device that uses NPIV mode and if you did not disable automatic
LUN scanning (see Setting up the zfcp device driver on page 151), the LUNs are
configured for you. In this case, no FCP LUN entries are created under
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>.
To find out whether an FCP device is using NPIV mode, check the port_type
attribute, for example:
# cat /sys/bus/ccw/drivers/zfcp/0.0.1901/host0/fc_host/host0/port_type
NPIV VPORT
To find out whether automatic LUN scanning is enabled, check the current setting
of the module parameter zfcp.allow_lun_scan. The example below shows
automatic LUN scanning as turned on.
# cat /sys/module/zfcp/parameters/allow_lun_scan
Y
What to do next
To check whether a SCSI device is registered, check for a directory with the name
of the LUN in /sys/bus/scsi/devices. If there is no SCSI device for this LUN, the
LUN is not valid in the storage system, or the FCP device is offline in Linux.
Procedure
If your FCP device does not use NPIV mode, or if you have disabled automatic
LUN scanning, proceed as follows:
To configure a SCSI device for a target port, write the device's LUN to the port's
unit_add attribute. Issue a command of this form:
# echo <fcp_lun> > /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/unit_add
where:
<fcp_lun>
is the LUN of the SCSI device to be configured. The LUN is a 16 digit
hexadecimal value padded with zeros, for example 0x4010403300000000.
<device_bus_id>
specifies the FCP device.
<wwpn>
is the WWPN of the target port.
Example
What to do next
To check whether a SCSI device is registered for the configured LUN, check for a
directory with the name of the LUN in /sys/bus/scsi/devices. If there is no SCSI
device for this LUN, the LUN is not valid in the storage system, or the FCP device
is offline in Linux.
To see which LUNs are currently configured for the port, list the contents of
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>.
where:
<scsi_host_no>
is the SCSI host number that corresponds to the FCP device.
<scsi_id>
is the SCSI ID of the target port.
<scsi_lun>
is the LUN of the SCSI device.
The values for <scsi_id> and <scsi_lun> depend on the storage device. Often, they
are single-digit numbers but for some storage devices they have numerous digits.
For manually configured FCP LUNs, see Manually configured FCP LUNs and
their SCSI devices on page 168 for details about the directory in the zfcp branch.
Figure 32 on page 171 shows how the directory name is composed in the sysfs
SCSI branch. The sysfs zfcp branch only exists for manually configured FCP LUNs.
For manually configured FCP LUNs, the directory name is composed of attributes
of consecutive directories and you can find the name of the directory in the sysfs
SCSI branch by reading the corresponding attributes in the zfcp branch.
The hba_id, wwpn, and fcp_lun attributes of the SCSI device in the SCSI branch
match the names of the <device_bus_id>, <wwpn> and <fcp_lun> directories for the
same SCSI device in the zfcp branch.
Procedure
Use lszfcp (see lszfcp - List zfcp devices on page 609) to map the two
representations of a SCSI device.
Example
This example shows how to use lszfcp to display the name of the SCSI device that
corresponds to a zfcp unit, for example:
# lszfcp -l 0x4010403200000000
0.0.3d0c/0x500507630300c562/0x4010403200000000 0:0:0:0
In the example, the output informs you that the unit with the LUN
0x4010403200000000, which is configured on a port with the WWPN
0x500507630300c562 for an FCP device with bus ID 0.0.3d0c, maps to SCSI device
"0:0:0:0".
Table 28 on page 172 summarizes the read-only attributes for manually configured
FCP LUNs, including those attributes that indicate whether the device access is
restricted by access control software on the FCP channel. These attributes can be
found in the zfcp branch of sysfs. The path has the form:
/sys/bus/ccw/drivers/zfcp/<device_bus_id>/<wwpn>/<fcp_lun>/<attribute>
Table 29 lists further read-only attributes with information about the SCSI device.
These attributes can be found in the SCSI branch of sysfs. The path has the form:
/sys/class/scsi_device/<device_name>/device/<attribute>
Procedure
where:
<device_bus_id>
specifies the FCP device.
<wwpn>
is the WWPN of the target port.
<fcp_lun>
is the FCP LUN of the SCSI device.
<attribute>
is one of the attributes in Table 28 on page 172.
Use the lszfcp command (see lszfcp - List zfcp devices on page 609) to display
information about the associated SCSI device.
Alternatively, you can use sysfs to read the information. To read attributes of the
associated SCSI device, use a command of this form:
# cat /sys/class/scsi_device/<device_name>/device/<attribute>
where:
<device_name>
is the name of the associated SCSI device.
<attribute>
is one of the attributes in Table 29 on page 172.
Tip: For SCSI tape devices, you can display a summary of this information by
using the lstape command (see lstape - List tape devices on page 597).
Examples
v In this example, information is displayed for a manually configured FCP LUN
with LUN 0x4010403200000000 that is accessed through a target port with
WWPN 0x500507630300c562 and is attached through an FCP device 0.0.3d0c. For
the device, access is permitted.
# cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/0x4010403200000000/access_denied
0
For the device to be accessible, the access_denied attribute of the target port,
0x500507630300c562, must also be 0 (see Displaying port information on page
164).
v You can use lszfcp to display attributes of a SCSI device:
Check the documentation of the storage server used or contact your storage server
support group to establish if there is a need to change this setting.
The value of the queue_depth kernel parameter (see Setting up the zfcp device
driver on page 151) is used as the default queue depth of new SCSI devices. You
can query the queue depth by issuing a command of this form:
# cat /sys/bus/scsi/devices/<SCSI device>/queue_depth
Example:
# cat /sys/bus/scsi/devices/0:0:19:1086537744/queue_depth
16
You can change the queue depth of each SCSI device by writing to the
queue_depth attribute, for example:
# echo 8 > /sys/bus/scsi/devices/0:0:19:1086537744/queue_depth
# cat /sys/bus/scsi/devices/0:0:19:1086537744/queue_depth
8
Linux forwards SCSI commands to the storage server until the number of pending
commands exceeds the queue depth. If the server lacks the resources to process a
SCSI command, Linux queues the command for a later retry and decreases the
queue depth counter. Linux then waits for a defined ramp-up period. If no
indications of resource problems occur within this period, Linux increases the
queue depth counter until reaching the previously set maximum value. To query
the current value for the queue ramp-up period in milliseconds:
# cat /sys/bus/scsi/devices/0:0:13:1086537744/queue_ramp_up_period
120000
Procedure
Perform the following steps to check the recovery status of a failed SCSI device:
1. Check the value of the zfcp_in_recovery attribute. Issue the lszfcp command:
# lszfcp -l <LUN> -a
The value is 1 if recovery is under way and 0 otherwise. If the value is 0 for a
non-operational SCSI device, recovery might have failed. Alternatively, the
device driver might have failed to detect that the SCSI device is
malfunctioning.
2. To find out whether recovery failed, read the zfcp_failed attribute. Either use
the lszfcp command again, or issue a command of this form:
# cat /sys/class/scsi_device/<device_name>/device/zfcp_failed
Example
In the following example, SCSI device 0:0:0:0 is malfunctioning. The first command
reveals that recovery is not already under way. The second command manually
starts recovery for the SCSI device:
# cat /sys/class/scsi_device/0:0:0:0/device/zfcp_in_recovery
0
# echo 0 > /sys/class/scsi_device/0:0:0:0/device/zfcp_failed
What to do next
If you manually configured an FCP LUN (see Manually configured FCP LUNs
and their SCSI devices on page 168), but did not get a corresponding SCSI device,
you can also use the corresponding FCP LUN sysfs attributes, in_recovery and
failed, to check on recovery. See Table 28 on page 172.
The initial information about the available SCSI devices is discovered automatically
when LUNs first become available.
Procedure
To update the information about a SCSI device issue a command of this form:
# echo <string> > /sys/bus/scsi/devices/<scsi_host_no>:0:<scsi_id>:<scsi_lun>/rescan
where <string> is any alphanumeric string and the other variables have the same
meaning as in Mapping the representations of SCSI devices in sysfs on page 170.
Example
There is a timeout for SCSI commands. If the timeout expires before a SCSI
command completes, error recovery starts. The default timeout is 30 seconds.
To find out the current timeout, read the timeout attribute of the SCSI device:
# cat /sys/bus/scsi/devices/<scsi_host_no>:0:<scsi_id>:<scsi_lun>/timeout
where the variables have the same meaning as in Mapping the representations of
SCSI devices in sysfs on page 170.
Procedure
Example
To find out the current state of the device, read the state attribute:
# cat /sys/bus/scsi/devices/<scsi_host_no>:0:<scsi_id>:<scsi_lun>/state
Procedure
To set an offline device online again, write running to the state attribute.
Example
In the following example, SCSI device 1:0:18:1086537744 is offline and is then set
online again:
# cat /sys/bus/scsi/devices/1:0:18:1086537744/state
offline
# echo running > /sys/bus/scsi/devices/1:0:18:1086537744/state
See Mapping the representations of SCSI devices in sysfs on page 170 about how
to find this directory.
Note: These steps delete the SCSI device only temporarily, until the next automatic
or user triggered Linux SCSI target scan. The scan automatically adds the SCSI
Procedure
Example
For details about disabling automatic LUN scan, see Setting up the zfcp device
driver on page 151.
Procedure
Follow these steps to remove a manually configured FCP LUN and its SCSI device:
1. Optional: To manually unregister the SCSI device, write 1 to the delete
attribute of the directory that represents the device in the sysfs SCSI branch.
See Mapping the representations of SCSI devices in sysfs on page 170 for
information about how to find this directory. Issue a command of this form:
# echo 1 > /sys/bus/scsi/devices/<device>/delete
where:
<fcp_lun>
is the LUN of the SCSI device to be configured. The LUN is a 16 digit
hexadecimal value padded with zeros, for example
0x4010403300000000.
<device_bus_id>
specifies the FCP device.
<wwpn>
is the WWPN of the target port.
Example
2. Remove the device (if not done in previous step) and the LUN:
# echo 0x4010403200000000 > /sys/bus/ccw/drivers/zfcp/0.0.3d0c/0x500507630300c562/unit_remove
End-to-end data consistency checking is based on a data integrity field (DIF) that is
added to transferred data blocks. DIF data is used to confirm that a data block
originates from the expected source and was not modified during the transfer
between the storage system and the FCP device. The SCSI standard defines several
types of DIF. Data integrity extension (DIX) builds on DIF to extend consistency
checking, for example, to the operating system, middleware, or an application.
If the zfcp device driver is loaded with the dif=1 module parameter, Linux
automatically discovers which FCP devices and which SCSI devices support
end-to-end data consistency checking. No further setup is required.
Note: SCSI devices for which end-to-end data consistency checking is enabled
must be accessed with direct I/O. Direct I/O requires direct access through the
block device or through a file system that fully supports end-to-end data
consistency checking. For example, XFS provides this support. Expect error
messages about invalid checksums when you use other access methods.
For SCSI devices for which end-to-end data consistency checking is used, there is a
sysfs directory
/sys/block/sd<x>/integrity
Read the prot_capabilities sysfs attribute of the SCSI host that is associated with
an FCP device to find out about its end-to-end data consistency checking support.
The following values are possible:
0 The FCP device does not support end-to-end data consistency checking.
1 The FCP device supports DIF type 1.
16 The FCP device supports DIX type 1.
17 The FCP device supports DIX type 1 with DIF type 1.
Procedure
where <device_bus_id> identifies the FCP device and <n> is an integer that
identifies the corresponding SCSI host.
Example
# cat /sys/bus/ccw/devices/0.0.1940/host0/scsi_host/host0/prot_capabilities
17
Alternatively to this procedure, you can use one of the following options to
discover FCP devices, remote ports, and available LUNs:
v The YaST GUI yast2 zfcp
v The text-based interface yast zfcp
v The command-line tool zfcp_san_disc (does not list FCP devices)
See the section about IBM z Systems hard disk configuration in the SUSE Linux
Enterprise Server 12 SP2 Deployment Guide.
Procedure
1. Check for available FCP devices of type 1732/03:
# lscss -t 1732/03
Device Subchan. DevType CU Type Use PIM PAM POM CHPIDs
----------------------------------------------------------------------
0.0.3c02 0.0.0015 1732/03 1731/03 80 80 ff 36000000 00000000
A port scan is performed automatically when the FCP device is set online.
3. Optional: Confirm that the FCP device is available and online:
# lszfcp -b 0.0.3c02 -a
0.0.3c02 host0
Bus = "ccw"
availability = "good"
...
failed = "0"
...
in_recovery = "0"
...
online = "1"
...
Developing applications
To develop applications, you must install the development version of the SNIA
HBA API provided by the libHBAAPI2-devel RPM, link your application against
the library, and load the library.
Procedure
1. Install the development RPM for the SNIA HBA API. Use, for example, zypper:
# zypper install libHBAAPI2-devel
Functions provided
The zfcp HBA API implements Fibre Channel - HBA API (FC-HBA) functions as
defined in the FC-HBA specification.
You can find the FC-HBA specification at www.t11.org. The following functions are
available:
v HBA_CloseAdapter()
v HBA_FreeLibrary()
v HBA_GetAdapterAttributes()
v HBA_GetAdapterName()
v HBA_GetAdapterPortAttributes()
v HBA_GetDiscoveredPortAttributes()
v HBA_GetEventBuffer()
v HBA_GetFcpTargetMapping()
v HBA_GetFcpTargetMappingV2()
v HBA_GetNumberOfAdapters()
v HBA_GetRNIDMgmtInfo()
v HBA_GetVersion()
v HBA_LoadLibrary()
Note: zFCP HBA API for Linux 3.12 can access only FCP devices, ports, and units
that are configured in the operating system.
To use the HBA API support, you need the following packages:
v The zFCP HBA API library RPM, libzfcphbaapi0
v The SNIA HBA API library RPM, libHBAAPI2
The application must be developed to use the SNIA HBA API library, see
Developing applications on page 183.
Procedure
2. Ensure that the /etc/hba.conf file exists and contains a line of the form:
<library name> <library pathname>
For example:
com.ibm.libzfcphbaapi /usr/lib64/libzfcphbaapi.so.0
What to do next
You can use the zfcp_ping and zfcp_show commands to investigate your SAN
configuration.
See How to use FC-attached SCSI devices with Linux on z Systems, SC33-8413 for
details.
Each increment is available for use through a device node as a block device. You
can use the block device with standard Linux tools as you would use any other
block device. Commonly used tools that work with block devices include: fdisk,
mkfs, and mount.
Storage-class memory is useful for workloads with large write operations, that is,
with a block size of 256 KB or more of data. Write operations with a block size of
less than 256 KB of data might not perform optimally. Read operations can be of
any size.
The device driver uses a device name of the form /dev/scm<x> for an entire block
device. In the name, <x> is one or two lowercase letters.
You can partition a block device into up to seven partitions. If you use partitions,
the device driver numbers them from 1 - 7. The partitions then have device nodes
of the form /dev/scm<x><n>, where <n> is a number in the range 1 - 7, for
example /dev/scma1.
The following example shows two block devices, scma and scmb, where scma has
one partition, scma1.
# lsblk
NAME MAJ:MIN RM SIZE RO MOUNTPOINT
scma 252:0 0 16G 0
`-scma1 252:1 0 16G 0
scmb 252:8 0 16G 0
Be sure to load the scm_block before you check for the device node.
nr_requests=64 write_cluster_size=64
modprobe scm_block
nr_requests=<num> write_cluster_size=<num>
| nr_request_per_io=8
nr_request_per_io=<num>
where
nr_requests
specifies the number of parallel I/O requests. Set this number to the number of
EADM subchannels. The default is 64.
write_cluster_size
specifies the number of pages that are used by the read-modify-write
algorithm. The default is 64, resulting in that all write requests smaller than
256 KiB are translated to 256 KiB writes. 1 KiB is 1024 bytes.
| nr_request_per_io
| submits more concurrent I/O requests than the current limit, which is based
| on the number of available EADM subchannels (64). Valid values are in the
| range 1 to 64. Increasing the requests increases the number of I/O requests per
| second, especially for requests with a small block size. The default number of
| requests is 8. Depending on the workload, this setting might improve the
| throughput of the scm_block driver.
The extended asynchronous data mover (EADM) subchannels are used to transfer
data to and from the storage-class memory. At least one EADM subchannel must
be available to the LPAR.
Procedure
To list EADM subchannels, issue:
# lscss --eadm
Device Subchan.
-----------------
n/a 0.0.ff00
n/a 0.0.ff01
n/a 0.0.ff02
n/a 0.0.ff03
n/a 0.0.ff04
n/a 0.0.ff05
n/a 0.0.ff06
n/a 0.0.ff07
For more information about the lscss command, see lscss - List subchannels on
page 580.
You can also use the lsblk command to list all block devices.
Procedure
To list all storage-class memory increments, their status, and attributes, issue:
# lsscm
SCM Increment Size Name Rank D_state O_state Pers ResID
--------------------------------------------------------------
0000000000000000 16384MB scma 1 2 1 2 1
0000000400000000 16384MB scmb 1 2 1 2 1
See lsscm - List storage-class memory increments on page 594 for details about
the lsscm command.
Configure SCM as any other block devices in LVM. If your version of LVM does
not accept SCM devices as valid LVM device types and issues an error message,
add the SCM devices to the LVM configuration file /etc/lvm/lvm.conf. Add the
following line to the section labeled devices:
types = [ "scm", 8 ]
SCSI tape devices that are attached through an FCP channel are handled by the
zfcp device driver (see Chapter 10, SCSI-over-Fibre Channel device driver, on
page 145).
Features
The tape device driver supports a range of channel-attached tape devices and
functions of these devices.
v The tape device driver supports channel-attached tape drives that are compatible
with IBM 3480, 3490, 3590, and 3592 magnetic tape subsystems. Various models
of these device types are handled (for example, the 3490/10).
3592 devices that emulate 3590 devices are recognized and treated as 3590
devices.
v Logical character devices for non-rewinding and rewinding modes of operation
(see Tape device modes and logical devices).
v Control operations through mt (see Using the mt command on page 193)
v Message display support (see tape390_display - display messages on tape
devices and load tapes on page 645)
v Encryption support (see tape390_crypt - Manage tape encryption on page 641)
v Up to 128 physical tape devices
In non-rewinding mode, the tape remains at the current position when the device
is closed. In rewinding mode, the tape is rewound when the device is closed. The
tape device driver treats each mode as a separate logical device.
Both modes provide sequential (traditional) tape access without any caching done
in the kernel.
You can use a channel-attached tape device in the same way as any other Linux
tape device. You can write to it and read from it using standard Linux facilities
such as GNU tar. You can perform control operations (such as rewinding the tape
or skipping a file) with the standard tool mt.
where <n> is the index number that is assigned by the device driver. The index
starts from 0 for the first physical tape device, 1 for the second, and so on. The
name space is restricted to 128 physical tape devices, so the maximum index
number is 127 for the 128th physical tape device.
The index number and corresponding minor numbers and device names are not
permanently associated with a specific physical tape device. When a tape device
goes offline, it surrenders its index number. The device driver assigns the lowest
free index number when a physical tape device comes online. An index number
with its corresponding device names and minor numbers can be reassigned to
different physical tape devices as devices go offline and come online.
Tip: Use the lstape command (see lstape - List tape devices on page 597) to
determine the current mapping of index numbers to physical tape devices.
When the tape device driver is loaded, it dynamically allocates a major number to
channel-attached character tape devices. A different major number might be used
when the device driver is reloaded, for example when Linux is rebooted.
For online tape devices, directories provide information about the major/minor
assignments. The directories have the form:
v /sys/class/tape390/ntibm<n>
v /sys/class/tape390/rtibm<n>
Each of these directories has a dev attribute. The value of the dev attribute has the
form <major>:<minor>, where <major> is the major number for the device and
<minor> is the minor number specific to the logical device.
Example
In this example, four physical tape devices are present, with three of them online.
The TapeNo column shows the index number and the BusID column indicates the
associated physical tape device. In the example, no index number is allocated to
the tape device in the last row. The device is offline and, currently, no names and
minor numbers are assigned to it.
# lstape --ccw-only
TapeNo BusID CuType/Model DevType/DevMod BlkSize State Op MedState
0 0.0.01a1 3490/10 3490/40 auto UNUSED --- UNLOADED
1 0.0.01a0 3480/01 3480/04 auto UNUSED --- UNLOADED
2 0.0.0172 3590/50 3590/11 auto IN_USE --- LOADED
N/A 0.0.01ac 3490/10 3490/40 N/A OFFLINE --- N/A
Table 31 on page 193 summarizes the resulting names and minor numbers.
For the online devices, the major/minor assignments can be read from their
respective representations in /sys/class:
# cat /sys/class/tape390/ntibm0/dev
254:0
# cat /sys/class/tape390/rtibm0/dev
254:1
# cat /sys/class/tape390/ntibm1/dev
254:2
# cat /sys/class/tape390/rtibm1/dev
254:3
# cat /sys/class/tape390/ntibm2/dev
254:4
# cat /sys/class/tape390/rtibm2/dev
254:5
In the example, the major number is 254. The minor numbers are as expected for
the respective device names.
The device nodes have the form /dev/<name>, where <name> is the device name
according to Tape naming scheme on page 192.
For example, if you have two tape devices, udev creates the device nodes that are
shown in Table 32:
Table 32. Tape device nodes
Node for non-rewind device rewind device
First tape device /dev/ntibm0 /dev/rtibm0
Second tape device /dev/ntibm1 /dev/rtibm1
The mt command handles basic tape control in Linux. See the man page for general
information about mt.
You can also load the modules with the modprobe command.
modprobe tape_34xx
tape_3590
For information about working with the channel measurement facility, see
Chapter 44, Channel measurement facility, on page 455.
For information about displaying messages on a tape device's display unit, see
tape390_display - display messages on tape devices and load tapes on page 645.
Setting a physical tape device online makes both corresponding logical devices
accessible:
v The non-rewind character device
v The rewind character device
At any time, the device can be online to a single Linux instance only. You must set
the tape device offline to make it accessible to other Linux instances in a shared
environment.
Procedure
Use the chccwdev command (see chccwdev - Set CCW device attributes on page
492) to set a tape online or offline.
Alternatively, you can write 1 to the online attribute of the device to set it online;
or write 0 to set it offline.
Results
When a physical tape device is set online, the device driver assigns an index
number to it. This index number is used in the standard device nodes (see Tape
device nodes on page 193) to identify the corresponding logical devices. The
index number is in the range 0 - 127. A maximum of 128 physical tape devices can
be online concurrently.
If you are using the standard device nodes, you must find out the index number
that the tape device driver assigned to your tape device. This index number, and
consequently the associated standard device node, can change after a tape device
was set offline and back online.
If you need to know the index number, issue a command of this form:
# lstape --ccw-only <device_bus_id>
where <device_bus_id> is the device bus-ID that corresponds to the physical tape
device. The index number is the value in the TapeNo column of the command
output. For more information about the lstape command, see lstape - List tape
devices on page 597.
or
# echo 1 > /sys/bus/ccw/devices/0.0.015f/online
To find the index number that the tape device driver assigned to the device,
issue:
# lstape 0.0.015f --ccw-only
TapeNo BusID CuType/Model DevType/Model BlkSize State Op MedState
2 0.0.015f 3480/01 3480/04 auto UNUSED --- LOADED
In the example, the assigned index number is 2. The standard device nodes for
working with the device until it is set offline are then:
/dev/ntibm2 for the non-rewinding device
/dev/rtibm2 for the rewinding device
v To set a physical tape device with device bus-ID 0.0.015f offline, issue:
# chccwdev -d 0.0.015f
or
# echo 0 > /sys/bus/ccw/devices/0.0.015f/online
Alternatively, you can read tape information from sysfs. Each physical tape device
is represented in a sysfs directory of the form
/sys/bus/ccw/devices/<device_bus_id>
where <device_bus_id> is the device bus-ID that corresponds to the physical tape
device. This directory contains a number of attributes with information about the
physical device. The attributes: blocksize, state, operation, and medium_state,
might not show the current values if the device is offline.
Table 33. Tape device attributes
Attribute Explanation
online 1 if the device is online or 0 if it is offline (see Setting a tape
device online or offline on page 195)
cmb_enable 1 if channel measurement block is enabled for the physical
device or 0 if it is not enabled (see Chapter 44, Channel
measurement facility, on page 455)
cutype Type and model of the control unit
devtype Type and model of the physical tape device
Procedure
Example
The following lstape command displays information about a tape device with bus
ID 0.0.015f:
# lstape 0.0.015f --ccw-only
TapeNo BusID CuType/Model DevType/Model BlkSize State Op MedState
2 0.0.015f 3480/01 3480/04 auto UNUSED --- LOADED
Enabling compression
Control Improved Data Recording Capability (IDRC) compression with the mt
command provided by the RPM mt_st.
Procedure
or
# mt -f <node> compression 1
where <node> is the device node for a character device, for example, /dev/ntibm0.
To disable compression, issue:
# mt -f <tape> compression 0
Any other numeric value has no effect, and any other argument disables
compression.
Example
To enable compression for a tape device with a device node /dev/ntibm0 issue:
# mt -f /dev/ntibm0 compression 1
Example
To expel a tape from a tape device that can be accessed through a device node
/dev/ntibm0, issue:
# mt -f /dev/ntibm0 unload
Assuming that the stacker mode of the tape device is system and that a tape is
present in the stacker, you can load a new tape by issuing:
# tape390_display -l "NEW TAPE" /dev/ntibm0
NEW TAPE is a message that is displayed on the tape devices display unit until
the tape device receives the next tape movement command.
Expanded storage can be swapped in or out of the main storage in 4 KB blocks. All
XPRAM devices provide a block size of 4096 bytes.
XPRAM features
The XPRAM device driver automatically detects expanded storage and supports
expanded storage partitions.
v If expanded storage is not available, XPRAM fails gracefully with a log message
that reports the absence of expanded storage.
v The expanded storage can be divided into up to 32 partitions.
You can use the entire available expanded storage as a single XPRAM device or
divide it into up to 32 partitions. Each partition is treated as a separate XPRAM
device.
If the entire expanded storage is used a single device, the device name is slram0.
For partitioned expanded storage, the <n> in the device name denotes the (n+1)th
partition. For example, the first partition is called slram0, the second slram1, and
the 32nd partition is called slram31.
Table 34. XPRAM device names, minor numbers, and partitions
Minor Name To access
0 slram0 the first partition or the entire expanded storage if there are no
partitions
1 slram1 the second partition
2 slram2 the third partition
... ... ...
<n> slram<n> the (<n>+1)th partition
... ... ...
31 slram31 the 32nd partition
The device nodes that you need to access these partitions are created by udev
when you load the XPRAM device driver module. The nodes are of the form
Issuing an IPL command to reboot Linux does not reset expanded storage.
Expanded storage is persistent across IPLs and can be used, for example, to store
diagnostic information. The expanded storage is reset when the z/VM guest
virtual machine is logged off or when the LPAR is deactivated.
For file systems or swap devices to be reusable, the XPRAM kernel or module
parameters for the new device or partition must match the parameters of the
previous use of XPRAM.
If you change the XPRAM parameters, you must create a new file system or a new
swap device for each changed partition. A device or partition is considered
changed if its size has changed. All partitions that follow a changed partition are
also considered changed even if their sizes are unchanged.
You can optionally partition the available expanded storage by using the devs and
sizes module parameters when you load the xpram module.
modprobe xpram
devs=<number_of_partitions>
,
sizes= <partition_size>
where:
<number_of_partitions>
is an integer in the range 1 - 32 that defines how many partitions the expanded
storage is split into.
<partition_size>
specifies the size of a partition. The i-th value defines the size of the i-th
partition.
Any partition that is defined with a non-zero size is allocated the amount of
memory that is specified by its size parameter.
Examples
v The following specification allocates the extended storage into four partitions.
Partition 1 has 2 GB (2097152 KB), partition 4 has 4 GB (4194304 KB), and
partitions 2 and 3 use equal parts of the remaining storage. If the total amount
of extended storage was 16 GB, then partitions 3 and 4 would each have
approximately 5 GB.
# modprobe xpram devs=4 sizes=2097152,0,0,4194304
v The following specification allocates the extended storage into three partitions.
The partition 2 has 512 KB and the partitions 1 and 3 use equal parts of the
remaining extended storage.
# modprobe xpram devs=3 sizes=,512
v The following specification allocates the extended storage into two partitions of
equal size.
# modprobe xpram devs=2
Chapter 15. OSA-Express SNMP subagent Chapter 19. AF_IUCV address family support 315
support . . . . . . . . . . . . . . . 277 Features . . . . . . . . . . . . . . . 315
What you should know about osasnmpd . . . . 277 Setting up the AF_IUCV address family support 316
Setting up osasnmpd . . . . . . . . . . . 278 Addressing AF_IUCV sockets in applications . . . 317
Working with the osasnmpd subagent . . . . . 282
Chapter 20. RDMA over Converged Ethernet 319
Chapter 16. LAN channel station device driver 287 Working with the RoCE support . . . . . . . 319
What you should know about LCS . . . . . . 287 Enabling debugging . . . . . . . . . . . 319
Setting up the LCS device driver . . . . . . . 288
There are several z Systems specific network device drivers for SUSE Linux
Enterprise Server 12 SP2 for z Systems.
Newest version
You can find the newest version of this publication on IBM Knowledge Center at
www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_suse.html
Restrictions
Example
An example network setup that uses some available network setup types is shown
in Figure 33 on page 206.
In the example there are three Linux instances; two of them run as z/VM guests in
one LPAR and a third Linux instance runs in another LPAR. Within z/VM, Linux
instances can be connected through a guest LAN or VSWITCH. Within and
between LPARs, you can connect Linux instances through HiperSockets.
OSA-Express cards running in either non-QDIO mode (called LCS here) or in
QDIO mode can connect the mainframe to an external network.
The qeth device driver supports OSA-Express features for the z Systems
mainframes that are relevant to SUSE Linux Enterprise Server 12 SP2 as
shown in Table 36.:
Table 36. The qeth device driver support for OSA-Express features
Feature z13 zEC12 and zBC12 z196 and z114
OSA-Express5S Gigabit Ethernet Gigabit Ethernet Not supported
10 Gigabit Ethernet 10 Gigabit Ethernet
1000Base-T Ethernet 1000Base-T Ethernet
Virtual switch
A virtual switch (VSWITCH) is a special-purpose guest LAN that
provides external LAN connectivity through an additional
OSA-Express device served by z/VM without the need for a
routing virtual machine, see Figure 36 on page 212.
The qeth device driver supports functions listed in Table 37 and Table 38 on page
214.
Table 37. Real connections
HiperSockets HiperSockets
Layer 2 Layer 3
Function OSA Layer 2 OSA Layer 3 Ethernet Ethernet
Basic device or protocol functions
IPv4/multicast/broadcast Yes/Yes/Yes Yes/Yes/Yes Yes/Yes/Yes Yes/Yes/Yes
IPv6/multicast Yes/Yes Yes/Yes Yes/Yes Yes/Yes
Non-IP traffic Yes Yes Yes No
VLAN IPv4/IPv6/non IP sw/sw/sw hw/sw/sw sw/sw/sw hw/sw/No
Linux ARP Yes No (hw ARP) Yes No
Linux neighbor Yes Yes Yes No
solicitation
Unique MAC address Yes (random) No Yes Yes
In layer 2 mode, OSA routing to the destination Linux instance is based on MAC
addresses. A local MAC address is assigned to each interface of a Linux instance
and registered in the OSA Address Table. These MAC addresses are unique and
different from the MAC address of the OSA adapter. See MAC headers in layer 2
mode on page 218 for details.
In layer 3 mode, all interfaces of all Linux instances share the MAC address of the
OSA adapter. OSA routing to the destination Linux instance is based on IP
addresses. See MAC headers in layer 3 mode on page 219 for details.
The layer 2 discipline (qeth_l2)
The layer 2 discipline supports:
v OSA devices and z/VM virtual NICs that couple to VSWITCHes or
QDIO guest LANs
v OSA devices for NCP
v HiperSockets devices
v OSM (OSA-Express for Unified Resource Manager) devices
v OSX (OSA-Express for zBX) devices for IEDN
The layer 2 discipline is the default setup for OSA. On HiperSockets the
default continues to be layer 3. OSA guest LANs are layer 2 by default,
while HiperSockets guest LANs are always layer 3. See Setting the layer2
attribute on page 229 for details.
The layer 3 discipline (qeth_l3)
The layer 3 discipline supports:
v OSA devices and z/VM virtual NICs that couple to VSWITCHes or
QDIO guest LANs that are running in layer 3 mode (with faked link
layer headers)
v HiperSockets and HiperSockets guest LAN devices that are running in
layer 3 mode (with faked link layer headers)
v OSX (OSA-Express for zBX) devices for IEDN
This discipline supports those devices that are not capable of running in
layer 2 mode. Not all Linux networking features are supported and others
need special setup or configuration. See Table 44 on page 226. Some
performance-critical applications might benefit from being layer 3.
The qeth device driver uses the QDIO protocol to communicate with the
HiperSockets and OSA-Express adapter.
The three device bus-IDs that correspond to the subchannel triplet are grouped as
one qeth group device. The following rules apply for the device bus-IDs:
read no specific rules.
write must be the device bus-ID of the read subchannel plus one.
data can be any free device bus-ID on the same CHPID.
You can configure different triplets of device bus-IDs on the same CHPID
differently. For example, if you have two triplets on the same CHPID they can
have different attribute values for priority queueing.
Find out how the hardware is configured and which qeth device bus-IDs are on
which CHPID, for example by looking at the IOCDS. Identify the device bus-IDs
that you want to group into a qeth group device. The three device bus-IDs must be
on the same CHPID.
Procedure
Perform these steps to allow user-space applications on your Linux instance to use
a qeth group device:
1. Create the qeth group device.
After booting Linux, each qeth device bus-ID is represented by a subdirectory
in /sys/bus/ccw/devices/. These subdirectories are then named with the bus
IDs of the devices. For example, a qeth device with bus IDs 0.0.fc00, 0.0.fc01,
and 0.0.fc02 is represented as /sys/bus/ccw/drivers/qeth/0.0.fc00
2. Configure the device.
3. Set the device online.
What to do next
These tasks and the configuration options are described in detail in Working with
qeth devices on page 224.
According to the type of CHPID and feature used, the naming scheme uses the
following base names:
eth<n>
for Ethernet features.
hsi<n>
for HiperSockets devices.
where <n> is an integer that uniquely identifies the device. When the first device
for a base name is set online it is assigned 0, the second is assigned 1, the third 2,
and so on. Each base name is counted separately.
For example, the interface name of the first Ethernet feature that is set online is
eth0, the second eth1. When the first HiperSockets device is set online, it is
assigned the interface name hsi0.
The qeth device driver shares the name space for Ethernet interfaces with the LCS
device driver. Each driver uses the name with the lowest free identifier <n>,
regardless of which device driver occupies the other names. For example, assume
that the first qeth Ethernet feature is set online and there already is one LCS
Ethernet feature online. Then the LCS feature is named eth0 and the qeth feature
is named eth1. See also LCS interface names on page 287.
The mapping between interface names and the device bus-ID that represents the
qeth group device in sysfs is preserved when a device is set offline and back
online. However, it can change when rebooting, when devices are ungrouped, or
when devices appear or disappear with a machine check.
Finding out the interface name of a qeth group device on page 235 and Finding
out the bus ID of a qeth interface on page 235 provide information about
mapping device bus-IDs and interface names.
Be aware of the IP version when you specify IP addresses and when you use
commands that return IP-version specific output (such as qetharp).
Linux
App.
Network
LAN device stack
LAN adapter driver
Hardware
Figure 38. Standard IPv4 processing
The layer2 option keeps the MAC addresses on incoming packets. Incoming and
outgoing packets are complete with a MAC header at all stages between the Linux
network stack and the LAN as shown in Figure 38. This layer2-based forwarding
requires unique MAC addresses for all concerned Linux instances.
In layer 2 mode, the Linux TCP/IP stack has full control over the MAC headers
and the neighbor lookup. The Linux TCP/IP stack does not configure IPv4 or IPv6
addresses into the hardware, but requires a unique MAC address for the card.
Users working with a directly attached OSA-card should assign a unique
MAC-address themselves.
For Linux instances that are directly attached to an OSA-Express adapter in QDIO
mode, you should assign the MAC addresses yourself. You can add a line
LLADDR=<MAC address> to the configuration file /etc/sysconfig/network/ifcfg-
<if-name>. Alternatively, you can change the MAC address by issuing the
command:
ip link set addr <MAC address> dev <interface>
For OSX and OSM CHPIDs, you cannot set your own MAC addresses. Linux uses
the MAC addresses defined by the Unified Resource Manager.
To support IPv6 and protocols other than IPv4, the device driver registers a layer 3
card as an Ethernet device to the Linux TCP/IP stack.
In layer 3 mode, the OSA-Express adapter in QDIO mode removes the MAC
header with the MAC address from incoming IPv4 packets. It uses the registered
IP addresses to forward a packet to the recipient TCP/IP stack. See Figure 39. Thus
the OSA-Express adapter is able to deliver IPv4 packets to the correct Linux
images. Apart from broadcast packets, a Linux image can get packets only for IP
addresses it configured in the stack and registered with the OSA-Express adapter.
(faked)
MAC addr. } MAC header MAC addr.
IP addr. } IP header IP addr. IP addr.
Linux
App.
Network
LAN device stack
LAN adapter driver
Hardware
Figure 39. MAC address handling in layer3 mode
The OSA-Express QDIO microcode builds MAC headers for outgoing IPv4 packets
and removes them from incoming IPv4 packets. Hence, the operating systems'
network stacks send and receive only IPv4 packets without MAC headers.
This lack of MAC headers can be a problem for applications that expect MAC
headers. For examples of how such problems can be resolved, see Setting up for
DHCP with IPv4 on page 272.
If the hardware does not require the Ethernet frame (for example, for IPv4) the
driver removes the Ethernet header prior to sending the frame to the hardware. If
necessary information like the Ethernet target address is not available (because of
the offload functionality) the value is filled with the hardcoded address FAKELL.
Table 39. Ethernet addresses of outgoing frames
Frame Destination address Source address
IPv4 FAKELL Real device address
IPv6 Real destination address Real device address
Other packets Real destination address Real device address
Incoming frames
The device driver provides Ethernet headers for all incoming frames.
If necessary information like the Ethernet source address is not available (because
of the offload functionality) the value is filled with the hardcoded address
FAKELL.
Table 40. Ethernet addresses of incoming frames
Frame Destination address Source address
IPv4 Real device address FAKELL
IPv6 Real device address FAKELL
Other packets Real device address Real source address
While the faked headers are syntactically correct, the addresses are not authentic,
and hence applications requiring authentic addresses will not work. Some
examples are given in Table 41.
Table 41. Applications that react differently to faked headers
Application Support Reason
tcpdump Yes Displays only frames, fake Ethernet information is
displayed.
iptables Partially As long as the rule does not deal with Ethernet
information of an IPv4 frame.
dhcp Yes Is non-IPv4 traffic.
IP addresses
The network stack of each operating system that shares an OSA-Express adapter in
QDIO mode registers all its IP addresses with the adapter.
ARP:
ARP is a TCP/IP protocol that translates 32-bit IPv4 addresses into the
corresponding hardware addresses. For example, for an Ethernet device, the
hardware addresses are 48-bit Ethernet Media Access Control (MAC) addresses.
The mapping of IPv4 addresses to the corresponding hardware addresses is
defined in the ARP cache. When it needs to send a packet, a host consults the ARP
cache of its network adapter to find the MAC address of the target host.
If there is an entry for the destination IPv4 address, the corresponding MAC
address is copied into the MAC header and the packet is added to the appropriate
interface's output queue. If the entry is not found, the ARP functions retain the
IPv4 packet, and broadcast an ARP request asking the destination host for its MAC
address. When a reply is received, the packet is sent to its destination.
Note:
1. On an OSA-Express adapter in QDIO mode, do not set the NO_ARP flag on
the Linux Ethernet device. The device driver disables the ARP resolution for
IPv4. Because the hardware requires no neighbor lookup for IPv4, but neighbor
solicitation for IPv6, the NO_ARP flag is not allowed on the Linux Ethernet
device.
2. On HiperSockets, which is a full Ethernet offload engine for IPv4 and IPv6 and
supports no other traffic, the device driver sets the NO_ARP flag on the Linux
Ethernet interface. Do not remove this flag from the interface.
| Other architectures
| Non z Systems networks use Ethernet Network Interface Controllers (NICs) to pass
| traffic between the operating system and the network. Normally, a NIC filters
| incoming traffic to admit only frames with destination MAC addresses that match
| addresses that are registered with the NIC.
| However, a NIC can also be configured to receive and pass to the operating system
| all Ethernet frames that reach it, regardless of the destination MAC address. This
| mode of operation is known as promiscuous mode. For example, promiscuous
| mode is a prerequisite for configuring a NIC as a member of a Linux software
| bridge.
| For more information about how to set up a software bridge, see the
| documentation that is provided by your distributor, or the bridging how-to
Chapter 14. qeth: OSA-Express (QDIO) and HiperSockets 221
| available at http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO
| z/Architecture
| A local port in active bridge port state receives all Ethernet frames with unknown
| destination MAC addresses. Figure 40 shows a setup with a HiperSockets bridge
| port and an OSA bridge port.
|
|
|
| Figure 40. HiperSockets and OSA bridge port in Linux
|
| HiperSockets only: Permission to configure ports as bridge ports must be granted
| in IBM zEnterprise Unified Resource Manager (zManager).
You can also load the module with the modprobe command:
modprobe qeth
qeth_l2
qeth_l3
where:
qeth is the core module that contains common functions that are used for both
the layer 2 and layer 3 disciplines.
qeth_l2
is the module that contains layer 2 discipline-specific code.
qeth_l3
is the module that contains layer 3 discipline-specific code.
When a qeth device is configured for a particular discipline, the driver tries to
automatically load the corresponding discipline module.
If the new discipline is accepted by the device driver the old network interface will
be deleted. When the new discipline is set online the first time the new network
interface is created.
To release the dependencies from the core module to the discipline module, all
devices of this discipline must be ungrouped. Now the discipline module can be
removed. If all discipline modules are removed, the core module can be removed.
Not all attributes are applicable to each device. Some attributes apply only to
HiperSockets or only to OSA-Express CHPIDs in QDIO mode, other attributes are
applicable to IPv4 interfaces only. See the task descriptions for the applicability of
each attribute.
OSA for NCP handles NCP-related packets. Most of the attributes do not apply to
OSA for NCP devices. The attributes that apply are:
v if_name
v card_type
v buffer_count
v recover
Table 42. qeth tasks and attributes common to layer2 and layer3
Task Corresponding attributes Possible attribute values
Creating a qeth group device on page 227 group n/a
Removing a qeth group device on page 228 ungroup 0 or 1
Setting the layer2 attribute on page 229 layer2 0 or 1, see Layer 2 and
layer 3 on page 215
| Using priority queueing on page 230 priority_queueing prio_queueing_vlan
| prio_queueing_skb
prio_queueing_prec
prio_queueing_tos
no_prio_queueing
no_prio_queueing:0
no_prio_queueing:1
no_prio_queueing:2
no_prio_queueing:3
Specifying the number of inbound buffers on page 232 buffer_count integer in the range 8
-128. The default is 64 for
OSA devices and 128 for
HiperSockets devices
Specifying the relative port number on page 233 portno integer, either 0 or 1, the
default is 0
Finding out the type of your network adapter on page 233 card_type n/a, read-only
Setting a device online or offline on page 234 online 0 or 1
Finding out the interface name of a qeth group device on if_name n/a, read-only
page 235
Finding out the bus ID of a qeth interface on page 235 none n/a
Activating an interface on page 235 none n/a
Deactivating an interface on page 238 none n/a
Recovering a device on page 238 recover 1
Turning inbound checksum calculations on and off on none n/a
page 239
Turning outbound checksum calculations on and off on none n/a
page 239
Isolating data connections on page 240 isolation none, drop, forward
sysfs provides multiple paths through which you can access the qeth group device
attributes. For example, if a device with bus ID 0.0.a100 corresponds to interface
eth0:
/sys/bus/ccwgroup/drivers/qeth/0.0.a100
/sys/bus/ccwgroup/devices/0.0.a100
/sys/devices/qeth/0.0.a100
/sys/class/net/eth0/device
all lead to the attributes for the same device. For example, the following
commands are all equivalent and return the same value:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.a100/if_name
eth0
# cat /sys/bus/ccwgroup/devices/0.0.a100/if_name
eth0
# cat /sys/devices/qeth/0.0.a100/if_name
eth0
# cat /sys/class/net/eth0/device/if_name
eth0
However, the path through /sys/class/net is available only while the device is
online. Furthermore, it might lead to a different device if the assignment of
interface names changes after rebooting or when devices are ungrouped and new
group devices created.
Tips:
v Work through one of the paths that are based on the device bus-ID.
v Using SUSE Linux Enterprise Server 12 SP2, you set qeth attributes in YaST.
YaST, in turn, creates a udev configuration file called /etc/udev/rules.d/xx-
qeth-0.0.xxxx.rules. Additionally, cross-platform network configuration
parameters are defined in /etc/sysconfig/network/ifcfg-<if_name>.
You need to know the device bus-IDs that correspond to the read, write, and data
subchannel of your OSA-Express CHPID in QDIO mode or HiperSockets CHPID
as defined in the IOCDS of your mainframe.
Procedure
Results
The qeth device driver uses the device bus-ID of the read subchannel to create a
directory for a group device:
/sys/bus/ccwgroup/drivers/qeth/<read_device_bus_id>
This directory contains a number of attributes that determine the settings of the
qeth group device. The following sections describe how to use these attributes to
configure a qeth group device.
Example
In this example (see Figure 41), a single OSA-Express CHPID in QDIO mode is
used to connect a Linux instance to a network.
Mainframe configuration:
Linux configuration:
Assuming that 0.0.aa00 is the device bus-ID that corresponds to the read
subchannel:
# echo 0.0.aa00,0.0.aa01,0.0.aa02 > /sys/bus/ccwgroup/drivers/qeth/group
Both the command and the resulting directories would be the same for a
HiperSockets CHPID.
The device must be set offline before you can remove it.
Procedure
To remove a qeth group device, write 1 to the ungroup attribute. Issue a command
of the form:
echo 1 > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/ungroup
Example
The qeth device driver attempts to load the layer 3 discipline for HiperSockets
devices and layer 2 for non-HiperSockets devices.
You can use the layer 2 mode for almost all device types. However, note the
following about layer 2 to layer 3 conversion:
real OSA-Express
Hardware is able to convert layer 2 to layer 3 traffic and vice versa and
thus there are no restrictions.
HiperSockets
There is no support for layer 2 to layer 3 conversion and, thus, no
communication is possible between HiperSockets layer 2 interfaces and
HiperSockets layer 3 interfaces. Do not include HiperSockets layer 2
interfaces and HiperSockets layer 3 interfaces in the same LAN.
z/VM guest LAN
Linux has to configure the same mode as the underlying z/VM virtual
LAN definition. The z/VM definition "Ethernet mode" is available for
VSWITCHes and for guest LANs of type QDIO.
The qeth device driver separates the configuration options in sysfs according to the
device discipline. Hence the first configuration action after you group the device
must be the configuration of the discipline. To set the discipline, issue a command
of the form:
echo <integer> > /sys/devices/qeth/<device_bus_id>/layer2
where <integer> is
v 0 to turn off the layer2 attribute; this results in the layer 3 discipline.
v 1 to turn on the layer2 attribute; this results in the layer 2 discipline (default).
If the layer2 attribute has a value of -1, the layer was not set. The default layer
setting is used when the device is set online.
Results
Procedure
You can determine how outgoing IP packages are assigned to queues by setting a
value for the priority_queueing attribute of your qeth device.
Issue a command of the form:
Example
To read the current value of priority queueing for device 0.0.a110, issue:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.a110/priority_queueing
The device must be offline while you specify the number of buffers for inbound
traffic.
By default, the qeth device driver assigns 64 inbound buffers to OSA devices and
128 to HiperSockets devices.
The Linux memory usage for inbound data buffers for the devices is (number of
buffers) (buffer size).
The buffer size is equivalent to the frame size, which depends on the type of
CHPID:
| v For an OSA-Express CHPID in QDIO mode: 64 KB
v For HiperSockets: depending on the HiperSockets CHPID definition, 16 KB,
24 KB, 40 KB, or 64 KB
Set the buffer_count attribute to the number of inbound buffers you want to
assign. Issue a command of the form:
# echo <number> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/buffer_count
Example
Procedure
By default, the qeth group device uses port 0. To use a different port, issue a
command of the form:
# echo <integer> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/portno
Example
Procedure
You can find out the type of the network adapter through which your device is
connected. To find out the type, read the card_type attribute of the device. Issue a
command of the form:
# cat /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/card_type
The card_type attribute gives information about both the type of network adapter
and the type of network link (if applicable) available at the card's ports. See
Table 46 on page 234 for details.
Example
Procedure
To set a qeth group device online, set the online device group attribute to 1. To set
a qeth group device offline, set the online device group attribute to 0. Issue a
command of the form:
# echo <flag> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/online
Setting a device online associates it with an interface name (see Finding out the
interface name of a qeth group device on page 235).
Setting a device offline closes this network device. If IPv6 is active, you lose any
IPv6 addresses set for this device. After you set the device online, you can restore
lost IPv6 addresses only by issuing the ip or ifconfig commands again.
Example
Procedure
Example
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.a100/if_name
eth0
Procedure
Example
To find out which device bus-ID corresponds to an interface eth0 issue, for
example:
# readlink /sys/class/net/eth0/device
../../../0.0.a100
Activating an interface
Use the ip command or equivalent to activate an interface.
The MTU size defaults to the correct settings for HiperSockets devices. For
OSA-Express CHPIDs in QDIO mode, the default MTU size depends on the device
mode, layer 2 or layer 3.
v For layer 2, the default MTU is 1500 bytes.
v For layer 3, the default MTU is 1492 bytes.
In most cases, the default MTU sizes are well suited for OSA-Express CHPIDs in
QDIO mode. If your network is laid out for jumbo frames, increase the MTU size
to a maximum of 9000 bytes for layer 2, or to 8992 bytes for layer 3. Exceeding the
defaults for regular frames or the maximum frame sizes for jumbo frames might
cause performance degradation. See OSA-Express Customer's Guide and Reference,
SA22-7935 for more details about MTU size.
For HiperSockets, the maximum MTU size is restricted by the maximum frame
size as announced by the Licensed Internal Code (LIC). The maximum MTU is
equal to the frame size minus 8 KB. Hence, the possible frame sizes of 16 KB,
24 KB, 40 KB, or 64 KB result in maximum corresponding MTU sizes of 8 KB,
16 KB, 32 KB, or 56 KB.
The MTU size defaults to the correct settings for both HiperSockets and
OSA-Express CHPIDs in QDIO mode. As a result, you do not need to specify the
MTU size when you activate the interface.
On heavily loaded systems, MTU sizes that exceed 8 KB can lead to memory
allocation failures for packets due to memory fragmentation. A symptom of this
problem are messages of the form "order-N allocation failed" in the system log. In
addition, network connections drop packets, possibly so frequently as to make the
network interface unusable.
As a workaround, use MTU sizes at most of 8 KB (minus header size), even if the
network hardware allows larger sizes. For example, HiperSockets or 10 Gigabit
Ethernet allow larger sizes.
Procedure
Examples
v This example activates a HiperSockets CHPID with broadcast address
192.168.100.255:
# ip addr add 192.168.100.10/24 dev hsi0
# ip link set dev hsi0 up
The Linux network stack design does not allow feedback about IP address
changes. If ip or an equivalent command fails to set an IP address on an
OSA-Express network CHPID, a query with ip shows the address as being set on
the interface although the address is not actually set on the CHPID.
There are usually failure messages about not being able to set the IP address or
duplicate IP addresses in the kernel messages. You can find these messages in the
output of the dmesg command. In SUSE Linux Enterprise Server 12 SP2, you can
also find the messages in /var/log/messages.
If you are not sure whether an IP address was set properly or experience a
networking problem, check the messages or logs to see if an error was encountered
when setting the address. This also applies in the context of HiperSockets and to
both IPv4 and IPv6 addresses. It also applies to whether an IP address has been set
for IP takeover, for VIPA, or for proxy ARP.
Duplicate IP addresses
The OSA-Express adapter in QDIO mode recognizes duplicate IP addresses on the
same OSA-Express adapter or in the network using ARP and prevents duplicates.
You can use the qethconf command (see qethconf - Configure qeth devices on
page 625) to maintain a list of IP addresses that your device can take over, a list of
IP addresses for which your device can handle ARP, and a list of IP addresses that
can be used as virtual IP addresses, regardless of any duplicates on the same
OSA-Express adapter or in the LAN.
Setting a device offline involves actions on the attached device, but deactivating a
device only stops the interface logically within Linux.
Procedure
Example
Recovering a device
You can use the recover attribute of a qeth group device to recover it in case of
failure.
For example, error messages in /var/log/messages from the qeth, qdio, or cio
kernel modules might inform you of a malfunctioning device.
Procedure
Example
# echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.a100/recover
The qeth device driver also supports offloading TSO segmentation, see Enabling
and disabling TCP segmentation offload on page 248.
The offload operations can be set with the Linux ethtool command, version 6 or
later. See the ethtool man page for details. The following abbreviated example
shows some offload settings:
# ethtool -k eth0
Features for eth0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: on
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
...
Procedure
Examples
v To let the OSA feature calculate the inbound checksum for network device eth0,
issue
# ethtool -K eth0 rx on
v To let the host CPU calculate the inbound checksum for network device eth0,
issue
# ethtool -K eth0 rx off
You can enable or disable the OSA feature calculating the outbound checksums by
using the ethtool command.
Procedure
Example
v To let the OSA feature calculate the outbound checksum for network device eth0,
issue
# ethtool -K eth0 tx on
v To let the host CPU calculate the outbound checksum for network device eth0,
issue
# ethtool -K eth0 tx off
forward
Specifies the ISOLATION_FORWARD policy. All packets are passed
through a switch. The ISOLATION_FORWARD policy requires a network
adapter in Virtual Ethernet Port Aggregator (VEPA) mode with an adjacent
switch port configured for reflective relay mode.
To check whether the switch of the adapter is in reflective relay mode, read
the sysfs attribute switch_attrs. The attribute lists all supported
forwarding modes, with the currently active mode enclosed in square
brackets. For example:
cat /sys/devices/qeth/0.0.f5f0/switch_attrs
802.1 [rr]
The example indicates that the adapter supports both 802.1 forwarding
mode and reflective relay mode, and reflective relay mode (rr) is active.
Using a network adapter in VEPA mode achieves further isolation. VEPA
mode forces traffic from the Linux guests to be handled by the external
switch. For example, Figure 43 on page 242 shows instances A and B with
ISOLATION_FORWARD specified for the policy. All traffic between A and
B goes through the external switch. The rule set of the switch now
determines which connections are possible. The graphic assumes that A can
Figure 43. Traffic from Linux instance A and B is forced through an external switch
You can configure the policy regardless of whether the device is online. If the
device is online, the policy is configured immediately. If the device is offline, the
policy is configured when the device comes online.
Examples
v To check the current isolation policy:
# cat /sys/devices/qeth/0.0.f5f0/isolation
If the switch is not capable of VEPA support, or VEPA support is not configured
on the switch, then you cannot set the isolation attribute value to 'forward' while
the device is online. If the switch does not support VEPA and you set the
isolation value 'forward' while the device is offline, then the device cannot be set
online until the isolation value is set back to 'drop' or 'none'.
v To set the isolation policy to none:
# echo "none" > /sys/devices/qeth/0.0.f5f0/isolation
When you use vNICs, VEPA mode must be enabled on the respective VSWITCH.
See z/VM Connectivity, SC24-6174 for information about setting up data connection
isolation on a VSWITCH.
This attribute is initially set to 0, that is, QETH performance data is not collected.
Procedure
To start collection for a specific QETH device, write 1 to the attribute. For example:
echo 1 > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/performance_stats
When errors occur on an OSA-Express adapter, both software and hardware traces
must be collected. The hardware-tracing feature requests a hardware trace if an
error is detected. This feature makes it possible to correlate the hardware trace
with the device driver trace. If the hardware-tracing feature is activated, traces are
captured automatically, but you can also start the capturing yourself.
Procedure
Examples
In this example the hardware-tracing feature is activated for qeth device 0.0.a000:
# echo arm > /sys/devices/qeth/0.0.a000/hw_trap
Use the layer 2 attribute to set the mode. See Setting the layer2 attribute on page
229 about setting the mode. See Layer 2 and layer 3 on page 215 for general
information about the layer 2 and layer 3 disciplines.
You can set the route4 or route6 attribute dynamically, while the qeth device is
online.
The same values are possible for route4 and route6 but depend on the type of
CHPID, as shown in Table 47.
Table 47. Summary of router setup values
Router specification OSA-Express CHPID in HiperSockets CHPID
QDIO mode
primary_router Yes No
secondary_router Yes No
primary_connector No Yes
secondary_connector No Yes
multicast_router Yes Yes
no_router Yes Yes
A HiperSockets CHPID accepts the following values, provided the microcode level
supports the feature:
primary_connector
to make your Linux instance the principal connection between a HiperSockets
network and an external network (see HiperSockets Network Concentrator
on page 267).
secondary_connector
to make your Linux instance a backup connection between a HiperSockets
network and an external network (see HiperSockets Network Concentrator
on page 267).
Example
In this example, two Linux instances, Linux P and Linux S, running on an IBM
mainframe use OSA-Express to act as primary and secondary routers between two
networks. IP forwarding must be enabled for Linux in an LPAR or as a z/VM
guest to act as a router. In SUSE Linux Enterprise Server 12 SP2 you can set IP
forwarding permanently in /etc/sysctl.conf or dynamically with the sysctl
command.
Mainframe configuration:
In this example, qeth device 0.0.1510 is defined as a primary router for IPv6:
/sys/bus/ccwgroup/drivers/qeth # cd 0.0.1510
# echo 1 > online
# echo primary_router > route6
# cat route6
primary router
Large send (TCP segmentation offload) is supported for OSA connections on layer
3 only. VLAN interfaces inherit offload settings from their base interface.
Procedure
Attention: When TCP segmentation is offloaded, the OSA feature performs the
calculations. Offloaded calculations apply only to packets that go out to the LAN
or come in from the LAN. Linux instances that share an OSA port exchange
packages directly. The packages are forwarded by the OSA adapter but do not go
out on the LAN and no TCP segmentation calculation is performed. The qeth
device driver cannot detect this, and so cannot issue any warning about it.
Examples
v To enable TSO for a network device eth0 issue:
# ethtool -K eth0 tx on sg on tso on
To find out whether a device supports broadcasting, use the ip command. If the
resulting list shows the BROADCAST flag, the device supports broadcast. This
example shows that the device eth0 supports broadcast:
# ip -s link show dev eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast qlen 1000
link/ether 00:11:25:bd:da:66 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
236350 2974 0 0 0 9
TX: bytes packets errors dropped carrier collsns
374443 1791 0 0 0 0
Some processes, for example, the gated routing daemon, require the devices'
broadcast capable flag to be set in the Linux network stack.
Procedure
To set the broadcast capable flag for devices that do not support broadcast, set the
fake_broadcast attribute of the qeth group device to 1. To reset the flag, set it to 0.
Issue a command of the form:
# echo <flag> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/fake_broadcast
Example
For information about the layer2 option, see MAC headers in layer 2 mode on
page 218.
An OSA-Express CHPID in QDIO mode can take over IP addresses from any z
Systems operating system. IP takeover for HiperSockets CHPIDs is restricted to
taking over addresses from other Linux instances in the same Central Electronics
Complex (CEC).
IP address takeover between multiple CHPIDs requires ARP for IPv4 and
Neighbor Discovery for IPv6. OSA-Express handles ARP transparently, but not
Neighbor Discovery.
Procedure
By default, qeth devices are not enabled for IP takeover. To enable a qeth group
device for IP address takeover set the enable device group attribute to 1. To switch
off the takeover capability set the enable device group attribute to 0. In sysfs, the
enable attribute is located in a subdirectory ipa_takeover. Issue a command of the
form:
# echo <flag> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/ipa_takeover/enable
Example
Procedure
v To deactivate an IP address delete it from the list. Issue a command of the form:
# qethconf ipa del <ip_address>/<mask_bits> <interface_name>
IPv4 example:
List the range of IP addresses (192.168.10.0 to 192.168.10.255) that can be taken over
by device hsi0.
# qethconf ipa list
ipa add 192.168.10.0/24 hsi0
The following command adds a range of IP addresses that can be taken over by
device eth0.
# qethconf ipa add 192.168.11.0/24 eth0
qethconf: Added 192.168.11.0/24 to /sys/class/net/eth0/device/ipa_takeover/add4.
qethconf: Use "qethconf ipa list" to check for the result
The following command deletes the range of IP addresses that can be taken over
by device eth0.
# qethconf ipa del 192.168.11.0/24 eth0
qethconf: Deleted 192.168.11.0/24 from /sys/class/net/eth0/device/ipa_takeover/del4.
qethconf: Use "qethconf ipa list" to check for the result
IPv6 example:
The following command deletes the IPv6 address range that can be taken over by
eth2:
qethconf ipa del fec0:0000:0000:0000:0000:0000:0000:0000/64 eth2:
qethconf: Deleted fec0:0000:0000:0000:0000:0000:0000:0000/64 from
sysfs entry /sys/class/net/eth2/device/ipa_takeover/del6.
qethconf: For verification please use "qethconf ipa list"