2

Is there any way to check if the Luks container header is damaged? My luks container is refusing to be opened with its keyfile, saying No key available with this pass-phrase.

History of what happened:

I was working with mdadm raid5 trying to increase the disk sizes of a 3 component array. I think I encountered a bug in mdadm software and was forced to close the luks container and reassemble the array. The configuration of md0 is this at the moment:

        Version : 0.90
     Raid Level : raid5
     Array Size : 3907023872 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
   Raid Devices : 3
  Total Devices : 2
          State : clean, degraded 
     Chunk Size : 64K

Number   Major   Minor   RaidDevice State
   0       9        2        0      active sync   /dev/md2
   1       8       33        1      active sync   /dev/sdc1
   2       0        0        2      removed

Un-important info removed.

/dev/md2/ is a linear mdadm array made of up 1 (2TB) disk. sdc1 is a 4TB disk. Only 2TB of it is used by this array, as displayed by Used Dev Size.

Problems arose when I expanded md2 linear array to 4TB using another disk, and tried to grow md0 to the new component size. It complained that 0.90 metadata only supported 2TB component disks and displayed Used Dev Size: -1, quick google search revealed that it wasn't good. My mistake was then to shrink md2 back to its 1 disk size (2TB) this signalled to md0 that the device failed and put md0 into FAILED mode.

To add that component back to the array without resync I had to stop and reassemble the array. Since then the luks container won't open.

1 Answer 1

0

For closure, I might as well post what the issue was: Turns out mdadm by default creates arrays with a different version than the one I had, so in the process of re-assembling it, it overwrote some of the backup positions on the disks, one of these backup positions co-insided with the luks header, wiping it out. Never did manage to recover the data from that. Lesson learned.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .