Actions
Bug #6700
closedceph-disk prepare fails to set up an encrypted disk
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
other
Tags:
Backport:
firefly
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
RHEL 6.4 ceph 0.67.4
Ceph-disk prepare fails when setting up encrypted disks when the data and journal are located on the same drive. After initializing the journal it seems to be recognized by udev and cryptsetup sets up a mapping. Then when the drive is partitioned for the data partition, the kernel fails to reread the partition table because now the device is held active by the existing dmcrypt mapping for the journal partition.
I added a pair of dmcrypt_unmap calls which allowed the disk prepare to complete successfully.
--- ceph-disk.orig 2013-10-25 20:21:44.154001551 -0400 +++ ceph-disk 2013-10-25 20:20:03.428530520 -0400 @@ -1027,6 +1027,9 @@ LOG.debug('OSD data device %s is a partition', data) rawdev = data else: + if journal_dmcrypt is not None: + dmcrypt_unmap(journal) + LOG.debug('Creating osd partition on %s', data) try: subprocess.check_call( @@ -1102,6 +1105,8 @@ finally: if rawdev != dev: dmcrypt_unmap(osd_uuid) + if journal_dmcrypt is not None: + dmcrypt_unmap(journal) if not is_partition(data): try:
Actions