Altering Location Labels

You can change the label for a storage location in the following ways:

You can perform this operation on individual nodes (by naming them) or cluster-wide (by specifying an empty string for the node).

Important: You can label an existing storage location that already contains data. However, including the labeled location in one or more storage policies can cause the ATM to relocate existing data. This situation occurs if the ATM determines that data stored on a labeled location does not comply with a storage policy.

Adding a Location Label

To alter a location label, use the ALTER_LOCATION_LABEL function. The following figure illustrates an unlabeled location that exists on three nodes:

This example shows how to add a location label, 'SSD', to the existing storage locations on all nodes (''):

=> SELECT ALTER_LOCATION_LABEL('/home/dbadmin/vertica/SSD', '', 'SSD');

Removing a Location Label

You cannot remove a location label if both of the following conditions exist:

The following example removes the SSD label for the storage location on all nodes by specifying empty strings ('') for both node and location_label parameters:

VMART=> select alter_location_label('/home/dbadmin/SSD/tables','', '');
          alter_location_label          
------------------------------------------
 /home/dbadmin/SSD/tables label changed.
(1 row)

Effects of Altering a Location Label  

Altering a location label has the following effects:

Alter label: To: Has this effect:

No name

New label

Lets you use the labeled storage within a storage policy. See note above regarding data storage being moved to other locations if you add a label to a storage location with existing data.

Existing name

New name

You can use the new label in a storage policy. If the existing name is used in a storage policy, you cannot change the label.

Existing name

No name

You cannot use an unlabeled storage in a storage policy. If the existing name is used in a storage policy, you cannot remove the label.