[dm-crypt] Cryptsetup-reencrypt failing with error with option --new reduce-device-size

Abhrajyoti Kirtania abhrajyoti at gmail.com
Fri Jun 20 14:36:39 CEST 2014


HI,
I able to build the crypt setup-reencrypt binary and trying to enable
encryption on a particular partition with this tool, build failing with
error like:

*Cannot wipe header on device /dev/loop0. if i pass *--reduce-device-size
as 1024. But if i pass this size as 4096 then getting the error as "Device
/dev/loop0 is too small."

Not sure what might be the root cause of this error. Truly appreciate your
kind support?

cryptsetup-reencrypt /dev/sda8 --new --reduce-device-size 1024 --debug


WARNING: this is experimental code, it can completely break your data.

# cryptsetup 1.6.4 processing "./abhra_new/sbin/cryptsetup-reencrypt
/dev/sda8 --new --reduce-device-size 1024 --debug"

# Initialising reencryption context.

# Initialising UUID.

# Removing headers.

# Allocating crypt device (null) context.

# Initialising device-mapper backend, UDEV is enabled.

# Detected dm-crypt version 1.11.0, dm-ioctl version 4.22.0.

# Deactivating volume LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org.

# dm status LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org  OF   [16384] (*1)

Device LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org is not active.

# Deactivating volume LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new.

# dm status LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new  OF   [16384] (*1)

Device LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new is not active.

# Releasing crypt device (null) context.

# Releasing device-mapper backend.

# Created LUKS reencryption log file
LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.log.

# Log: direction = 0

# Log: offset = 0

# Log: shift = 0

# Running reencryption.

# Abhra: opt_new option is set.

# Passhrases initialization.

# Installing SIGINT/SIGTERM handler.

# Unblocking interruption on signal.

# Interactive passphrase entry requested.

Enter new passphrase:

# Blocking interruption on signal.

# Creating fake (cipher_null) header for original device.

# Creating empty file LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org of size
1024.

# Allocating crypt device LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org
context.

# Not a block device, using free loop device /dev/loop0.

# Trying to open and read device /dev/loop0.

# Initialising device-mapper backend, UDEV is enabled.

# Formatting device /dev/loop0 as type LUKS1.

# Crypto backend (gcrypt 1.5.0) initialized.

# Generating LUKS header version 1 using hash sha1, cipher_null, ecb, MK 32
bytes

# PBKDF2: 592305 iterations per second using hash sha1.

# Data offset 0, UUID cafecafe-cafe-cafe-cafe-cafecafeeeee, digest
iterations 72250

*Cannot wipe header on device /dev/loop0.*

# Releasing crypt device /dev/loop0 context.

# Releasing device-mapper backend.

# Abhra: Done with int passphrase and fake header creation.

# Destroying reencryption context.

# Closing LUKS reencryption log file
LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.log.

# Removing headers.

# Allocating crypt device (null) context.

# Initialising device-mapper backend, UDEV is enabled.

# Deactivating volume LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org.

# dm status LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org  OF   [16384] (*1)

Device LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.org is not active.

# Deactivating volume LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new.

# dm status LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new  OF   [16384] (*1)

Device LUKS-cafecafe-cafe-cafe-cafe-cafecafeeeee.new is not active.

# Releasing crypt device (null) context.

# Releasing device-mapper backend.

test at ubuntu:~/in-place$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20140620/796ad8e6/attachment.html>


More information about the dm-crypt mailing list