Bug #6703
closedOSDs with dmcrypt fail to start at boot
0%
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:
Updated by Alfredo Deza almost 10 years ago
- Status changed from New to In Progress
Updated by Alfredo Deza almost 10 years ago
- Status changed from In Progress to Fix Under Review
Pull request opened: https://github.com/ceph/ceph/pull/1961
Updated by Alfredo Deza almost 10 years ago
- Status changed from Fix Under Review to Resolved
Merged into Ceph master branch with hash 31eefeb