Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Delete old BP-* DataNode directories by hand?

avatar
New Member

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

avatar

@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

avatar

@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.