]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: map after luks formatting
authorLoic Dachary <ldachary@redhat.com>
Wed, 2 Mar 2016 09:14:16 +0000 (16:14 +0700)
committerLoic Dachary <ldachary@redhat.com>
Fri, 4 Mar 2016 02:13:35 +0000 (09:13 +0700)
commit003dc15443353639fd8ef41320bf7436c391e8be
tree34fb80be6b8fc0fc669a9037344378bf51470f09
parent94c5df45675092e0d119112861eb96166cf266f4
ceph-disk: map after luks formatting

dmcrypt_map is idempotent, it does not matter that it is called multiple
times when activating or preparing a device. It is however important to
not cryptsetup remove the device after preparing it because partprobe
may not re-send another add udev event to luksOpen / create it again.

On Ubuntu 14.04, no extra add udev event is sent after the partition was
acknowledged by the kernel. On CentOS 7.2 an extra udev event is sent
for each existing partition, regardless of what the kernel already
knows.

The format() function is just a call to map() to limit the extent of the
refactor. The dmcrypt_map/unmap functions should be refactored into a
device class and the format() function can then be made more specific.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/ceph-disk/ceph_disk/main.py