Splunk Dev

How to free up disk space?

echojacques
Builder

I received this error this morning: "The minimum free disk space (5000MB) reached for /data/splunk/var/splunk/dispatch"

I logged into the server (Linux) found that my Splunk volume is 100% used. Unfortunately, I don't currently have the option to add additional disk capacity. So my question is, how can I free up disk space in Splunk? For example, is there a way to purge data within the main index that is over a year old or something like that? What is the recommended way to troubleshoot disk space related issues in Splunk?

Thanks!

Tags (2)
1 Solution

chanfoli
Builder

The default size and aging policies can definitely fill a volume. You should learn about splunk buckets, as in hot, warm and cold to understand how to handle an emergency purge like this. See this documentation:

http://docs.splunk.com/Documentation/Splunk/6.2.1/Indexer/HowSplunkstoresindexes

You can safely delete cold and warm buckets with splunk stopped, understanding that you will loose the data contained in any deleted bucket. If you set your aging/size policies appropriately, splunk should roll to frozen (which by default, actually means delete) at some point soon after this config is picked up, but I have always handled such cases by deleting cold buckets.

Some other relevant links:

http://answers.splunk.com/answers/92960/how-to-view-data-retention-settings-in-splunk.html
http://answers.splunk.com/answers/57172/how-do-i-set-retention-for-an-index-to-30-days.html

View solution in original post

jaracan
Communicator

Hi Team, how about in Splunk Clustered Environment? Is it safe to do the ff. steps as mention above?
1. Splunk stop all the clustered indexers
2. Delete the files in the coldPath directory
3. Restart Splunk

0 Karma

chanfoli
Builder

The default size and aging policies can definitely fill a volume. You should learn about splunk buckets, as in hot, warm and cold to understand how to handle an emergency purge like this. See this documentation:

http://docs.splunk.com/Documentation/Splunk/6.2.1/Indexer/HowSplunkstoresindexes

You can safely delete cold and warm buckets with splunk stopped, understanding that you will loose the data contained in any deleted bucket. If you set your aging/size policies appropriately, splunk should roll to frozen (which by default, actually means delete) at some point soon after this config is picked up, but I have always handled such cases by deleting cold buckets.

Some other relevant links:

http://answers.splunk.com/answers/92960/how-to-view-data-retention-settings-in-splunk.html
http://answers.splunk.com/answers/57172/how-do-i-set-retention-for-an-index-to-30-days.html

echojacques
Builder

Thanks very much for the info! I deleted my frozen buckets and this freed up 50% of my disk space.

0 Karma

echalex
Builder

Hi echojacques,

Sure there is. You can set the frozenTimePeriodInSecs setting for the index in indexes.conf. This setting is per index, so you can choose the less important indexes. Please check the documentation for indexes.conf. If you do not specify a coldToFrozenScript , then the data will be deleted.

Please make sure that you count the seconds in a year correctly, though! Omit a zero and your data will disappear in a month, rather than a year.

You can also set maxTotalDataSizeMB, if you want.

echojacques
Builder

Thanks! In addition to deleting my frozen buckets, I modified my frozenTimePeriodInSecs to a more appropriate value. I appreciate the help and the info!

0 Karma

echalex
Builder

Glad you solved your issue! Chanfoli's answer is a good one as it helps you to immediately free up some space.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...