Creating and managing storage pool entries
You can add, modify, and delete the entries in the storage pool.
About this task
Each entry in the storage pool contains information about a directory, cooked file, or raw device that a database server instance can use if necessary to automatically expand an existing storage space.
- Creating a storage pool entry
To create a storage pool entry, run the admin() or task() function with the storagepool add argument, as follows:
EXECUTE FUNCTION task("storagepool add", "path", "begin_offset", "total_size", "chunk size", "priority");
Specify the following information:- The path for the file, directory, or device that the server can use when additional storage space is required.
- The offset in KB into the device where OneDB can begin allocating space.
- The total space available to OneDB in this entry. The server can allocate multiple chunks from this amount of space.
- The minimum size in KB of a chunk that can be allocated from the device, file, or directory. The smallest chunk that you can create is 1000 KB. Therefore, the minimum chunk size that you can specify is 1000 KB.
- A number from 1 to 3 for the priority (1 = high; 2 = medium; 3 = low). The server attempts to allocate space from a high-priority entry before it allocates space from a lower priority entry.
The default units for storage pool sizes and offsets are KB. However, you can specify information in any of the ways shown in the following examples:
- "100000"
- "100000 K"
- "100 MB"
- "100 GB"
- "100 TB"
- Modifying a storage pool entry
To modify a storage pool entry, run the admin() or task() function with the storagepool modify argument, as follows:
EXECUTE FUNCTION task("storagepool modify", "storage_pool_entry_id", "new_total_size", "new_chunk size", "new_priority");
- Deleting storage pool entries
To delete a storage pool entry, run the admin() or task() function with the storagepool delete argument, as follows:
EXECUTE FUNCTION task("storagepool delete", "storage_pool_entry_id");
To delete all storage pool entries, run the admin() or task() function with the storagepool purge all argument, as follows:
EXECUTE FUNCTION task("storagepool purge all");
To delete all storage pool entries that are full, run the admin() or task() function with the storagepool purge full argument, as follows:
EXECUTE FUNCTION task("storagepool purge full");
To delete storage pool entries that have errors, run the admin() or task() function with the storagepool purge errors argument, as follows:
EXECUTE FUNCTION task("storagepool purge errors");
Examples
The following command adds a directory named /region2/dbspaces with a beginning offset of 0, a total size of 0, an initial chunk size of 20 MB, and a high priority. In this example the offset of 0 and the total size of 0 are the only acceptable entries for a directory.
EXECUTE FUNCTION task("storagepool add", "/region2/dbspaces", "0", "0",
"20000", "1");
The following command changes the total size, chunk size, and priority of storage pool entry 8 to 10 GB, 10 MB, and a medium priority.
EXECUTE FUNCTION task("storagepool modify", "8", "10 GB", "10000", "2");
The following command deletes the storage pool entry with an entry ID of 7:
EXECUTE FUNCTION task("storagepool delete", "7");