Inactivates the specified storage location. To obtain a list of all existing storage locations, query system table
RETIRE_LOCATION ( 'location‑path', 'node' [, enforce‑storage‑move ] )
Specifies where the storage location to retire resides.
The Vertica node where the location is available. An empty string specifies to perform this operation on all nodes.
If set to
Retiring a Shared Location
When you create a storage location in a shared HDFS location, Vertica creates subdirectories for each node to prevent conflicts. For example, suppose you create a shared storage location in
/data. The location for
/data/v_vmartdb_node0001, the location for
v_vmartdb_node0002 is /data/v_vmartdb_node0002, and so on. To retire a location on only one node, use the node-specific path such as
/data/v_vmartdb_node0002. To retire a location on all nodes, use the same path that you used to create it (in this example,
Vertica does not identify NFS as a shared file system.
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-storage-move to
When you retire a storage location:
- No new data is stored at the retired location, unless you first restore it
- 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 parameter enforce-storage-move to true.
- If the storage location being retired is used only for temp files or you use enforce-storage-move, you can drop the location. See Dropping Storage Locations in the Administrator's Guide, and
Monitoring Storage Locations
To obtain disk storage information that the database uses on each node, query system table
The following examples show two approaches to retiring a storage location.
Specify that a storage location be dropped automatically at a future time:
=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004');
Specify that a storage location be dropped immediately:
=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004', true);