Google it ....

Showing posts with label ASM disks. Show all posts
Showing posts with label ASM disks. Show all posts

Friday, January 18, 2019

Disk "DATA01" defines an unmarked device Dropping disk: failed

Hi,

Oracleasm deletedisk failed with error:
/usr/sbin/oracleasm deletedisk DATA01
Disk "DATA01" defines an unmarked device
Dropping disk: failed
Unable to delete disk "DATA01"

Here I'll show you step by step how to solve this problem :

/usr/sbin/oracleasm deletedisk DATA01
Disk "DATA01" defines an unmarked device
Dropping disk: failed
Unable to delete disk "DATA01"
-bash-3.2$ /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Cleaning disk "DATA01"
Scanning system for ASM disks...
-bash-3.2$ /usr/sbin/oracleasm deletedisk DATA01
Disk "DATA01" defines an unmarked device
Dropping disk: failed
Unable to delete disk "DATA01"
-bash-3.2$ /etc/init.d/oracleasm scandisks
-bash: /etc/init.d/oracleasm: Permission denied
-bash-3.2$ 
-bash-3.2$ 
-bash-3.2$ 
-bash-3.2$ id
uid=501(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1300(asmdba),1301(asmoper)
-bash-3.2$ 
-bash-3.2$ 
-bash-3.2$ logout
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# /usr/sbin/oracleasm listdisks
DATA01
DATA02
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# 
[root@test-db ~]# /usr/sbin/oracleasm deletedisk DATA01
Disk "DATA01" defines an unmarked device
Dropping disk: done
[root@test-db ~]# /usr/sbin/oracleasm listdisks
DATA02
[root@test-db ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@test-db ~]# /usr/sbin/oracleasm listdisks
DATA02

Problem was that I tried to delete disk with grid user and it doesn't have permission to do that, therefore delete must use with root user.

Monday, April 27, 2015

How to find mapping of ASM disks to Physical Devices?

Here I'll show you easy way to find which physical device is corresponding for ASM disk.
Login with root user
1) Identify asm disks
/etc/init.d/oracleasm listdisks
DATA01

2) Query disks FOR DATA01
/etc/init.d/oracleasm querydisk -p DATA01
Disk "DATA01" is a valid ASM disk
/dev/sde2: LABEL="DATA01" TYPE="oracleasm"

or find this way

/etc/init.d/oracleasm querydisk -d DATA01
Disk "DATA01" is a valid ASM disk on device /dev/sde2[8,66]
ls -l /dev | grep 8 | grep 66
brw-r----- 1 root disk     8,  66 Jan 11 06:51 sde2

It means that physical partition sde2 is using for ASM disk DATA01.