[dm-crypt] After reboot: "Command failed with code 22: Device /dev/md2 is not a valid LUKS device."

Arno Wagner arno at wagner.name
Tue Apr 23 20:09:06 CEST 2013


On Tue, Apr 23, 2013 at 06:18:23PM +0200, Jens-Michael Hoffmann wrote:
> > 
> > Just out of curiosity: Is the cipher and key size combination (aes-xts-
> > plain64, 256 bit) the default or why did I have not to specify it to create
> > the mapping? (IIUC the metadata of plain mappings is not stored?)
> 
> Never mind, I just realized that that was part of the destroyed luks device, 
> so I guess the default cipher/key size of "cryptsetup create" is used now.

Indeed. 
 
> Is there perhaps any way for converting the plain mapping into a luks 
> mapping or would I just have to create a new luks device and copy data 
> over?

While theoretically such a conversion may be possible, you
would have to write the converter yourself. So yes, copying
to a new LUKS container is the way to go.

Arno
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
There are two ways of constructing a software design: One way is to make it
so simple that there are obviously no deficiencies, and the other way is to
make it so complicated that there are no obvious deficiencies. The first
method is far more difficult.  --Tony Hoare


More information about the dm-crypt mailing list