ORACLEASM-CREATEDIS(8) Oracle ASM Support Manual ORACLEASM-CREATEDIS(8)NAMEoracleasm-createdisk - Mark a disk for the Oracle ASM Library
SYNOPSIS
oracleasm createdisk [-l <manager>] [-v] <label> <device>
oracleasm createdisk -h
oracleasm createdisk -V
DESCRIPTION
The createdisk command marks a disk for ASM use and instantiates it for
the local Oracle ASM Library. Processes connecting to the ASM Library
will be able to see the new disk.
The oracleasm-scandisks(8) command can be run on other nodes in a
cluster to import the newly marked ASM disk. See the section MANAGING
DISKS IN A CLUSTER.
If a disk is already marked, createdisk will fail.
OPTIONS
-l|--manager <manager>
Specifies the manager device to be queried. Almost always
unnecessary, as only one manager device is in use.
-v|--verbose
Verbose operation. This will print any debugging information.
<label>
The LABEL of the ASM disk created.
<device>
The DEVICE path of the disk to mark.
-h|--help
Display usage information.
-V|--version
Display version information.
MANAGING DISKS IN A CLUSTER
The Oracle ASM Library, by design, does not talk to other nodes in a
cluster. This is the job of the ASM software. The ASM Library merely
provides an interface from ASM to the disks. However, the ASM Library
does ensure that the same LABEL is used to see a disk on all nodes.
Thus, while each node may have a different device file (/dev/sda1 vs
/dev/sdc1), The ASM Library will see the label VOL1, and all nodes will
know they are accessing the same physical disk.
In a cluster, creation and removal of ASM disks is a two step process.
1. Create (oracleasm-createdisk(8)) or remove (oracleasm-
deletedisk(8)) the disk on any one node in the cluster.
2. Scan (oracleasm-scandisks(8)) the volumes on all other nodes in
the cluster.
Step (1) may be repeated as many times as necessary, adding and/or
removing multiple disks. Once all disk changes have been made, a single
call to scandisks is made on the other nodes. It will pick up all
changes at once. When configuring 100 disks, while 100 createdisk
commands need to be run on one node (possibly via a script), only one
scandisks command needs to be run on every other node.
As scandisks is run when the ASM Library driver starts up, changes are
also seen by nodes that are newly created.
SAFELY MANAGING DISKS
The Oracle ASM Library and its driver are an interface to disks. They
are not cluster-aware, and do not communicate with the ASM process or
other nodes. Thus, care must be taken when adding and removing disks.
When a disk device supports partitioning (eg, with fdisk(8) or
parted(8)), oracleasm-createdisk(8) will refuse to consider the entire
unpartitioned disk. The disk must be partitioned and that partition be
marked for ASM use. Access to unpartitioned disks has been specifically
disallowed as we have seen higher incidence of accidental repartitions
(thus overwriting ASM data) with unpartitioned than partitioned disks.
Disks that cannot be partitioned (eg, loop and md devices) are not
subject to this restriction.
When marking a disk with oracleasm-createdisk(8), make sure that the
disk partition in question is not being used elsewhere on the SAN.
When removing a disk with the oracleasm-deletedisk(8) command, make
sure that the ASM disk is not used by any ASM process anywhere on the
SAN.
Care must also be taken when running the oracleasm-scandisks(8)
command. Use the -s option when disks that are being scanned are
already in use by ASM processes. If in-use disks do not need to be
scanned, they can be excluded with the -x option. Finally, the disks
needing to be scanned can be explicitly specified on the scandisks
command line.
EXAMPLES
oracleasm createdisk VOL1 /dev/sda1
Mark the device /dev/sda1 as VOL1.
SEE ALSOoracleasm-listdisks(8), oracleasm-deletedisk(8), oracleasm-scandisks(8)AUTHOR
Oracle Corporation
COPYRIGHT
Copyright 2007, 2008 Oracle. All rights reserved.
ORACLEASM
Part of the oracleasm(8) support tools.
oracleasm-support 2.1.4 04/21/2009 ORACLEASM-CREATEDIS(8)