How to remove Storage Location in HP Vertica database
In this short tutorial we will see how we can remove a storage location for a HP Vertica Database Cluster.
This is a common task for Vertica DW administrator.
Before you go ahead and copy + pate what ever code i have put here make sure you backup your database and you test in DEV environment before.
If you dont know how to backup your database you can follow this tutorial here - Full HP Vertica Backup.
So this is how my storage looks at the moment in my Vertica Database
so we wanna remove the vertica_data2 location.
So in order to be able to drop/remove a storage from Vertica database first we need to Retire the location.
Retiring a location - this will make the storage location inactive and also it has the function to move what ever data is stored in this location to other available storage locations.
Syntax:
enforce_storage_move - if you have data on the storage location data is moved elsewhere, by default this is set to false, and to enable it you need to set it to true.
Lets Run the retire function:
Now we go back to the Storage_Locations table and see the status of the retired locations.
see that is marked as retired.
Now the Storage Location is ready to be dropped.
remember that this is a logical drop at the database level and the folders will persist at the OS level.
Now before we go ahead and drop the fiscal location we need to make sure that changes were done in the /opt/vertica/conf/admintools.conf file.
- so under the nodes part you will see what ever is left from your storage locations.
Also make sure you check the status of your database:
Now you are ready to drop the storage on the OS and remove it from you /etc/fstab file (optional)
hope this was helpful