Volume Commands
Use commands with the volume keyword to list the configuration of, enable, disable, start, stop, obtain the status of, and remove an Oracle ACFS volume.
Note:
The volume commands work only on the platforms on which Oracle ACFS is supported.
srvctl config volume
Displays the configuration for a specific volume or all volumes.
Syntax
srvctl config volume [-volume volume_name] [-diskgroup disk_group_name]
[-device volume_device] [-exportfile file_name]
Parameters
Table: srvctl config volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume for which you want to view the configuration. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume resides for which you want to display the configuration. |
-device volume_device | Specify the path to the volume device for which you want to display the configuration. |
-exportfile file_name | Specify the output file to which the resource configuration will be exported in JSON format for backup or resource re-creation purposes. |
Usage Notes
- If you do not specify any of the optional parameters, then SRVCTL displays the configuration information for all volumes.
- If you specify only the
-volumeparameter, then SRVCTL displays the configuration for all volumes with that name, regardless of the diskgroup. - If you specify only the
-diskgroupparameter, then SRVCTL displays the configuration information for the volumes that reside in the disk group that you specify. - If you specify only the
-deviceparameter, then SRVCTL displays the configuration information for the volume matching that device specifier. - If you specify the
-diskgroupand-deviceparameters, then SRVCTL displays the configuration information for the volume device that resides in the disk group that you specify. - This command is only available with Oracle Clusterware.
Examples
This command returns information similar to the following:
$ srvctl config volume -device /dev/asm/volume1-123
Diskgroup Name: DG1
Volume Name : VOL1
Volume Device : /dev/asm/volume1-123
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:
If you do not specify any parameters, then SRVCTL returns configuration information for all volumes, similar to the following:
$ srvctl config volume
Diskgroup name: DG1
Volume name: VOL1
Volume device: /dev/asm/volume1-123
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:
Diskgroup name: DG1
Volume name: VOL2
Volume device: /dev/asm/volume2-456
Volume is enabled.
Volume is enabled on nodes:
Volume is disabled on nodes:
srvctl disable volume
Disables Oracle Clusterware management for a specific volume or all volumes.
This command allows a volume device to be stopped by operating on the Oracle Clusterware resource for the volume. This command does not stop volume device.
Syntax
srvctl disable volume {-volume volume_name -diskgroup disk_group_name |
-device volume_device}
Parameters
Table: srvctl disable volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume that you want to disable. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume that you want to disable resides. |
-device volume_device | Alternative to using the -diskgroup parameter, you can specify the path to the volume device that you want to disable. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- You must specify a particular volume that you want to disable. You can specify a volume that resides in either a particular disk group or on a particular volume device.
Example
The following example disables a volume named VOLUME1 that resides in a disk group named DATA:
$ srvctl disable volume -volume VOLUME1 -diskgroup DATA
srvctl enable volume
Enables Oracle Clusterware management for a specific volume or all volumes.
This command allows a volume device to be started by operating on the Oracle Clusterware resource for the volume. This command does not start the volume device, and is different from the SQL command ALTER DISKGROUP ENABLE VOLUME or the ASMCMD command volenable, because these two commands bring the volume device online, in a running state, making the volume device accessible.
Syntax
srvctl enable volume {-volume volume_name -diskgroup disk_group_name |
-device volume_device}
Parameters
Table: srvctl enable volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume that you want to enable. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume that you want to enable resides. |
-device volume_device | Alternative to using the -diskgroup parameter, you can specify the path to the volume device that you want to enable. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- You must specify a particular volume that you want to enable. You can specify a volume that resides in either a particular disk group or on a particular volume device.
Example
The following example enables a volume named VOLUME1 that resides in a disk group named DATA:
$ srvctl enable volume -volume VOLUME1 -diskgroup DATA
srvctl remove volume
Removes a specific volume.
Syntax
Use this command with one of the following syntax models:
srvctl remove volume -volume volume_name -diskgroup disk_group_name [-force]
srvctl remove volume -device volume_device [-force]
Parameters
Table: srvctl remove volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume that you want to remove. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume that you want to remove resides. |
-device volume_device | Specify the path to the file system resource in which the volume that you want to remove resides. |
-force | You can use this parameter to remove the volume even if it is running. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- The volume gets created when you create volumes in Oracle ASM.
- You must specify a particular volume that you want to remove. You can specify a volume that resides in either a particular disk group or on a particular volume device.
Example
The following example removes a volume named VOLUME1 that resides in a disk group named DATA:
$ srvctl remove volume -volume VOLUME1 -diskgroup DATA
Related Topics
srvctl start volume
Starts a specific, enabled volume.
Syntax
srvctl start volume {-volume volume_name -diskgroup disk_group_name |
-device volume_device} [-node node_list]
Parameters
Table: srvctl start volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume that you want to start. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume that you want to start resides. |
-device volume_device | Alternative to using the -diskgroup parameter, you can specify the path to the volume device that you want to start. |
-node node_list | Optionally, you can specify a comma-delimited list of node names enclosed in double quotation marks ( "" ) where volumes that you want to start reside. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- The
srvctl start volumecommand does not create a volume service. Provided that the volume already exists and the volume resource is enabled, SRVCTL attempts to start it. If the volume exists but the resource is disabled, thensrvctl start volumereturns an error.
Example
The following example starts a volume named VOLUME1 that resides in a disk group named DATA:
$ srvctl start volume -volume VOLUME1 -diskgroup DATA
srvctl status volume
Displays the status of a specific volume or all volumes.
Syntax
srvctl status volume [-device volume_device] [-volume volume_name]
[-diskgroup disk_group_name] [-node "node_list"]
Parameters
Table: srvctl status volume Command Parameters
| Parameter | Description |
|---|---|
-device volume_device | Optionally, you can specify the path to the volume device for which you want to display the status. |
-volume volume_name | Optionally, you can specify the name of the volume for which you want to view the status. |
-diskgroup disk_group_name | Optionally, you can specify the name of the disk group in which the volume resides for which you want to display the status. |
-node " node_list " | Optionally, you can specify a comma-delimited list of node names enclosed in double quotation marks ( "" ) where volumes for which you want to view the status reside. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- If you do not specify any of the optional parameters, then SRVCTL displays the status for all volumes.
- If you specify only the
-volumeparameter, then SRVCTL displays the status for the volume that you specify. - If you specify only the
-diskgroupparameter, then SRVCTL displays the status for the volumes that reside in the disk group that you specify. - If you specify only the
-deviceparameter, then SRVCTL displays the status for the volume device that you specify. - If you specify the
-diskgroupand-deviceparameters, then SRVCTL displays the status for the volume device in the disk group that you specify. - If you specify the
-nodeparameter, then SRVCTL displays the status of the volumes that reside on the nodes you list.
Examples
This command displays information similar to the following:
$ srvctl status volume -volume vol1
Volume vol1 of diskgroup diskgrp1 for device volume_device_path1 is enabled
Volume vol1 of diskgroup diskgrp1 for device volume_device_path1 is running
In the preceding example, SRVCTL performs a status query on all nodes because the -node parameter is not specified.
$ srvctl status volume
Volume vol1 of diskgroup diskgrp for device volume_device_path1 is enabled
Volume vol1 of diskgroup diskgrp for device volume_device_path1 is running
Volume vol2 of diskgroup diskgrp for device volume_device_path2 is enabled
Volume vol2 of diskgroup diskgrp for device volume_device_path2 is running
In the preceding example, SRVCTL displays the status of all registered volumes because the no parameter is specified.
srvctl stop volume
Stops a specific, running volume.
Syntax
srvctl stop volume {-volume volume_name -diskgroup disk_group_name |
-device volume_device} [-node "node_list"]
Parameters
Table: srvctl stop volume Command Parameters
| Parameter | Description |
|---|---|
-volume volume_name | Specify the name of the volume you want to stop. |
-diskgroup disk_group_name | Specify the name of the disk group in which the volume you want to stop resides. |
-device volume_device | Alternative to using the -diskgroup parameter, you can specify the path to the volume device that you want to stop. |
-node " node_list " | Optionally, you can specify a comma-delimited list of node names enclosed in double quotation marks ( "" ) where volumes that you want to stop reside. |
Usage Notes
- You can only use this command with Oracle Clusterware.
- The
srvctl stop volumecommand attempts to stop (disable) the volume but it does not disable the resource or remove the volume from Oracle ASM.
Example
The following example stops a volume named VOLUME1 that resides in a disk group named DATA:
$ srvctl stop volume -volume VOLUME1 -diskgroup DATA