Deactivates the specified storage location. To obtain a list of all existing storage locations, query the STORAGE_LOCATIONS system table.
RETIRE_LOCATION ( 'path', 'node' [, enforce ] )
Where the storage location to retire is mounted.
The Vertica node on which to retire the location. To perform this operation on all nodes, use an empty string (
Effects of Retiring a Storage Location
RETIRE_LOCATION checks that the location is not the only storage for data and temp files. At least one location must exist on each node to store data and temp files. However, you can store both sorts of files in either the same location or separate locations.
If a location is the last available storage for its associated objects, you can retire it only if you set enforce to
When you retire a storage location:
- No new data is stored at the retired location, unless you first restore it using RESTORE_LOCATION.
- By default, if the storage location being retired contains stored data, the data is not moved. Thus, you cannot drop the storage location. Instead, Vertica removes the stored data through one or more mergeouts. To drop the location immediately after retiring it, set enforce to true.
- If the storage location being retired is used only for temp files or you use enforce, you can drop the location. See Dropping Storage Locations and DROP_LOCATION.
Monitoring Storage Locations
For information about the disk storage used on each node, query the
DISK_STORAGE system table.
The following examples show two approaches to retiring a storage location.
You can retire a storage location and its data will be moved out automatically at a future time:
=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004');
You can specify that data in the storage location be moved immediately, so that you can then drop the location without waiting:
=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004', true);