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.

how to recover missing blocks of hdfs after delete a data dir in the datanode by a mistake

avatar
Contributor

There was a blunder we have deleted a data directory by using skipTrash command also.

The volume to data which we lost was huge.   

1 ACCEPTED SOLUTION

avatar
Mentor
I'm afraid there's no easy way to recover out of this if you've not taken HDFS snapshots prior to this either.

If you've stopped the entire cluster immediately to prevent further disk usage, you can perhaps try to run ext-level disk recovery tools to recover the deleted blocks, and then rollback your NN to start from the pre-deletes checkpoint, and that may give back some fraction of your data.

View solution in original post

1 REPLY 1

avatar
Mentor
I'm afraid there's no easy way to recover out of this if you've not taken HDFS snapshots prior to this either.

If you've stopped the entire cluster immediately to prevent further disk usage, you can perhaps try to run ext-level disk recovery tools to recover the deleted blocks, and then rollback your NN to start from the pre-deletes checkpoint, and that may give back some fraction of your data.