Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

How to delete/remove storage policy ?

Hi team

From the link below, i see options to set and get storage policies on hdfs for files/dirs

Also hdfs command displays -

hdfs storagepolicies --help
Can't understand command '--help'
Usage: bin/hdfs storagepolicies [COMMAND]
          [-setStoragePolicy -path <path> -policy <policy>]
          [-getStoragePolicy -path <path>]
          [-help <command-name>]

Can you let me know how to delete if there is any storage policy applied ?


Unfortunately, I think can't delete (yet) due to

View solution in original post


Unfortunately, I think can't delete (yet) due to


There is no specific 'removeStoragePolicy' command.

So what you want to do, I guess, is to get it back to the default value, right? The workaround is you could use '-setStoragePolicy' to set it to 'HOT'(default value), or you could use '-getStoragePolicy' to check the policy of the parent directory first and then use '-setStoragePolicy' to set it.

Expert Contributor

Hi Sagar, Currently I don't think there is remove storage policy function. The only way is to copy/move data to a new dir and then delete and rename the new one created.

@Sagar Shimpi

As we moved into 2017, we can now remove storage policy for a certain path!

hdfs storagepolicies -unsetStoragePolicy -path <path>
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.