Scanning for new luns

This is a short article on how to rescan newly added luns in Solaris, Linux, AIX and HP-UX operating systems.

Solaris

  1. Determine the FC channels
    cfgadm -al
  2. Force rescan
    cfgadm -o force_update -c configure -c#
    where # is the FC channel number
  3. Force rescan at HBA port level
    luxadm -e forcelip /dev/fc/fp#
  4. Force rescan on all FC devices
    cfgadm -al -o show_FCP_dev
  5. Install device files
    devfsadm
  6. Display QLogic HBA ports
    luxadm -e port
  7. Disaply HBA port information
    luxadm -v disable WWPN
    luxadm -e dump_map

Linux

A Linux system can recognize newly attached LUNs without unloading the FC HBA driver. The procedure slightly differs depending on the installed FC HBAs.

  1. In the case of QLogic HBAs, issue the command
    echo “scsi-qlascan > /proc/scsi/qla2300/<adapter-instance>
  2. With Emulex HBAs, issue the command
    sh force_lpfc_scan.sh “lpfc<adapter-instance>”
    This script is not part of the regular device driver package, and you must download it separately from the Emulex website. It requires you to install the tool dfc under /usr/sbin/lpfc.
  3. In both cases, you must issue the command for each installed HBA with the <adapter-instance> for the SCSI instance number of the HBA.
  4. After the FC HBAs rescan the fabric, you can make the new devices available to the system by running the command
    echo “scsi add-single-device s c t l” > /proc/scsi/scsi
    The quadruple s c t l is the physical address of the device:
    • s is the SCSI instance of the FC HBA.
    • c is the channel (in our case, always 0).
    • t is the target address (usually 0, except if a volume is seen by a HBA more than once).
    • l is the LUN
    .

AIX

  1. Rescan the devices
    cfgmgr -vi fcs#
    where # is the FC adapter number
  2. Verify the new devices
    lsdev -Cc <disk|tape>

HP-UX

  1. Rescan devices
    ioscan -fnC <disk|take>
  2. Generate device files
    infs -e
  3. Verify the new devices
    ioscan -funC <disk|tape>