Project

General

Profile

Actions

Bug #6703

closed

OSDs with dmcrypt fail to start at boot

Added by Jan Harkes over 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

RHEL6.4 ceph version 0.67.4 (ad85b8bfafea6232d64cb7ba76a8b6e8252fa0c7)

On boot the OSDs are not started when the drives are encrypted with dmcrypt.

It looks like the udev rule/ceph-disk-udev only successfully manages to run cryptsetup for the journal and data partitions, but fails to start the OSDs. However running partprobe or udevadm trigger after the system has booted brings up the daemons successfully. Udev debugging wasn't very helpful.

What I ended up doing to fix the issue is modifying 'ceph-disk activate-all' to support dmcrypt partitions, and now the OSDs do get started successfully as part of the 'activate latent osds?' step at the end of the ceph sysvinit script.

--- ceph-disk.orig      2013-10-25 20:21:44.154001551 -0400
+++ ceph-disk   2013-11-01 11:40:08.881461158 -0400
@@ -1822,8 +1822,12 @@
         if name.find('.') < 0:
             continue
         (tag, uuid) = name.split('.')
-        if tag == OSD_UUID:
-            path = os.path.join(dir, name)
+        if tag == OSD_UUID or tag == DMCRYPT_OSD_UUID:
+           if tag == DMCRYPT_OSD_UUID:
+               path = os.path.join('/dev/mapper', uuid)
+           else:
+               path = os.path.join(dir, name)
+
             LOG.info('Activating %s', path)
             activate_lock.acquire()
             try:
Actions #1

Updated by Alfredo Deza almost 10 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Alfredo Deza almost 10 years ago

  • Status changed from In Progress to Fix Under Review
Actions #3

Updated by Alfredo Deza almost 10 years ago

  • Status changed from Fix Under Review to Resolved

Merged into Ceph master branch with hash 31eefeb

Actions

Also available in: Atom PDF