storagepool modify argument: Modify a storage pool entry (SQL administration API)
Use the storagepool modify argument with the admin() or task() function to modify an entry for a directory, cooked file, or raw device that OneDB can use when additional storage space is required.
Syntax
Element | Description | Key Considerations |
---|---|---|
entry_id | The ID of the storage pool entry. | The storagepool table in the sysadmin database contains a column that shows the ID of each entry in the storage pool. |
new_total_size | The new amount of total space available to OneDB in this entry. The server can allocate multiple chunks from this amount of space. | Be sure to specify 0 for the
total size of a directory. If you specify a value that is not zero
for a directory, the SQL administration API command returns an error. If
you specify |
new_chunk_size | The minimum size of a chunk that can be allocated from the device, file, or directory. | The smallest chunk that you can create is 1000 K. Therefore, the minimum chunk size that you can specify is 1000 K. |
new_priority | The priority of the directory, file, or device
when the server searches through the storage pool for space.
|
The server attempts to allocate space from a high-priority entry before it allocates space from a lower priority entry. |
Usage
Sometimes you might want to change a storage pool entry. For example, you might want to increase the total size of the storage pool when it runs out of space, or you might want to change the chunk size or the priority. When you change the entry, include the total size, chunk size, and priority even if you do not want to change all of these values.
You cannot modify the path or the beginning offset of a storage pool entry. If you want to change either of those values, you must delete the storage pool entry and add an entry with the new path or beginning offset.
If a storage pool entry is on a High-Availability Data Replication (HDR) primary server, the same path in the entry must be available on all secondary servers in the HDR cluster.
The default units for storage pool sizes and offsets are kilobytes. However, you can specify information in any of the ways shown in the following examples:
- "100000"
- "100000 K"
- "100 MB"
- "100 GB"
- "100 TB"
Examples
The following command changes the total size, chunk size, and priority of the storage pool entry that has an ID of 4 to 10 gigabytes, 10 megabytes, and a medium priority.
EXECUTE FUNCTION task("storagepool modify", "4", "10 GB", "10000", "2");
Suppose that you add an entry to the storage pool and the entry has a path of (/dev/IDS/chunk2), an offset of 0, a total size of 100 megabytes, a minimum chunk size of 100 megabytes, and a priority of 2. Before OneDB allocates any space from this entry, you use onspaces to manually add a 50 megabyte chunk with the same path (/dev/IDS/chunk2), and an offset of 50 megabytes. The server only detects the overlap when it attempts to use this entry to automatically create a chunk. At that time, the server marks the entry with an "Error" status and attempts to use another entry to create the chunk.
You can correct the problem by changing the total size of the storage pool entry (for example, for entry 2), to 50 megabytes and by changing the minimum chunk size of the entry to 50 megabytes, as follows:
EXECUTE FUNCTION task("storagepool modify", "2", "50 MB", "50 MB", "2");