TAS Disk Space Management
This chapter describes how to manage a TAS disk space.
Last updated
This chapter describes how to manage a TAS disk space.
Last updated
Disk space properties can be set when creating or modifying a disk space.
When creating a disk space, the AU_SIZE property is set. For more information about the allocation unit and extents, refer to "" and "" of “”.
For information about how to configure AU_SIZE in a disk space, refer to "".
This section describes how to create a disk space.
The following devices can be used in a disk space.
Character Device A physical device can be used as a character device.
Block Device A physical disk device can be used as a block device in Linux. Since direct I/O is not guaranteed in other OSs, a block device is not supported.
A disk space can be created using the CREATE DISKSPACE SQL statement.
Consider the following when creating a disk space. 디스크 스페이스를 생성할 때 다음의 사항들을 고려해야 합니다.
Redundancy level To use the TAS mirroring function, configure the redundancy level.
Failure group definition
A failure group can be configured. If a failure group is configured, then copies are created in separate failure groups during mirroring. If a failure group is not configured, then each disk becomes a failure group. If a failure group is divided, operation is not interrupted even when a problem occurs in the group.
Disk space properties Configures properties such as the allocation unit size.
TAS automatically recognizes the size of each disk device. If the size of the disk device cannot be automatically recognized or if the usage size of the disk device is limited, then use the SIZE clause in the disk when creating a disk space. To name a disk, use the NAME clause.
The disk size and name can be checked by using the V$AS_DISK view.
The following is an example of creating a disk space named ds0 with a redundancy level of NORMAL and failure groups of fg1 and g2. Set the AS_DISKSTRING initialization parameter to '/devs/disk*', and use the disk spaces that are found as a TAS disk.
In the above example, the NAME clause was used to specify a name for each disk. If disk names are not specified, then a default name in the "{Disk Space Name}_####" format is given; "####" is the disk namein the disk space.
In the example, AU_SIZE is set to 4MB. To check the allocation unit size that is configured when creating a disk space, use the V$AS_DISKSPACE view.
A disk space can be configured by using the ALTER DISKSPACE statement. A disk can be added or removed from a disk space during operation, and disk space rebalancing can be performed.
When a disk is added or removed, the changes are not applied immediately to the disk space. This is because the data in the existing disks must be evenly redistributed to the new disks when disks are added, and if a disk is removed, the data of the removed disk must be redistributed to the remaining disks to prevent data loss.
This process of evenly redistributing data in a disk space is called rebalancing. Adding orremoving a disk is applied in a disk space through disk space rebalancing.
A disk can be added in a disk space by using the ADD clause of the ALTER DISKSPACE statement. Disk related clauses and the failure groups used in the CREATE DISKSPACE statement are used in the ADD clause.
The following example shows a SQL statement that adds a disk to disk space ds0. New disk devices'/devs/disk105' and '/devs/disk106' are added to the failure group fg1 of disk space ds0. A disk was added by using the REBALANCE clause, rebalancing the disk space.
A disk can be removed from a disk space by using the DROP clause of the ALTER DISKSPACE statement.
The following example shows a SQL statement that removes disks "disk105" and "disk 106" from disk space ds0.
When a disk is in the FAIL state due to disk failure, the disk can be removed using the FORCE option. The following example shows a SQL statement that removes a disk in the 'FAIL' state.
All disks in a failure group can be removed. The following example shows a SQL statement that removes all disks from the failure group fg1 of disk space ds0.
A disk can be added or removed through a single SQL statement.
In the following example, disk "disk204" is removed from disk space ds0, and disk device '/devs/disk205'is added in the failure group fg2 of disk space ds0.
Disks can be resized by using the RESIZE clause of the ALTER DISKSPACE statement.
The new size must be equal to or smaller than physical size of the actual disk. You must enter the bigger value than the current value, as decreasing the size is not currently supported.
If you run the RESIZE command, the disk is changed to PREPARE_RESIZE status, in which the disk size is still kept unchanged. To change the disk size completely, run the REBALANCE command. If youwant to cancel the resizing, run the UNPREPARE command to revert the disk to the previous status.
In the following example, the size of disk105 in disk space ds0 is changed to 512G.
Size of two or more disks can be changed at once.
In the following example, all disks in the failure group fg1 are resized to 512G.
In the following example, all disks in disk space ds0 are resized to 512G.
The prepared states of a disk for add, drop, and force drop can be undone by using the UNPREPARE clause of the ALTER DISKSPACE statement.
The PREPARE_DROP, PREPARE_FORCE, and PREPARE_ADD states are restored back to the ONLINE, FAIL, and UNUSED states, respectively. The PREPARE states indicate that the rebalance command has not been executed on the disk yet. After executing the command, the state cannot be undone by using the UNPREPARE clause.
The following example restores the state of disk105 in ds0 from PREPARE_DROP to ONLINE.
Rebalancing can be performed manually in a case such as when it has not been performed when addingor removing a disk.
The following example shows a SQL statement that rebalances the disk space ds0.
The following example shows how to use the WAIT option to wait until rebalancing is complete.
Using the REBALANCE clause with the FORCE option forcibly performs rebalancing even if there is no disk to add or remove. If the option is used, rebalancing performance decreases because the volume of extents to move increases.
To check if rebalancing is complete, retrieve the disk state from the V$AS_DISK view. Rebalancing jobs in progress can be checked from the V$AS_OPERATION view.
Files in a disk space can be deleted by using the DROP clause of the ALTER DISKSPACE statement.
The following example shows a SQL statement that deletes the file '+DS0/file000.dtf' from the disk spaceds0.
Multiple files can be deleted from a disk space at one time by listing multiple file names. Each file name must be separated by a comma (,).
The following example shows a SQL statement that deletes multiple files at once from disk space ds0. In this example, the files '+DS0/file000.dtf' and '+DS0/file001.dtf' are deleted from the disk space ds0.
A disk space can be deleted by using the DROP DISKSPACE statement.
The following example shows a SQL statement that deletes the disk space ds0.
TAS guarantees availability by using mirroring and failure groups even when a disk has an error. If the disk error is resolved, resynchronization is executed for integrity of data that has been modified during the error.
TAS provides mirroring that copies data and stores it in multiple disks. Each copy is saved in a different failure group. If the redundancy level of disk space is NORMAL or HIGH, a copy in a different failure group can be used when an error occurs in a disk included in a failure group or in an entire failure group (or up to two failure groups if the redundancy level is HIGH), which guarantees service availability.
If an error occurs in a disk, its status is changed to FAIL. I/O for a disk in FAIL status is recorded in separate metadata, and it is applied to the disk through resynchronization after the disk is recovered.
Resynchronization is executed for integrity of data that has been modified while a disk is in FAIL status. It is available only when the redundancy level is NORMAL or HIGH.
Since TAS provides mirroring, I/O is executed for a copy located in another failure group even if a diskhas an error. Therefore, when the disk error is resolved, data in the disk can be recovered with the copy, which is resynchronization.
If a disk in FAIL status continuously operates, reliability is lowered because a data copy located in the disk cannot be used. To prevent that a disk in FAIL status operates for a long time, TAS automatically removes the disk after a specific time and executes rebalancing to maintain mirroring by moving a copy to another disk.
The following parameter is used.
AS_DISK_REPAIR_WAIT_TIME
Wait time for TAS to automatically remove a disk in FAIL status. If set to 0, TAS does not automatically remove a disk in FAIL status. (Unit: minutes, default value: 0)
For more information, refer to “”.
TAS manages disk status by monitoring it periodically. A current status of a disk can be checked with the V$AS_DISK view. For more information about the view, refer to “ ”.