Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Delete old BP-* DataNode directories by hand?

Solved Go to solution
Highlighted

Delete old BP-* DataNode directories by hand?

By mistake /var/hadoop/hdfs/data was in my list of DataNode directories. I have removed this in Ambari and restarted all services successfully. I was under the impression that /var/hadoop/hdfs/data/current/BP-* would then be deleted but it is still there and taking up space. Is it safe to delete it by hand?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Delete old BP-* DataNode directories by hand?

@Dr. Jason Breitweg, it will not be deleted automatically.

There may be block files under that directory that you need. If the cluster has any important data - I'd recommend running 'hdfs fsck' to ensure there are no missing/corrupt blocks before you delete /var/hadoop/hdfs/data/current/BP-*.

Even then I'd first move the directory to a different location, restart DataNodes and rerun fsck to ensure you don't cause data loss.

View solution in original post

1 REPLY 1

Re: Delete old BP-* DataNode directories by hand?

@Dr. Jason Breitweg, it will not be deleted automatically.

There may be block files under that directory that you need. If the cluster has any important data - I'd recommend running 'hdfs fsck' to ensure there are no missing/corrupt blocks before you delete /var/hadoop/hdfs/data/current/BP-*.

Even then I'd first move the directory to a different location, restart DataNodes and rerun fsck to ensure you don't cause data loss.

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here