Setting, Clearing, and Scanning Oracle ASM Filter Driver Labels

Setting a label provisions a disk to be used by Oracle ASMFD. After the label is set, the specified disk is managed by Oracle ASMFD.

You can add, remove, and scan labels with the ASMCMD afd_label, afd_unlabel, and afd_scan commands. For example:

$ $ORACLE_HOME/bin/asmcmd afd_label 'disk0' '/dev/rdsk/mydisks/disk0'

$ $ORACLE_HOME/bin/asmcmd afd_unlabel 'disk0'

$ $ORACLE_HOME/bin/asmcmd afd_scan '/dev/rdsk/mydisks/*'

For information about ASMCMD commands to add and remove labels on Oracle ASMFD disks, refer to "afd_label", "afd_unlabel", and "afd_scan". In addition, ASMCA provides support for adding and removing labels on Oracle ASMFD disks. For information about using ASMCA to administer disk groups, refer to "Managing Disk Groups with ASMCA".

You can also manage labels with SQL statements. You can set a label with the ALTER SYSTEM LABEL SET SQL statement. For example:

SQL> ALTER SYSTEM LABEL SET 'disk0' TO '/dev/disk0';
System altered.

SQL> SELECT UPPER(path) FROM V$ASM_DISK ORDER BY PATH;
UPPER(PATH)
--------------------------------------------------------------------------------
AFD:DISK0

When you run the statement, you can use the optional RENAME or MIGRATE option. If a disk was previously provisioned for Oracle ASMFD, you can rename the label with the RENAME option. Note that the device should not be managed with Oracle ASMFD when the command is run. If a disk was previously used for an Oracle ASM disk group and the disk group has been dismounted, then you can label this disk using the MIGRATE option.

You can use ALTER SYSTEM LABEL CLEAR to remove the label from a device and stop Oracle ASMFD from managing the device. For example:

SQL> ALTER SYSTEM LABEL CLEAR 'disk0';
System altered.

You can use ALTER SYSTEM LABEL SCAN on remote nodes after the ALTER SYSTEM LABEL SET command is run on the local node.

Because ALTER SYSTEM LABEL SET statement writes the label on the disk header and the disk is shared across nodes, the same statement is not run on other nodes of the cluster.

If the device-path is not specified, then the statement uses the AFD_DISKSTRING parameter value to perform the scan operation.

SQL> ALTER SYSTEM LABEL SCAN