Making all other blogs seem exciting!
RSS icon Home icon
  • Dynamically rescan LUN’s on SLES

    Posted on February 24th, 2009 ashinn 6 comments

    I’m sure this is kids play to most people, but I’ve just not done much SAN work with Linux.

    We bought a new EMC CLARiiON CX4-240, and I was just tossing it random LUN’s to do speed & HA tests. When I added a LUN I’d see it in powermt, and I didn’t know what the equivalent of devfsadm was in Linux … SLES to be specific. What can I say, I worked with Solaris way too long.

    The first step is to run: powermt display

    # powermt display
    CLARiiON logical device count=3
    —– Host Bus Adapters ——— —— I/O Paths —– —— Stats ——
    ### HW Path Summary Total Dead IO/Sec Q-IOs Errors
    3 qla2xxx optimal 6 0 – 0 0
    4 qla2xxx optimal 6 0 – 0 0

    Note the 3/4 preceding the HBA’s.

    Now, execute this:

    # echo “- – -” > /sys/class/scsi_host/host3/scan
    # echo “- – -” > /sys/class/scsi_host/host4/scan

    Its my understand this also works on RHEL and others, but YMMV. This is all buried in the PowerPath manual too, but hopefully I’ve saved someone a bit of time.

    Till next time…