Step 1: Create partiton
# fdisk /dev/sdx
n
p
Default full size
w
Step 2: Create ASM Disk
# oracleasm createdisk <ASM Vol> /dev/sdxx
Step 3: Scan ASM Disk
# oracleasm scandisks
Step 4: List ASM Disk
# oracleasm listdisks
Step 5: Change to directory: /dev/oracleasm/disks and Check ASM Vol exist with oracle permision
# cd /dev/oracleasm/disks
# ls -l
Example:-
————-
Step 1: Create partiton
[root@testbox ~]# fdisk /dev/sdd
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xdb0b3df8.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599): 104857599
Partition 1 of type Linux and of size 50 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@testbox ~]#
Step 2: Create ASM Disk
[root@testbox ~]# oracleasm createdisk ASM1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@testbox ~]#
Step 3: Scan ASM Disk
[root@testbox ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
[root@testbox ~]#
Step 4: List ASM Disk
[root@testbox ~]# oracleasm listdisks
ASM1
[root@testbox ~]#
Step 5: Change to directory: /dev/oracleasm/disks and Check ASM Vol exist with oracle permision
[root@testbox ~]# cd /dev/oracleasm/disks
[root@testbox disks]# ls -l
total 0
brw-rw—- 1 oracle oinstall 8, 49 Jan 1 02:01 ASM1
brw-rw—- 1 oracle oinstall 8, 65 Jan 1 02:01 ASM2
brw-rw—- 1 oracle oinstall 8, 81 Jan 1 02:01 ASM3
brw-rw—- 1 oracle oinstall 8, 97 Jan 1 02:01 ASM4
[root@testbox disks]#