[dm-crypt] migrate luks key-slots to another luks container

Alexander 'Leo' Bergolth leo at strike.wu.ac.at
Wed Jan 16 22:29:31 CET 2013


Am 16.01.2013 22:08, schrieb Arno Wagner:
> On Wed, Jan 16, 2013 at 09:51:36PM +0100, Alexander 'Leo' Bergolth wrote:
>> Am 16.01.2013 21:14, schrieb Arno Wagner:
>>> Any reason why you want to change the cipher? After all, you can
>>> not enlarge the key and keep the keyslots.
>>>
>>> As to size, just enlarge the partition. Offset, I don't know,
>>> but if you do not need to keep any data, just changing the
>>> repective fiels in the header should do it. But is there really
>>> any reason to change the offset?
>>
>> The motivation behind this is because I'd like to migrate the data
>> to another system using a different raid layout.
>> To ensure correct data alignment with the new stripe size, I need to
>> change the payload-offset using --align-payload.
>
> Ah, that makes sense. However, do you actually need this
> alignment? If yor filesystem has, say, 4kB blocks and your
> stripe-size is a multiple of that, it will be aligned anyways.

Unfortunately this isn't easy to achieve if you are using raid5 or 6.
I am moving to a raid6 with 5 disks using 64k chunksize. 64k chunks 
multiplied by the number of data bearing disks (3) results in a stripe 
width of 192k (=384 blocks). Thus I guess I should use 
--align-payload=384. The current setting is different and even the 
default of 1MiB isn't a multiple of that value.

Anyway, is the migration of keyslots possible in my case?

Thanks,
--leo
-- 
e-mail   ::: Leo.Bergolth (at) wu.ac.at
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria



More information about the dm-crypt mailing list