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

    Posted on February 24th, 2009 ashinn No 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…

     

    6 responses to “Dynamically rescan LUN’s on SLES”

    1. Hi,

      Just to make sure I understand well. Is this all you need to do to get your SLES host to discover a newly presented LUN (without rebooting) before running “# powermt config” in order to recognize and configure it?

      have a good day,

      Gilles

    2. Hello Gilles,

      Yes- that’s the method I’ve been using to add LUN’s to my SLES machines.

      Here’s a snip of me adding a 3GB test LUN to show you:

      nw1:~ # powermt display
      Symmetrix logical device count=0
      CLARiiON logical device count=2
      Hitachi logical device count=0
      Invista logical device count=0
      HP xp logical device count=0
      Ess logical device count=0
      HP HSx logical device count=0
      ==============================================================================
      ----- Host Bus Adapters --------- ------ I/O Paths ----- ------ Stats ------
      ### HW Path Summary Total Dead IO/Sec Q-IOs Errors
      ==============================================================================
      3 qla2xxx optimal 4 0 - 0 0
      4 qla2xxx optimal 4 0 - 0 0

      nw1:~ # echo "- - -" > /sys/class/scsi_host/host3/scan
      nw1:~ # echo "- - -" > /sys/class/scsi_host/host4/scan
      nw1:~ # powermt display
      Symmetrix logical device count=0
      CLARiiON logical device count=3
      Hitachi logical device count=0
      Invista logical device count=0
      HP xp logical device count=0
      Ess logical device count=0
      HP HSx logical device count=0
      ==============================================================================
      ----- 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

      nw1:~ # fdisk -l

      --- snip ---
      Disk /dev/emcpowerf: 3221 MB, 3221225472 bytes
      100 heads, 62 sectors/track, 1014 cylinders
      Units = cylinders of 6200 * 512 = 3174400 bytes

      Disk /dev/emcpowerf doesn't contain a valid partition table
      --- snip ---

    3. Hi Ashinn,

      Thank you very much for your answer.

      Bye,

      Gilles

    4. Hi,

      We have SLES here, and I am also from a Solaris background.

      Can you think of any cons using powerpath on Linux? I have read on some other forum that when the kernel is upgraded on Linux the powerpath package has to be reinstalled. Not that we upgrade the kernel often, but it seems that some people do, or have I read rubbish elsewhere?

      Cheers, a

    5. I personally havent had any issues using SLES update with PP, and I’ve gone from SP1->SP2 and then the usual kernel updates that come out time to time. On quite a few different machines too. FWIW I’ve only used PP 5.x w/Linux, before that only on Solaris. Its possible older versions installed like IBM’s RDAC (see below) and did cause issues.

      RDAC on the other hand (IBM’s version of PP for their crappy storage equipment) does build its own kernel/modules when you install it. I’ve always had to reinstall RDAC when doing a kernel update.

      Thankfully we got rid of all of that IBM storage gear 🙂

    6. Hi,

      In my case I just can’t see nothing more than:

      [root@alfrmon01 ~]# ls /dev/emcp*
      /dev/emcpower

      I have two nodes (CentOS 5.4_x86_64 with Emulex 5.3.0). In node2 I can see and mount the storage array without any problem but under node1… nop.

      [root@node01 ~]# powermt display dev=all
      Device(s) not found.

      Any tip?

      Thanks in advance

    Leave a reply