A new container with an old header

Darek Hisc <[email protected]> Wed, 12 Jul 2023 15:59:41 +0000
Newsgroups dev.linux.lists.cryptsetup
Message-ID <[email protected]>
Hi

I have a 100MB LUKS2 "file1" file-container with detached "header1".
I now need to create a new 200MB container "file2", but still use the old header "header1" for it.
I haven't found an option for luksFormat that allows you to use "header1".

I tried FAQ 6.10, but:
- the script https://gitlab.com/cryptsetup/cryptsetup/blob/main/misc/luks-header-from-active returns "Incompatible device"
- manual execution of the procedure returns different Salt and Digest

Is there a way to create a second file-container served by the old header?

Alternatively, a way to increase the size of "file1" to 200MB. All the information I've found is about resizing a partition or LVM. But I don't know how to increase LUKS2 file-container.

Please help...