Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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.