Cleaning up the operating system device tree after removing LUNs

After you remove LUNs, you must clean up the operating system device tree.

The operating system commands may vary, depending on the Linux version. The following procedure uses SUSE 10. If any of these steps do not produce the desired result, contact Novell support.

To clean up the operating system device tree after removing LUNs

  1. Remove the device from the operating system database. Enter the following command:
    # echo 1 > /sys/block/$PATH_SYS/device/delete

    where PATH_SYS is the name of the device you want to remove.

  2. When you enter the following command, no devices should be displayed. This step verifies that the LUNs have been removed.
    # lsscsi | grep PATH_SYS
  3. After you remove the LUNS, clean up the device. Enter the following command:
    # echo "- - -" > /sys/class/scsi_host/host$I/scan

    where the three dashes refer to the channel, target, and LUN numbers, and host$i is the host bus adapter instance. This example cleans up every channel, target, and LUN visible via this host bus adapter instance.