Skip to content

rescan-scsi-bus.sh: function "findremapped" is too slow when there is 1K luns on server,is there any way to solve it? #22

Description

@LiuXing108

There is a loop nesting in function "findremapped".
we use "scsi-rescan -f -u -m" to scan all devices.

while read -r hctl sddev id_serial_old ; do
    remapped=0
    ……
    # If udev events updated the disks already, but the multipath device isn't update
    # check for old devices to make sure we found remapped luns
    if [ -n "$mp_enable" ] && [ $remapped -eq 0 ]; then
      findmultipath "$sddev" $id_serial    
      if [ $? -eq 1 ] ; then
        remapped=1
      fi
    fi
    ……
done < $tmpfile

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions