Lost All Data on Luks Encrypted Volume After Shutdown [Solved]


Recommended Posts

Just spent two days copying over data to my new Unraid setup and after I powered it down (gracefully) to change some stuff out it reported that one of my encrypted drives was unmountable.  The drive itself would unlock and the Luks header appeared to be correct.  After fiddling around a while I was able to get it back via the following method (my drive was sde1)

 

cryptsetup open /dev/sde1 luksRepair

 

xfs_repair -n /dev/mapper/luksRepair  --> This should be a read-only command.  If you're nervous about anything on here make a dd image of your device first.

 

This reported that I had a bad superblock so I reran the command as:

 

xfs_repair -L /dev/mapper/luksRepair -> Took about 10 minutes to run.  Found a secondary superblock that it substituted (or something like that) and then ran a bunch of other stuff.  10 minutes later my drive was back up and running.

 

Hope it helps someone else!

  • Like 1
Link to comment
  • 2 weeks later...
  • 2 years later...

Realized I never replied, sorry for the dead thread resurrection but yeah I did a correcting parity check and it didn't report any errors.  Not sure because it seems to me like it should have and I remember being a little confused about that.  It's had several successful parity checks since then though so I guess I'm in the clear, ha ha.  

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.