Oracle RAC - ASMLib commands
Oracle RAC Solution · Config document · referenced from Storage and ASM disks
oracleasm-discover output contradict the disk table and the later ASMCA screens: see the explanation after the output.The ASMLib command set that turns the five shared partitions into the ASM disks ASMDISK1 to ASMDISK5: configuration of the driver, loading it, labelling the disks, and the checks that both nodes and the ASM library see them.
| Item | Value |
|---|---|
| Run as | root |
oracleasm configure -i, oracleasm init | on oradb01 and oradb02 |
oracleasm createdisk | on one node only; the notes do not say which |
oracleasm scandisks, oracleasm listdisks, oracleasm-discover | on oradb01 and oradb02 |
| Versions | oracleasm-support 2.1.8-1, oracleasmlib 2.0.4-1, kernel driver from the SLES 11 SP3 repository |
| Needs first | the udev names /dev/ORADB-* from udev rules for the ASM disks |
The commands
$ oracleasm configure -i $ oracleasm init $ oracleasm createdisk ASMDISK1 /dev/ORADB-CRS $ oracleasm createdisk ASMDISK2 /dev/ORADB-DATA01 $ oracleasm createdisk ASMDISK3 /dev/ORADB-DATA02 $ oracleasm createdisk ASMDISK4 /dev/ORADB-FRA $ oracleasm createdisk ASMDISK5 /dev/ORADB-ONTRLG $ oracleasm scandisks $ oracleasm listdisks $ oracleasm-discover 'ORCL:*'
The output
The notes keep output for four of the commands. The lines in square brackets are mine and say which command the following lines belong to; in the first block the text after each colon is what was typed.
output 28 lines
[oracleasm configure -i] Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done [oracleasm init] Creating /dev/oracleasm mount point: /dev/oracleasm Loading module "oracleasm": oracleasm Configuring "oracleasm" to use device physical block size Mounting ASMlib driver filesystem: /dev/oracleasm [oracleasm listdisks] ASMDISK1 ASMDISK2 ASMDISK3 ASMDISK4 ASMDISK5 [oracleasm-discover 'ORCL:*'] Using ASMLib from /opt/oracle/extapi/64/asm/orcl/1/libasm.so [ASM Library - Generic Linux, version 2.0.4 (KABI_V2)] Discovered disk: ORCL:ASMDISK1 [2095104 blocks (1072693248 bytes), maxio 128] Discovered disk: ORCL:ASMDISK2 [419428352 blocks (214747316224 bytes), maxio 128] Discovered disk: ORCL:ASMDISK3 [209713152 blocks (107373133824 bytes), maxio 128] Discovered disk: ORCL:ASMDISK4 [209713152 blocks (107373133824 bytes), maxio 128] Discovered disk: ORCL:ASMDISK5 [41940992 blocks (21473787904 bytes), maxio 128]
| Command | What it does |
|---|---|
oracleasm configure -i | asks four questions and writes the driver configuration: the driver interface belongs to grid:asmadmin, the driver starts at boot and scans for disks at boot |
oracleasm init | creates and mounts /dev/oracleasm and loads the kernel module |
oracleasm createdisk <label> <device> | writes the ASMLib label into the header of the partition; done once, because the disks are shared |
oracleasm scandisks | reads the labels of all disks; this is how the second node learns about disks labelled on the first |
oracleasm listdisks | prints the labels the node knows |
oracleasm-discover 'ORCL:*' | discovers disks through the ASM library, the way ASM and the Grid Infrastructure installer do with the discovery string ORCL:* |
Two things in this command set do not agree with the rest of the notes.
| ASMLib disk | Created on | Size by the disk table | Size by oracleasm-discover |
|---|---|---|---|
ASMDISK1 | /dev/ORADB-CRS | 1073 MB | 1072693248 bytes |
ASMDISK2 | /dev/ORADB-DATA01 | 107.4 GB | 214747316224 bytes |
ASMDISK3 | /dev/ORADB-DATA02 | 107.4 GB | 107373133824 bytes |
ASMDISK4 | /dev/ORADB-FRA | 214.7 GB | 107373133824 bytes |
ASMDISK5 | /dev/ORADB-ONTRLG | 21.5 GB | 21473787904 bytes |
By the discovery output ASMDISK2 is the large disk; by the createdisk commands, the disk table and ASMCA (which later shows ASMDISK2 and ASMDISK3 with 102399 MB each and ASMDISK4 with 204799 MB) the large disk is ASMDISK4. The notes do not explain the difference, and the output is shown as it stands.
The second is the order. In the notes this command set is chapter 5 and the udev rules are chapter 6, but createdisk already uses the /dev/ORADB-* names those rules provide. The udev rules were in place first.
Checked against ASMLib 3 and Oracle AI Database 26ai
| As built | Today |
|---|---|
| ASMLib 2.0 with a kernel driver | ASMLib 3 adds an io_uring interface and works without the oracleasm driver. Oracle's matrix lists SLES 15 with the driver package oracleasm-kmp-default 2.0.8 and SLES 16 with the built-in io_uring path, version 3.1.1 |
oracleasm-support 2.1.8, oracleasmlib 2.0.4 | For SLES 15: oracleasm-support 2.1.12 and oracleasmlib 2.0.17. SLES 16 ships no oracleasm package of its own |
discovery string ORCL:* | Unchanged in the 26ai guide |
| the alternative that came with 12c, the ASM Filter Driver | Deprecated in 19c and desupported in 26ai; Oracle recommends moving to ASMLib 3 |
partprobe after partitioning | Still in Oracle's 26ai procedure |
ASMDISK1, 1073 MB, for OCR and voting file | Above the 11.2 minimum of 300 MB for each. Below today's: 26ai asks for 2 GB with external redundancy |
Whether the oracleasm subcommands print the same lines in version 3 is not something I checked; the table covers what exists, not the wording of the output.