beautypg.com

Configure parameters with a read/write to sysfs – Dell Emulex Family of Adapters User Manual

Page 829

background image

Emulex Drivers Version 10.2 for Linux User Manual

P010081-01A Rev. A

3. Configuration

FC and FCoE Driver Configuration

829

Persistent Configuration with modprobe.conf or lpfc.conf

For the FC RHEL5.x driver, to make the FC and FCoE driver parameters persist across

module loads and reboots, modify the /etc/modprobe.conf file. The FC and FCoE

driver parameters are specified in /etc/modprobe.conf via the “options” command.

For example, the following command sets the verbose flag:

options lpfc lpfc_log_verbose=0xffffffff

For FC RHEL6.x/SLES11-SPx drivers, to make the FC and FCoE driver parameters

persist across module loads and reboots, follow these two steps:
1. In the /etc/modprobe.d directory, create a file with the driver name “lpfc.conf”.
2. In /etc/modprobe.d/lpfc.conf, use the “options” command to add the appropriate

FC and FCoE driver parameters and their desired values. For example, adding the

following command to the lpfc.conf file sets the verbose flag:

options lpfc lpfc_log_verbose=0x3ffff

If driver parameters are modified in the modprobe.conf file or added to the lpfc.conf

file, the FC and FCoE driver must be reloaded for the parameters to take effect. Also, a

new ramdisk image is required if you want the changes to take effect in the next boot.

See “Creating a New Ramdisk Image” on page 830.
If the same parameter is specified on the modprobe command line and also in the

modprobe.conf or lpfc.conf file, then the value specified in the modprobe command

line takes precedence.

Configure Parameters with a Read/Write to sysfs

Sysfs is a virtual file system that exposes the structure of the system. It also includes

interfaces to driver parameters through which the FC and FCoE driver parameters can

be viewed and modified. Since these interfaces are available only after driver load, only

dynamic FC and FCoE driver parameters can be changed. However, both static and

dynamic FC and FCoE driver parameters can be read through sysfs.

Notes:

Sysfs changes exist only during driver load and are lost when the FC and FCoE

driver is unloaded or the system is rebooted.

Driver parameters that are set through module parameters are global; setting

them through sysfs is on a scsi host (adapter port) basis.
For example:
‘echo 0x7f >> /sys/class/scsi_host/host7/lpfc_log_verbose’ only affects host 7.
‘modprobe lpfc lpfc_log_verbose=0x7f’ will apply to all scsi host (ports)

managed by the lpfc driver.

Viewing Parameters with sysfs

The sysfs file system is mounted and available as /sys. You must first identify the

scsi_host that represents the adapter for which you want to modify the FC and FCoE