RETIRE_LOCATION

Makes the specified storage location inactive. To see a list of all of the storage locations in Vertica, refer to STORAGE_LOCATIONS.

Syntax

RETIRE_LOCATION ( 'path', 'node' [, enforce_storage_move ] ) 

Parameters

path

Specifies where the storage location to retire resides.

node

The Vertica node where the location is available. A value of "" (an empty string) means to perform this operation on all nodes.

enforce_storage_move
              

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

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 (/data in this example).

Note: Vertica does not identify NFS as a shared file system.

Effects of Retiring a Storage Location

When you use this function, Vertica 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.

Note: If a location is the last available storage for its associated objects, you cannot retire it unless you set enforce_storage_move to true

When you retire a storage location:

Monitoring Storage Locations

Disk storage information that the database uses on each node appears in the V_MONITOR.DISK_STORAGE system table.

Examples

The following examples show two approaches to retiring a storage location.

You can specify that a storage location be dropped automatically at a future time:

=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004');

You can also specify that a storage location be dropped immediately:

=> SELECT RETIRE_LOCATION ('/data' , 'v_vmartdb_node0004', true);