Dynamic SAN fabric reconfiguration

This section provides four methods that you can use to force the Linux operating system to recognize disk that are added or removed from the fabric.

When you add or remove disks to the fabric, you can use any of the following four ways to force the Linux host to recognize these changes:
  1. Reboot the host
  2. Unload and reload the host adapter driver
  3. Rescan the bus by echoing the /sys filesystem (only for Linux 2.6 kernels)
  4. Manually add and remove SCSI disks by echoing the /proc or /sys filesystem

Reboot the Host or Unload and Reload the host adapter driver

Since devices are discovered by scanning the SCSI bus, it is typically easiest to rescan the SCSI bus to detect any SAN fabric changes. A bus rescan is automatically triggered by reloading the host adapter driver or by rebooting the system.

Before unloading the host adapter driver or rebooting the host, you must:
  1. Stop all I/O
  2. Unmount all file systems
  3. If SDD is being used, unload the SDD driver with the sdd stop command before reloading the host adapter driver. After the host adapter driver is reloaded then reload SDD with the sdd start command.

Reloading the host adapter driver assumes that the host adapter driver is built as a module. Rebooting the system works regardless of whether or not the host adapter driver is compiled into the kernel or as a module.

Rescan the bus by echoing the /sys filesystem (only for Linux 2.6 kernels)

For Linux 2.6 kernels only, a rescan can be triggered through the /sys interface without having to unload the host adapter driver or reboot the system. The following command will scan all channels, targets, and LUNs on host H.

echo “- - -” > /sys/class/scsi_host/hostH/scan

Manually add and remove SCSI disks

You can use the following commands to manually add and remove SCSI disk.
Note: In the following command examples, H, B, T, L, are the host, bus, target, and LUN IDs for the device.

You can unconfigure and remove an unused SCSI disk with the following command:

For Linux 2.6 kernels, devices can also be added and removed through the /sys filesystem. Use the following command to remove a disk from the kernel’s recognition:
To reregister the disk with the kernel use the command:
Note: The Linux kernel does not assign permanent names for the fabric devices in the /dev directory. Device file names are assigned in the order in which devices are discovered during the bus scanning. For example, a LUN might be /dev/sda. After a driver reload, the same LUN might become /dev/sdce. A fabric reconfiguration might also result in a shift in the host, bus, target and LUN IDs, which makes it unreliable to add specific devices through the /proc/scsi/scsi file.
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.