Once ASMlib is completely configured, the root
user can apply the
/etc/init.d/oracleasm script to
create new ASM disks using block devices.
Other nodes in the cluster can then scan
for these disks and become aware of them. In
order to label disks as ASM disks, the following
command can be used:
createdisk DISKNAME /dev/path
- The ASM label for the disk.
The name chosen does not matter, but
it is a good idea to choose names logically
that will help with management down the
- The path to the block device to be
/dev/sdb1 is a block device
that ASM could label for its own use.
Creating ASM Disks with Oracleasm
After the disks have been created, verify the
disk labels with the
It is a good idea to get sysadmins used to the
idea of querying disks to make sure they are not
being used for ASM before performing any
possibly harmful actions against the system's
querydisk argument can be used for
Querying Disks with Oracleasm
If the queried device is not an ASM disk, then
FAILED will be displayed between the brackets.
In a RAC configuration, all nodes must be able
to see the same ASM devices.
The good news is that one does not have
to go through the creation of disks with ASMlib
on each system in the RAC cluster.
However, one must install ASMlib on each
Once disks have been created on one node, the
other nodes can be updated using the
scandisks argument will instruct
oracleasm to browse the
/dev tree to find devices which
have been labeled for use by ASMlib.
Scanning Disks on Other Nodes with Oracleasm
Even though disks have been tagged as being
ASM disks, one must still add the disks into
an ASM diskgroup as described in an upcoming
On Windows, ASM disks will incorporate logical
drives set up using the Windows Disk Management
These drives should contain no filesystem
and should not be assigned a drive letter.
ASM can be configured during the installation of
Oracle 11g or later through DBCA.
In Windows, the Stamp Disks button allows
the DBA to select logical drives that should be
used for ASM.
Much like ASMlib, disks that are
available as candidate devices can be labeled as
While stamping disks, one may notice the OCR
and voting disks in the list.
These disks will have a status of
“Oracle raw device file” while available
disks will say “Candidate device.”
Once disks have been stamped as ASM candidates,
it will be possible to add them to an ASM
All disks will have a prefix of
\\.\ORCLDISK plus any prefix added while
For instance, during labeling, if the DBA
elects to use a prefix of FLASH, labeled disks
will take the format \\.\ORCLDISKFLASH# where #
is an incrementing number.
Other OS – HPUX, AIX, Solaris
Each OS has its own way of representing disks.
In HPUX, AIX, and SOLARIS, there is
usually a block device and character device pair
that can be used.
On Solaris, for instance, two directories exist
/dev/dsk location is known as a
block device: a single slice or partition of a
/dev/rdsk, on the other hand, is a
character device, which is the logical
representation of the slice. When creating ASM
disks, these character devices will be
The location of character devices depends
upon the OS:
Multipathing can change the location of
character devices depending upon the system
Consult the specific documentation to
find the path to use for character devices.
Symbolic links can be used to ease management.
ln -s /dev/sdb1 /dev/ocr
ln -s /dev/sdb2 /dev/voting
This allows logical names to be referenced
during setup and makes changing paths/devices