You are not logged in.

#1 2024-02-25 17:28:52

FranoGames
Member
Registered: 2024-02-25
Posts: 8

[SOLVED] Encrypting partition fails with "Failed to read hotzone area"

Hello,

I'm currently trying to migrate to using encrypted partitions but while using 

cryptsetup reencrypt /dev/nvme0n1p1

I got the following error:

Failed to read hotzone area starting at 95769591808.

The partition also becomes unusable (Gnome Disks lists it as Contents unknown and Partition Type unknown and I'm unable to run any cryptsetup commands on it). This behavior persists until I reboot at which point Gnome Disks recognizes the partition as an LUKS2-encrypted partition.

Does anyone know how to fix this?

Best regards,
FranoGames

Last edited by FranoGames (2024-02-25 18:23:16)

Offline

#2 2024-02-25 17:50:21

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [SOLVED] Encrypting partition fails with "Failed to read hotzone area"

Is there actually an error (in dmesg)? cryptsetup luksDump? Partition size? lsblk, parted -l, ...

cryptsetup reencrypt doesn't even do anything, if it's not already LUKS encrypted. Did you previously luksFormat, or start a reencryption --new task, which you're resuming, and you changed partition size in between, or something the like?

...do you still need data off that drive? In that case, a full image / ddrescue first, might be in order...

Last edited by frostschutz (2024-02-25 17:52:10)

Offline

#3 2024-02-25 18:01:28

FranoGames
Member
Registered: 2024-02-25
Posts: 8

Re: [SOLVED] Encrypting partition fails with "Failed to read hotzone area"

I followed https://wiki.archlinux.org/title/Dm-cry … ile_system and the error first occured during the

cryptsetup reencrypt --encrypt --reduce-device-size 16M /dev/sdxY

command. On subsequent attempts, I dropped the parameters and it prompted me:

WARNING!
========
Device /dev/nvme0n1p1 is already in LUKS2 reencryption. Do you wish to resume previously initialised operation?

luksDump just returns not a valid luks device before rebooting. The partition is 1850397949952 bytes large and starts at the beginning of the disk. The other commands don't provide any helpful information and I the error occured on the very first run, during which I didn't do anything with the disk. I'll provide output of luksDump after a reboot soon. I'm not sure if an error shows up in dmesg. Gotta look into that.

Offline

#4 2024-02-25 18:04:22

FranoGames
Member
Registered: 2024-02-25
Posts: 8

Re: [SOLVED] Encrypting partition fails with "Failed to read hotzone area"

luksDump after restart(keydata truncated):

LUKS header information
Version:       	2
Epoch:         	418334
Metadata area: 	16384 [bytes]
Keyslots area: 	8355840 [bytes]
UUID:          	8990de8c-f24f-41a3-bd82-e20dd7f00c4e
Label:         	(no label)
Subsystem:     	(no subsystem)
Flags:       	(no flags)
Requirements:	online-reencrypt-v2 

Data segments:
  0: linear
	offset: 1850389561344 [bytes]
	length: 8388608 [bytes]
	cipher: (no SW encryption)

  1: linear
	offset: 8388608 [bytes]
	length: 95769591808 [bytes]
	cipher: (no SW encryption)

  2: crypt
	offset: 95786369024 [bytes]
	length: 1754603192320 [bytes]
	cipher: aes-xts-plain64
	sector: 512 [bytes]

  3: linear
	offset: 0 [bytes]
	length: 1850381172736 [bytes]
	cipher: (no SW encryption)
	flags : backup-previous

  4: crypt
	offset: 8388608 [bytes]
	length: (whole device)
	cipher: aes-xts-plain64
	sector: 512 [bytes]
	flags : backup-final

  5: linear
	offset: 1850389561344 [bytes]
	length: 8388608 [bytes]
	cipher: (no SW encryption)
	flags : backup-moved-segment

Offline

#5 2024-02-25 18:10:49

FranoGames
Member
Registered: 2024-02-25
Posts: 8

Re: [SOLVED] Encrypting partition fails with "Failed to read hotzone area"

I think it's working now. Literally changed nothing, just tried for the 5 billionth time today.

Offline

#6 2024-02-25 22:15:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,642

Re: [SOLVED] Encrypting partition fails with "Failed to read hotzone area"

The process should probably take longer than the 17 uS your are allotting.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB