available volume from no-encrytion to luks retype failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Undecided
|
Yeshwanth Allampati |
Bug Description
[stack@localhost devstack]$ cinder encryption-
+------
| Volume Type ID | Provider | Cipher | Key Size | Control Location |
+------
| 0cfcee9d-
+------
[stack@localhost devstack]$ cinder show 9c91062c-
+------
| Property | Value |
+------
| attached_servers | [] |
| attachment_ids | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2019-01-
| description | |
| encrypted | False |
| id | 9c91062c-
| metadata | |
| migration_status | None |
| multiattach | False |
| name | yenai-001 |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2019-01-
| user_id | edffe81b43534df
| volume_type | lvmdriver-1 |
+------
[stack@localhost devstack]$ cinder retype --migration-policy on-demand 9c91062c-
ERROR MSG:
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
Jan 13 19:00:46 localhost.
=======
The reason is luks-volume contains LUKS header in the device, it costs 2M (512bytes * 4096sectors).
[root@localhost ~]# cryptsetup status /dev/mapper/
/dev/mapper/
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
key location: dm-crypt
device: /dev/sde
sector size: 512
offset: 4096 sectors
size: 2093056 sectors
mode: read/write
[root@localhost ~]# cryptsetup luksDump /dev/sde
LUKS header information for /dev/sde
Version: 1
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha256
Payload offset: 4096
MK bits: 512
MK digest: 5d 6a d7 86 41 d0 f4 0a dd 55 c7 c6 ff f5 ed 63 76 e9 61 fd
MK salt: 77 c2 88 b6 a0 7e cb 18 f2 79 63 09 19 14 dc 76
40 8b 0f d5 eb aa 0d ef ba 85 e3 58 75 48 bc df
MK iterations: 15784
UUID: 83431299-
Key Slot 0: ENABLED
Iterations: 279470
Salt: 8e 57 e5 c6 d2 65 d2 da 94 bb cb a7 65 e3 2c 6d
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
When use plain, it's OK.
[root@localhost ~]# cryptsetup status "/dev/disk/ by-id/scsi- 3600140548df84c 9a1704122a77658 534" by-id/scsi- 3600140548df84c 9a1704122a77658 534 is active and is in use.
/dev/disk/
type: PLAIN
cipher: aes-xts-plain64
keysize: 512 bits
key location: dm-crypt
device: /dev/sdf
sector size: 512
offset: 0 sectors
size: 2097152 sectors
mode: read/write