Administering Oracle ASMLIB and Disks

Review this information to administer the Oracle Automatic Storage Management library driver and disks.

To administer the Oracle Automatic Storage Management library driver and disks, use the /usr/sbin/oracleasm initialization script with different options, as described in the following table:

Table A-4 Disk Management Tasks Using ORACLEASM

Task Command Example Description

Configure or reconfigure ASMLIB

oracleasm configure -i

Use the configure option to reconfigure the Oracle Automatic Storage Management library driver, if necessary.

To see command options, enter oracleasm configure without the -i flag.

Change system restart load options for ASMLIB

oracleasm configure -e

Options are -e to enable and -d to disable.

Use the -e and -d options to change the actions of the Oracle Automatic Storage Management library driver when the system starts. The -e option causes the Oracle Automatic Storage Management library driver to load when the system starts.

Load or unload ASMLIB without restarting the system

oracleasm init

Options are init to load and exit to unload.

Use the init and exit options to load or unload the Oracle Automatic Storage Management library driver without restarting the system.

Mark a disk for use with ASMLIB

oracleasm createdisk VOL1 /dev/sda1

Use the createdisk option to mark a disk device for use with the Oracle Automatic Storage Management library driver and give it a name, where labelname is the name you want to use to mark the device, and devicepath is the path to the device:

oracleasm createdisk labelname devicepath

Unmark a named disk device

oracleasm deletedisk VOL1

Use the deletedisk option to unmark a named disk device, where diskname is the name of the disk:

oracleasm deletedisk diskname

Caution: Do not use this command to unmark disks that are being used by an Oracle Automatic Storage Management disk group. You must delete the disk from the Oracle Automatic Storage Management disk group before you unmark it.

Determine if ASMLIB is using a disk device

oracleasm querydisk

Use the querydisk option to determine if a disk device or disk name is being used by the Oracle Automatic Storage Management library driver, where diskname_devicename is the name of the disk or device that you want to query:

oracleasm querydisk diskname_devicename

List Oracle ASMLIB disks

oracleasm listdisks

Use the listdisks option to list the disk names of marked Oracle ASM library driver disks.

Identify disks marked as ASMLIB disks

oracleasm scandisks

Use the scandisks option to enable cluster nodes to identify which shared disks have been marked as ASMLIB disks on another node.

Rename ASMLIB disks

oracleasm renamedisk VOL1 VOL2

Use the renamedisk option to change the label of an Oracle ASM library driver disk or device by using the following syntax, where manager specifies the manager device, label_device specifies the disk you intend to rename, as specified either by OracleASM label name or by the device path, and new_label specifies the new label you want to use for the disk:

oracleasm renamedisk [-l manager] [-v] label_device new_label

Use the -v flag to provide a verbose output for debugging.

Caution: You must ensure that all Oracle Database and Oracle ASM instances have ceased using the disk before you relabel the disk. If you do not do this, then you may lose data.