Skip to main content

drop table does not free up disk space

  • August 10, 2015
  • 10 replies
  • 30 views

David_Chen
Forum|alt.badge.img+1

 

We have an (unbalanced) cluster where 2-3 nodes (out of a total of 10) are desperately running out of disk space (like 95-97% full in data partitions).

 

My question is why does a DROP TABLE not reduce the disk space utilization, even hours after dropping the table.  This is a relatively large table (5 TB, out of an total license of 40TB).

 

I was under the impression that dropping a table freed up all disk storage resources associated with that table.

 

 

10 replies

FiliN
Forum|alt.badge.img
  • Participating Frequently
  • August 13, 2015

did you use drop table cascade?


David_Chen
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • August 13, 2015

 

No, but the DROP didn't complain like it usually does if there are any dependencies that prevent the table from being dropped.

 

Now that the table is dropped, is there a way to ensure that the storage for the table is freed up?


FiliN
Forum|alt.badge.img
  • Participating Frequently
  • August 13, 2015

Did you try

select * from V_MONITOR.DISK_STORAGE;

and select * from  v_monitor.storage_containers to find containers referenced with your table?


Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • August 17, 2015

 In some cases, depending on the size of the table , the operational system will take time to reclaim the space.

 It happened to me as well. 

 


FiliN
Forum|alt.badge.img
  • Participating Frequently
  • August 17, 2015

You mean that you can't spot your comtainer in select * from  v_monitor.storage_containers but its still on disk anyway?


Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • August 17, 2015

 

I mean that i can query the v_monitor.storage_containers table and i don`t see it but i can see it in the projection_storage table and also my operation system does not show the released space.

 When i drop small projections thespace is released fast but when i drop big projections space is released not that fast.

 


FiliN
Forum|alt.badge.img
  • Participating Frequently
  • August 17, 2015

Understood. It's really interesting how exactly Vertica translate OS command to drop container file and why it takes some time. I think that one of the Vertica Achitects should answer this question. Do you have officail tech support?


Adrian_Oprea_1
Forum|alt.badge.img+1
  • Participating Frequently
  • August 17, 2015

 We do at the moment , but i i will not open a ticket for this, it might be that some process was using that file on the operational system and until it realeses it the OS will not show the space reclaim, or maybe inode stuff. not really sure, but i don`t think is something that i would losse time it investigate.


colin_loghin
Forum|alt.badge.img+2
  • Participating Frequently
  • August 24, 2015

Did the space reclaim succeed after a while ? I also think there was an inode still referecing the file, or perhaps a backup in progress, but most likely , by now the space reclaim succeeded.  Usually i find space reclaim to occur shortlyafter, but slowly, at the mercy of the file system ( ext3/4) i believe. 


David_Chen
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • August 24, 2015

 

We had a similar experience.  To resolve this issue, we ended up adding 2 additional nodes, and rebalancing.