5 Replies Latest reply: Jan 14, 2013 10:12 AM by 984737 RSS

    oracleasm disk label contains an invalid character

    Dude!
      Hi,

      Oracle 11g 10.2.0.1, Virutalbox, Guest OS Oracle Enterprise Linux 5.5 with ASMLib

      I wanted to re-create the ASM instance. I deleted all data and used oracleasm deletedisk to remove the devices.

      For some reason oracleasm will not register any of the disks again.

      # oracleasm createdisk /dev/sdb VOL1
      Disk label "/dev/sdb" contains an invalid character

      I tried dd, gparted and other tools to change the data. It seems the conflict is somewhere else, in particular since I re-created the virtual disks from scratch. This is only a test environment and I deleted the physical disks and recreated new devices using the Virtual Disk Manager in Virtualbox. I used fdisk to create new partitions, but he problem remains.

      Below some more results:

      # oracleasm scandisks
      Reloading disk partitions: done
      Cleaning any stale ASM disks...
      Scanning system for ASM disks...
      #

      # oracleasm deletedisk /dev/sdb1
      Device "/dev/sdb1" is not marked as an ASM disk

      # oracleasm querydisk /dev/sdb1
      Device "/dev/sdb1" is not marked as an ASM disk

      fdisk -l /dev/sdb1

      Disk /dev/sdb1: 2146 MB, 2146765824 bytes
      255 heads, 63 sectors/track, 260 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes

      Disk /dev/sdb1 doesn't contain a valid partition table


      Any ideas?

      Thanks,
      Markus

      Edited by: Markus Waldorf on Sep 15, 2010 8:34 PM
        • 1. Re: oracleasm disk label contains an invalid character
          Ronny Egner
          Hi,

          how about
          oracleasm createdisk VOL1 /dev/sdb1
          Note that you mixed /dev/sdb with /dev/sdb1. Of course /dev/sdb1 does not contain a partition table - it is a partition!


          --
          Ronny Egner
          My Blog: http://blog.ronnyegner-consulting.de
          • 2. Re: oracleasm disk label contains an invalid character
            445103
            on a physical disk (or it can be also LUN), let's say /dev/sda you create one or more partitions which will be than labeled as: /dev/sda1, /dev/sda2 ... etc.

            using oracleasm tool, you create asm disks on a partitions not on the physical disk itself ... i.e. you will use partition /dev/sda1, /dev/sda2 to create asm disk.

            cheers,
            goran
            • 3. Re: oracleasm disk label contains an invalid character
              Dude!
              Thanks for the responses. From what I understand, ASMLib requires that the candidate disks to be partitioned before they can be accessed.

              For instance:

              # oracleasm createdisk VOL1 /dev/sdb
              Device "/dev/sdb" is not a partition

              But looking at your post, I noticed that I simply used a wrong command syntax and need to specify the label first, not the device.

              # oracleasm createdisk VOL1 /dev/sdb1
              Writing disk header: done
              Instantiating disk: done

              Silly me ;-) Although I think specifying the device first was more intuitive, but the resulting error message should have rather said "no such device VOL1..."
              • 4. Re: oracleasm disk label contains an invalid character
                445103
                LOL ... I also failed to notice syntax error but was rather lead by the error message:
                >
                Disk label "/dev/sdb" contains an invalid character
                >

                cheers,
                goran
                • 5. Re: oracleasm disk label contains an invalid character
                  984737
                  It's a little more than intuitive. Below is the entry straight out of the man pages.


                  ORACLEASM-CREATEDIS(8) ORACLEASM-CREATEDIS(8)

                  NAME
                  oracleasm-createdisk - Mark a disk for the Oracle ASM Library

                  SYNOPSIS
                  oracleasm createdisk [-l <manager>] [-v] <device> <label>
                  oracleasm createdisk -h
                  oracleasm createdisk -V