2 Replies Latest reply: May 20, 2013 3:22 AM by richi RSS

    oracleasm deletedisk failed

    richi
      Hello all, I have a strange situation on a production environment.
      I have 2 fresh systems with SLES 11.2 and a IBM SAN.

      I have 6 lun's exported to both servers no Grid Infrastructure and:
      node1
      node1:~ # rpm -qa | grep asm
      oracleasm-support-2.1.7-1.SLE11
      libasm1-0.152-4.7.86
      oracleasm-2.0.5-7.26.3
      libasm1-32bit-0.152-4.7.86
      oracleasm-kmp-default-2.0.5_3.0.38_0.5-7.26.3
      oracleasmlib-2.0.4-1.SLE11
      node2
      node2:~ # rpm -qa | grep asm
      oracleasmlib-2.0.4-1.SLE11
      libasm1-0.152-4.7.86
      oracleasm-kmp-default-2.0.5_3.0.38_0.5-7.26.3
      oracleasm-2.0.5-7.26.3
      oracleasm-support-2.1.7-1.SLE11
      libasm1-32bit-0.152-4.7.86
      I have created one asmdisk with oracleasm create disk:
      node1
      node1:~ # oracleasm createdisk DATA1 /dev/mapper/STORAGE0LUN1
      Writing disk header: done
      Instantiating disk: done
      node1:~ d # oracleasm listdisks
      DATA1
      node2
      node2:~ # oracleasm scandisks
      Reloading disk partitions: done
      Cleaning any stale ASM disks...
      Scanning system for ASM disks...
      Instantiating disk "DATA1"
      node2:~ # oracleasm listdisks
      DATA1
      Until now all seems to work just fine.
      Now I want to delete DATA1 disk from node2 but disk can not be deleted:
      node2
      node2:~ # oracleasm querydisk /dev/mapper/STORAGE0LUN1
      Device "/dev/mapper/STORAGE0LUN1" is marked an ASM disk with the label "DATA1"
      node2:~ # oracleasm deletedisk DATA1
      Clearing disk header: failed
      Unable to clear disk "DATA1"
      node2:~ # oracleasm deletedisk /dev/mapper/STORAGE0LUN1
      Clearing disk header: failed
      Unable to clear disk "DATA1"
      node2:~ # oracleasm deletedisk -v /dev/mapper/STORAGE0LUN1
      Disk "DATA1" is a valid ASM disk
      Clearing disk header: oracleasm-write-label: Unable to open device "/dev/oracleasm/disks/DATA1": Device or resource busy
      failed
      Unable to clear disk "DATA1"
      node2:~ # oracleasm querydisk -p data1
      Disk "DATA1" is a valid ASM disk
      /dev/sdh: LABEL="DATA1" TYPE="oracleasm"
      /dev/sdn: LABEL="DATA1" TYPE="oracleasm"
      /dev/mapper/STORAGE0LUN1: LABEL="DATA1" TYPE="oracleasm"
      I'm trying to delete the disk from the node where it was created but the same, can not be deleted.
      node1
      node1:~ # oracleasm querydisk -p data1
      Disk "DATA1" is a valid ASM disk
      /dev/sdh: LABEL="DATA1" TYPE="oracleasm"
      /dev/sdn: LABEL="DATA1" TYPE="oracleasm"
      /dev/mapper/STORAGE0LUN1: LABEL="DATA1" TYPE="oracleasm"
      node1:~ # oracleasm deletedisk -v DATA1
      Clearing disk header: oracleasm-write-label: Unable to open device "/dev/oracleasm/disks/DATA1": Device or resource busy
      failed
      Unable to clear disk "DATA1"
      Any help is appreciated. Thank you.

      Edited by: richi on May 18, 2013 4:53 PM
        • 1. Re: oracleasm deletedisk failed
          Catch_22
          You might want to try:
          fuser -m /dev/mapper/STORAGE0LUN1
          ... to see which process is looking the device.


          Assuming the disk isn't in use or required by any ASM diskgroup in use by any process, you could try the following:
          dd if=/dev/zero of=/dev/mapper/STORAGE0LUN1 bs=1024 count=100
          Then use the following on both nodes to check the result:
          /etc/init.d/oracleasm scandisks
          /etc/init.d/oracleasm listdisks
          • 2. Re: oracleasm deletedisk failed
            richi
            Hello,
            I have found the problem.
            In /etc/sysconfig/oracleasm I have changed the line
            ORACLEASM_SCANORDER="STORAGE0LUN"
            in
            ORACLEASM_SCANORDER="dm"
            ... and now all work fine. I can delete asmdisks from every node.