|
How do I reclaim my disk space after deleting a large number of events from an index? The Remove data from Splunk pages says:
Is there any other way of reclaiming this space in the meantime? |
|
It is possible to reclaim disk space in this type of scenario by re-indexing the effected buckets. Note: This may also be useful if you've deleted some sensitive information, such as a password, that really needs to be completely purged. This approach would prevent that indexed term from showing up in type-a-head, for example. There are several steps to this process.
For users running on a unix platform, the following shell commands (script) may be of use: (Note that we are combining the export and import step into a single operation using a pipe)
Note: If you plan on using this script, please be sure to add return-code checking. You wouldn't want to remove the original bucket if the export/import failed to complete, for example. Other considerations:
|
|
not sure what you want to do exactly, but if deleting most of an index for which the logs are still around, you'd prob be better off deleting the index and reindexing the events that you want to $SPLUNK_HOME/bin/splunk stop $SPLUNK_HOME/bin/splunk clean eventdata -index myindex $SPLUNK_HOME/bin/splunk start Yes, the link to the docs in the question does mention that option too. If you want to delete almost everything in an index, then sure this would work. But this is NOT something you would want to do after running splunk for any considerable length of time. Also remember that re-indexing the log files would count towards your license usage. And you also have to use tricks to get splunk to re-read the log files you want to keep.
(13 May '10, 16:43)
Lowell ♦
|

As of December 2011, Splunk 4.2.5 still does not provide this functionality. The docs still say "Note: Piping to delete does not reclaim disk space.". I heard this is still on the roadmap, but it's still not available.