ASM: Device "/dev/iscsi-iqn.2006-01.com.openfiler:recovol-lun-0-part1” is already labeled for ASM disk"

When trying to create ASMLib disk by using oracleasm utility the process fails complaining that the disk is already marked as ASM disk, see example below:

# /etc/init.d/oracleasm createdisk ASMB2B_DISK02 /dev/mapper/ion_vdisk1p1 
Marking disk "ASMB2B_DISK02" as an ASM disk:               [FAILED]

Under /var/log/oracleasm we can find the following entry:

Device "/dev/mapper/ion_vdisk1p1" is already labeled for ASM disk ""


The disk to be created as ASMLib disk was part of ASM, or it was used as ASMLib in a previous configuration.

If the disk was part of ASM before, it has already an ASM header. Therefore, the disk cannot be created as ASMLib disk again.

The disks header needs to be renamed or removed to create a new ASMLib disk. 

Try to rename/relabel the ASMLib disks by

# /etc/init.d/oracleasm renamedisk <device_name> <new_label>

or

# /etc/init.d/oracleasm force-rename <device_name> <new_label>

 

2. Recreate ASMLib volumes by performing following actions on all disks needed to be created as ASMLib disks.

- To overwrite the header please run the following command:

# dd if=/dev/zero of=/dev/DEVICE_NAME bs=1024 count=4

- Then proceed to create the ASMLib disk

# /etc/init.d/oracleasm createdisk DISK_NAME /dev/DEVICE_NAME

- The process will finish correctly as in example below:

# /etc/init.d/oracleasm createdisk ASMODS_DISK01 /dev/mapper/ion_vdisk1p1
Writing disk header: done
Instantiating disk: done

- Verify ASMLib disk has been labled correctly:

# /etc/init.d/oracleasm querydisk ASMODS_DISK01
Disk "ASMODS_DISK01" is a valid ASM disk

or

[root@shsdbdr01 by-path]# /usr/sbin/oracleasm createdisk DATAVOL ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:datavol-lun-0-part1
Device "ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:datavol-lun-0-part1" is already labeled for ASM disk ""
[root@shsdbdr01 by-path]# dd if=/dev/zero of=/dev/disk/by-path/ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:datavol-lun-0-part1 bs=1024 count=4
4+0 records in
4+0 records out
4096 bytes (4.1 kB) copied, 0.124422 s, 32.9 kB/s
[root@shsdbdr01 by-path]# /usr/sbin/oracleasm createdisk DATAVOL ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:datavol-lun-0-part1
Writing disk header: done
Instantiating disk: done
[root@shsdbdr01 by-path]# dd if=/dev/zero of=/dev/disk/by-path/ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:recovol-lun-0-part1 bs=1024 count=4
4+0 records in
4+0 records out
4096 bytes (4.1 kB) copied, 0.138472 s, 29.6 kB/s
[root@shsdbdr01 by-path]# /usr/sbin/oracleasm createdisk RECOVOL /dev/disk/by-path/ip-192.168.2.70:3260-iscsi-iqn.2006-01.com.openfiler:recovol-lun-0-part1
Writing disk header: done
Instantiating disk: done
[root@shsdbdr01 by-path]# /usr/sbin/oracleasm listdisks
CRSVOL
DATAVOL
RECOVOL


For reference Oracle Metalink id :1640224.1


Comments

Popular posts from this blog

How to fix Oracle SQL Developer connection issue "Got minus one from a read call"

How to troubleshoot Long Running Concurrent Request in EBS 12.2

Few Important steps of Oracle Database Clone