Oracle® Automatic Storage Management Administrator's Guide 11g Release 2 (11.2) E18951-03 |
|
|
PDF · Mobi · ePub |
This section describes the ASMCMD volume management commands.
For information about Oracle ASM Dynamic Volume Manager (Oracle ADVM), refer to "Overview of Oracle ASM Dynamic Volume Manager". For information about using SQL statements to manage volumes, refer to "Managing Volumes in a Disk Group".
Table 12-66 provides a summary of the Oracle ADVM volume management commands. To successfully run these commands, the local Oracle ASM instance must be running and the disk group required by this command must have been created and mounted in the Oracle ASM instance.
Table 12-66 Summary of ASMCMD volume management commands
Command | Description |
---|---|
Creates an Oracle ADVM volume in the specified disk group. |
|
Deletes an Oracle ADVM volume. |
|
Disables Oracle ADVM volumes in mounted disk groups. |
|
Enables Oracle ADVM volumes in mounted disk groups. |
|
Displays information about Oracle ADVM volumes. |
|
Resizes an Oracle ADVM volume. |
|
Sets attributes of an Oracle ADVM volume in mounted disk groups. |
|
Reports volume I/O statistics. |
Creates an Oracle ADVM volume in the specified disk group.
volcreate
-G
diskgroup
-s
size
[
--column
number
]
[
--width
stripe_width
]
[--redundancy
{high
|mirror
|unprotected
} ]
[--primary
{hot
|cold
}] [--secondary
{hot
|cold
}] volume
Table 12-67 describes the options for the volcreate
command.
Table 12-67 Options for the volcreate command
Option | Description |
---|---|
|
Name of the disk group containing the volume. |
|
Size of the volume to be created in units of |
|
Number of columns in a stripe set. Values range from |
|
Stripe width of a volume. The value can range from 4 KB to 1 MB, at power-of-two intervals, with a default of 128 KB. |
|
Redundancy of the Oracle ADVM volume which can be specified for normal redundancy disk groups. The range of values is as follows: |
|
Intelligent Data Placement specification for primary extents, either |
|
Intelligent Data Placement specification for secondary extents, either |
|
Name of the volume. Only alphanumeric characters are allowed; hyphens are not allowed. The first character must be alphabetic. |
When creating an Oracle ADVM volume, a volume device name is created with a unique Oracle ADVM persistent disk group number that is concatenated to the end of the volume name. The unique number can be one to three digits.
On Linux, the volume device name is in the format volume_name
-
nnn
, such as volume1-123
. On Windows the volume device name is in the format asm-
volume_name
-
nnn
, such as asm-volume1-123
. For information on mounting the volume device file, see "Creating an Oracle ACFS File System".
On Linux platforms, the volume name must be less than or equal to eleven alphanumeric characters, starting with an alphabetic character. On AIX platforms, the volume name must be less than or equal to twenty three alphanumeric characters, starting with an alphabetic character. On Windows and Solaris platforms, the volume name must be less than or equal to thirty alphanumeric characters, starting with an alphabetic character.
You can determine the volume device name with the volinfo
command, described in "volinfo".
If the --column
option is set to 1
, then striping is disabled and the stripe width is equal to the volume extent size. The volume extent size is 8 MB if the disk group allocation unit (AU) is less than or equal to 8 MB. If the AU size is greater than 8 MB, then the Oracle ADVM volume extent size is equivalent to the disk group AU size.
A successful volume creation automatically enables the volume device.
The volume device file functions as any other disk or logical volume to mount file systems or for applications to use directly.
For information about redundancy settings, see "Mirroring, Redundancy, and Failure Group Options". For information about hot and cold disk regions, see "Intelligent Data Placement".
Before creating an Oracle ADVM volume on AIX, ensure that the necessary user authorizations have been created. For information, refer to "Oracle ACFS Command-line Tools for the AIX Environment".
The following is an example of the volcreate
command that creates volume1
in the data
disk group with the size set to 10 gigabytes.
Example 12-68 Using the ASMCMD volcreate command
ASMCMD [+] > volcreate -G data -s 10G --width 64K --column 8 volume1 ASMCMD [+] > volinfo -G data volume1 Diskgroup Name: DATA Volume Name: VOLUME1 Volume Device: /dev/asm/volume1-123 State: ENABLED Size (MB): 10240 Resize Unit (MB): 64 Redundancy: MIRROR Stripe Columns: 8 Stripe Width (K): 64 Usage: Mountpath:
Deletes an Oracle ADVM volume.
voldelete
-G
diskgroup
volume
Table 12-68 describes the options for the voldelete
command.
Table 12-68 Options for the voldelete command
Option | Description |
---|---|
|
Name of the disk group containing the volume. |
|
Name of the volume. |
To successfully run this command, the local Oracle ASM instance must be running and the disk group required by this command must be mounted in the Oracle ASM instance. Before deleting a volume, you must ensure that there are no active file systems associated with the volume.
The following is an example of the voldelete
command that deletes volume1
from the data
disk group.
Disables Oracle ADVM volumes in mounted disk groups and removes the volume device on the local node.
voldisable
{ -a
| -G
diskgroup
-a
| -G
diskgroup
volume
}Table 12-69 describes the options for the voldisable
command.
Table 12-69 Options for the voldisable command
Option | Description |
---|---|
|
When used without a disk group name, specifies all volumes within all disk groups. When used with a disk group name ( |
|
Name of the disk group containing the volume. |
|
Name of the volume. |
You can disable volumes before shutting down an Oracle ASM instance or dismounting a disk group to verify that the operations can be accomplished normally without including a force option due to open volume files. Disabling a volume also prevents any subsequent opens on the volume or device file because it no longer exists.
Before disabling a volume, you must ensure that there are no active file systems associated with the volume. You must first dismount the Oracle ACFS file system before disabling the volume. See "Dismounting an Oracle ACFS File System".
You can delete a volume without first disabling the volume.
The following is an example of the voldisable
command that disables volume1
in the data
disk group.
Enables Oracle ADVM volumes in mounted disk groups.
volenable
{ -a
| -G
diskgroup
-a
| -G
diskgroup
volume
}Table 12-70 describes the options for the volenable
command.
Table 12-70 Options for the volenable command
Option | Description |
---|---|
|
When used without a disk group name, specifies all volumes within all disk groups. When used with a disk group name ( |
|
Name of the disk group containing the volume. |
|
Name of the volume. |
A volume is enabled when it is created.
The following is an example of the volenable
command that enables volume1
in the data
disk group.
Displays information about Oracle ADVM volumes.
volinfo
{ -a
| -G
diskgroup
-a
| -G
diskgroup
volume
}volinfo
{--show_diskgroup
|--show_volume
} volumedevice
Table 12-71 describes the options for the volinfo
command.
Table 12-71 Options for the volinfo command
Option | Description |
---|---|
|
When used without a disk group name, specifies all volumes within all disk groups. When used with a disk group name ( |
|
Name of the disk group containing the volume. |
|
Name of the volume. |
|
Returns only the disk group name. A volume device name is required. |
|
Returns only the volume name. A volume device name is required. |
|
Name of the volume device. |
The first example displays information about the volume1
volume in the data
disk group. This example was produced in a Linux environment. The second example displays information about the volume1
volume in the data
disk group and was produced in a Windows environment.
The mount path field displays the last mount path for the volume.
Example 12-72 Using the ASMCMD volinfo command
ASMCMD [+] > volinfo -G data volume1 Diskgroup Name: DATA Volume Name: VOLUME1 Volume Device: /dev/asm/volume1-123 State: ENABLED Size (MB): 10240 Resize Unit (MB): 64 Redundancy: MIRROR Stripe Columns: 8 Stripe Width (K): 64 Usage: ACFS Mountpath: /u01/app/acfsmounts/acfs1 ASMCMD [+] > volinfo -G data -a Diskgroup Name: DATA Volume Name: VOLUME1 Volume Device: \\.\asm-volume1-311 State: ENABLED Size (MB): 1024 Resize Unit (MB): 32 Redundancy: MIRROR Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: C:\oracle\acfsmounts\acfs1
Resizes an Oracle ADVM volume.
volresize
-G
diskgroup
-s
size
[
-f
]
volume
Table 12-72 describes the options for the volresize
command.
Table 12-72 Options for the volresize command
Option | Description |
---|---|
|
Name of the disk group containing the volume. |
|
Forces the shrinking of a volume that is not an Oracle ACFS volume and suppresses any warning message. |
|
Name of the volume. |
|
New size of the volume in units of |
If the volume is mounted on a non-Oracle ACFS file system, then dismount the file system first before resizing. If the new size is smaller than current, you are warned of possible data corruption. Unless the -f
(force) option is specified, you are prompted whether to continue with the operation.
If there is an Oracle ACFS file system on the volume, then you cannot resize the volume with the volresize
command. You must use the acfsutil
size
command, which also resizes the volume and file system. For information, see "acfsutil size".
The following is an example of the volresize
command that resizes volume1
in the data
disk group to 20 gigabytes.
Sets attributes of an Oracle ADVM volume in mounted disk groups.
volset
-G
diskgroup
[
--usagestring
string
]
[
--mountpath
mount_path
]
[--primary
{hot
|cold
}] [--secondary
{hot
|cold
}] volume
Table 12-73 describes the options for the volset
command.
Table 12-73 Options for the volset command
Option | Description |
---|---|
|
Name of the disk group containing the volume. |
|
Optional usage string to tag a volume which can be up to 30 characters. This string is set to |
|
Optional string to tag a volume with its mount path string which can be up to 1024 characters. This string is set when the file system is mounted and should not be changed. |
|
Intelligent Data Placement specification for primary extents, either |
|
Intelligent Data Placement specification for secondary extents, either |
|
Name of the volume. |
When running the mkfs
command to create a file system, the usage field is set to ACFS
and mountpath
field is reset to an empty string if it has been set. The usage
field should remain at ACFS
.
When running the mount
command to mount a file system, the mountpath
field is set to the mount path value to identify the mount point for the file system. After the value is set by the mount
command, the mountpath
field should not be updated.
The following is an example of a volset
command that sets the usage
string for a volume that is not associated with a file system.
Reports I/O statistics for Oracle ADVM volumes.
volstat
[-G
diskgroup
] [volume
]
Table 12-74 describes the options for the volstat
command.
Table 12-74 Options for the volstat command
Option | Description |
---|---|
|
Name of the mounted disk group containing the volume. |
|
Name of the volume. |
The following apply when using the volstat
command.
If the disk group is not specified and the volume name is specified, all mounted disk groups are searched for the specified volume name.
If the disk group name is specified and the volume name is omitted, all volumes are displayed for the named disk group.
If both the disk group name and the volume name are omitted, all volumes on all disk groups are displayed.
The following is an example of the volstat
command that displays information about volumes in the data
disk group.
Example 12-75 Using the ASMCMD volstat command
ASMCMD [+] > volstat -G data DISKGROUP NUMBER / NAME: 1 / DATA --------------------------------------- VOLUME_NAME READS BYTES_READ READ_TIME READ_ERRS WRITES BYTES_WRITTEN WRITE_TIME WRITE_ERRS ------------------------------------------------------------- VOLUME1 10085 2290573312 22923 0 1382 5309440 1482 0