User Tools

Site Tools


linux:linux-san:newer-kernel

Newer Kernels post 2.6.11

Neer kernels have introduced a lot of changes to the HBA drivers. Now the drivers store the information on various entries in the /sys folder. There is no central information repository of information as on previous versions

SYSTOOL

Linux now uses the systool utility and the optional sg3_utils get all the information

To get the WWN of an HBA:

# systool -c fc_host -v

To find the WWN of what the HBAs are connected (SP WWN):

# systool -c fc_transport -v

To see what fiber devices are connected to the HBas (ie luns, tape drives):

# systool -c fc_remote_ports -v -d

To get information about all the SCSI controllers on the host:

# systool -c scsi_host -v

To get Driver information:

# systool -m lpfc -v
# systool -m qla2xxx -v

Adding or Removing Luns

This used to be prety messy in previous versions of the kernel. You needed to have a third party utility like sansurfer or it needed a reboot of the server.

With the latest kernels it is now possible to issue a command to generate a LIP (Loop Initialization Protocol)

echo “1” > /sys/class/fc_host/hosth/issue_lip

or

echo "c t l" >  /sys/class/scsi_host/hostH/scan

where H is the HBA number, c is the channel on the HBA, t is the SCSI target ID, and l is the LUN.

SG3_UTILS

The main reasong to install this package is that it includes a nice util to do LIP this is needed to do a scsi bus rescan.

This is needed if you add a new lun.

/usr/bin/rescan-scsi-bus.sh -i host{h}

where H is the HBA number.

You can also use

sg_map -x

to get the mapping of scsi devices.

linux/linux-san/newer-kernel.txt · Last modified: by 127.0.0.1