RETIRE_LOCATION

Inactivates the specified storage location. To obtain a list of all existing storage locations, query system table STORAGE_LOCATIONS.

Syntax

RETIRE_LOCATION ( 'location‑path', 'node' [, enforce‑storage‑move ] ) 

Parameters

location‑path

Specifies where the storage location to retire resides.

node

The Vertica node where the location is available. An empty string specifies to perform this operation on all nodes.

enforce‑storage‑move

If set to true, the location label is set to an empty string, and the data is moved elsewhere. The location can then be dropped without errors or warnings. Use this argument to expedite dropping a location.

Privileges

Superuser

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 v_vmartdb_node0001 is /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, /data).

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 true

When you retire a storage location:

  • No new data is stored at the retired location, unless you first restore it 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 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 DROP_LOCATION.

Monitoring Storage Locations

To obtain disk storage information that the database uses on each node, query system table DISK_STORAGE.

Examples

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);