2013-02-14 01:30:19 +00:00
|
|
|
# activate ceph-tagged partitions
|
|
|
|
ACTION=="add", SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \
|
2015-07-30 14:00:29 +00:00
|
|
|
RUN+="/usr/sbin/ceph-disk activate /dev/$name"
|
2013-02-14 02:22:45 +00:00
|
|
|
|
2013-06-13 22:54:58 +00:00
|
|
|
# activate ceph-tagged partitions
|
|
|
|
ACTION=="add", SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="45b0969e-9b03-4f30-b4c6-b4b80ceff106", \
|
|
|
|
RUN+="/usr/sbin/ceph-disk activate-journal /dev/$name"
|
|
|
|
|
2014-10-30 21:29:36 +00:00
|
|
|
# Map journal if using dm-crypt and plain
|
2013-02-14 02:22:45 +00:00
|
|
|
ACTION=="add" SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="45b0969e-9b03-4f30-b4c6-5ec00ceff106", \
|
|
|
|
RUN+="/sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/$env{ID_PART_ENTRY_UUID} --key-size 256 create $env{ID_PART_ENTRY_UUID} /dev/$name"
|
|
|
|
|
2014-10-30 21:29:36 +00:00
|
|
|
# Map journal if using dm-crypt and luks
|
|
|
|
ACTION=="add" SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="45b0969e-9b03-4f30-b4c6-35865ceff106", \
|
|
|
|
RUN+="/sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/$env{ID_PART_ENTRY_UUID}.luks.key luksOpen /dev/$name $env{ID_PART_ENTRY_UUID}"
|
|
|
|
|
2013-02-14 02:22:45 +00:00
|
|
|
# Map data device and
|
|
|
|
# activate ceph-tagged partitions
|
2014-10-30 21:29:36 +00:00
|
|
|
# for dm-crypted data devices and plain
|
2013-02-14 02:22:45 +00:00
|
|
|
ACTION=="add" SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-5ec00ceff05d", \
|
|
|
|
RUN+="/sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/$env{ID_PART_ENTRY_UUID} --key-size 256 create $env{ID_PART_ENTRY_UUID} /dev/$name", \
|
2013-04-15 22:57:00 +00:00
|
|
|
RUN+="/bin/bash -c 'while [ ! -e /dev/mapper/$env{ID_PART_ENTRY_UUID} ];do sleep 1; done'", \
|
2015-07-30 14:00:29 +00:00
|
|
|
RUN+="/usr/sbin/ceph-disk activate /dev/mapper/$env{ID_PART_ENTRY_UUID}"
|
2014-10-30 21:29:36 +00:00
|
|
|
|
|
|
|
# Map data device and
|
|
|
|
# activate ceph-tagged partitions
|
|
|
|
# for dm-crypted data devices and luks
|
|
|
|
ACTION=="add" SUBSYSTEM=="block", \
|
|
|
|
ENV{DEVTYPE}=="partition", \
|
|
|
|
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-35865ceff05d", \
|
|
|
|
RUN+="/sbin/cryptsetup --key-file /etc/ceph/dmcrypt-keys/$env{ID_PART_ENTRY_UUID}.luks.key luksOpen /dev/$name $env{ID_PART_ENTRY_UUID}", \
|
|
|
|
RUN+="/bin/bash -c 'while [ ! -e /dev/mapper/$env{ID_PART_ENTRY_UUID} ];do sleep 1; done'", \
|
2015-07-30 14:00:29 +00:00
|
|
|
RUN+="/usr/sbin/ceph-disk activate /dev/mapper/$env{ID_PART_ENTRY_UUID}"
|