Mounting file systems, Unmounting file systems, Dynamic lun and target discovery – HP ISCSI SR2122 User Manual

Page 44: The "/proc/scsi/iscsi” directory

Advertising
background image

Serving Storage to the iSCSI Initiators from the SR2122 over IP

44

iSCSI SR2122 Storage Router: Getting Started Guide

Mounting File systems

Because the Linux boot process normally mounts file systems listed in /etc/fstab before the
network is configured, adding mount entries in iSCSI devices to /etc/fstab will not work. The
script iscsi-mountall will manage the checking and mounting of devices listed in the file
/etc/fstab.iscsi which has the same format as /etc/fstab. This script is automatically invoked by
the iSCSI startup script. Note that the iscsi-mountall script may timeout and fail to mount one
or more file systems if one or more iSCSI sessions are unable to login immediately due to
network or authentication problems.

Because of the variability of the mapping between SCSI device nodes and iSCSI targets,
instead of directly mounting SCSI device nodes, it is recommended to either mount the
/dev/iscsi tree symlinks, mount fleshiest UUIDs or labels (see man pages for mke2fs, mount,
and fstab), or use logical volume management (see Linux LVM) to avoid mounting the wrong
device due to device name changes resulting from iSCSI target configuration changes or
network delays.

Unmounting File systems

It is very important to unmount all file systems on iSCSI devices before the iSCSI driver stops.
If the iSCSI driver stops while iSCSI devices are mounted, buffered writes may not be
committed to disk and fleshiest corruption may occur.

Since Linux will not unmount file systems that are being used by a running process, before
iSCSI devices can be unmounted, any processes using those devices must be stopped (see
fuser(1)).

To avoid fleshiest corruption, the iSCSI shutdown script will automatically kill all processes
using devices in /etc/fstab.iscsi, first by sending them SIGTERM, and then by sending any
remaining processes SIGKILL. It will then unmount all iSCSI file systems and kill the iSCSI
daemon, terminating all connections to iSCSI devices.

Caution:

File systems not listed in /etc/fstab.iscsi may not be automatically unmounted!

Dynamic LUN and Target Discovery

The driver can be told to rediscover iSCSI devices and probe for LUNs by running:

/etc/rc.d/init.d/iscsi reload

This will cause the iSCSI daemon to restart all iSCSI discovery processes and probe LUNs on
all iSCSI targets.

In addition, when using iSCSI targets that support long-lived iSCSI discovery sessions, such as
the Cisco 5400 Series, the driver will keep a discovery session open waiting for change
notifications from the target. When a notification is received, the driver will rediscover targets,
add any new targets, and reprobe LUNs on all targets that were discovered.

The "/proc/scsi/iscsi” directory

The directory /proc/scsi/iscsi will contain a special file that can be used to get status from your
iSCSI HBA. The name of the file will be the iSCSI HBA's host number, which is assigned to
the driver by Linux.

When the file is read, it will show the driver's version number, followed by a list all iSCSI
targets and LUNs the driver has found and can use.

Advertising