Chapter 22.
231
Additional Information for IBM System
z Users
22.1. The
sysfs
File System
The Linux 2.6 kernel introduced the
sysfs
file system. The
sysfs
file system is described as a union
of the
proc
,
devfs
, and
devpty
file systems. The
sysfs
file system enumerates the devices and
busses attached to the system into a file system hierarchy that can be accessed from user space. It is
designed to handle the device and driver specific options that have previously resided in
/proc/
, and
encompass the dynamic device addition previously offered by
devfs
.
The
sysfs
file system is mounted at
/sys/
and contains directories that organize the devices
attached to the system in several different ways. The
/sysfs/
subdirectories include:
1. The
/devices/
directory
This directory contains the
/css0/
directory. Its subdirectories represent all the subchannels
detected by the Linux kernel. Subchannel directories are named in the form
0.0.
nnnn
where
nnnn
is the subchannel number in hex between 0000 and ffff. Subchannel directories in turn
contain status files and another subdirectory which represents the actual device. The device
directory is named
0.0.
xxxx
where
xxxx
is the unit address for the device. The
/devices/
directory also contains status information as well as configuration options for the device.
2. The
/bus/
directory
This contains a
/ccw/
subdirectory and a
/ccwgroup/
subdirectory. CCW devices are accessed
using channel command words. Devices in the
/ccw/
directory only use one subchannel on the
mainframe channel subsystem. CCW group devices are also accessed with channel command
words, but they use more than one subchannel per device. For example, a 3390-3 DASD
device uses one subchannel, while a QDIO network connection for an OSA adapter uses three
subchannels. The
/ccw/
and the
/ccwgroup/
directories both contain directories called devices
and drivers:
The
/devices/
directory contains a symbolic link to the device directories in the
/sys/
devices/css0/
directory.
The
/drivers/
directory contains directories for each device driver currently loaded on the
system. Drivers associated with devices such as
dasd
,
console
,
qeth
, and
zfcp
have directory
entries here. The
/driver/
directory contains settings for the device driver, as well as symbolic
links to the devices it is using (in the
/sys/devices/css0/
directory).
3. The
/class/
directory
This contains directories that group together similar devices such as ttys, SCSI tape drives,
network devices, and other miscellaneous devices.
4. The
/block/
directory
This directory contains directories for each of the block devices on the system. These are mostly
disk type devices such as real DASD, loopback devices, and software raid block devices. The
noticeable difference between older Linux systems and ones that use
sysfs
is the need to refer
Summary of Contents for ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Page 12: ...xii ...
Page 20: ......
Page 30: ...12 ...
Page 32: ...14 ...
Page 82: ...64 ...
Page 106: ...88 ...
Page 122: ...104 ...
Page 124: ...106 ...
Page 126: ......
Page 132: ...114 ...
Page 168: ...150 ...
Page 182: ...164 ...
Page 192: ...174 ...
Page 194: ......
Page 236: ...218 ...
Page 238: ...220 ...
Page 270: ......
Page 274: ...256 ...
Page 278: ...260 ...
Page 292: ...274 ...
Page 294: ......
Page 300: ...282 ...
Page 304: ......
Page 316: ...298 ...
Page 370: ...352 ...
Page 384: ...366 ...
Page 385: ...Part VII Appendix ...
Page 386: ......