Skip to content

Commit

Permalink
Set Ceph device partitions owner to ceph user in udev.
Browse files Browse the repository at this point in the history
Signed-off-by: Milan Broz <[email protected]>
  • Loading branch information
Milan Broz authored and liewegas committed Aug 27, 2015
1 parent bbedc8e commit 8bd35bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions udev/95-ceph-osd.rules.systemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
ACTION=="add", SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \
OWNER:="ceph", GROUP:="ceph", MODE:="660", \
TAG+="systemd", \
ENV{SYSTEMD_WANTS}+="ceph-disk-activate@/dev/$name.service"

# activate ceph-tagged partitions
ACTION=="add", SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="45b0969e-9b03-4f30-b4c6-b4b80ceff106", \
OWNER:="ceph", GROUP:="ceph", MODE:="660", \
TAG+="systemd", \
ENV{SYSTEMD_WANTS}+="ceph-disk-activate-journal@/dev/$name.service"

# Map journal if using dm-crypt
ACTION=="add" SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="45b0969e-9b03-4f30-b4c6-5ec00ceff106", \
OWNER:="ceph", GROUP:="ceph", MODE:="660", \
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"

# Map data device and
Expand All @@ -24,5 +27,6 @@ ACTION=="add" SUBSYSTEM=="block", \
ACTION=="add" SUBSYSTEM=="block", \
ENV{DEVTYPE}=="partition", \
ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-5ec00ceff05d", \
OWNER:="ceph", GROUP:="ceph", MODE:="660", \
TAG+="systemd", \
ENV{SYSTEMD_WANTS}+="ceph-disk-dmcrypt-activate@/dev/$name.service"

0 comments on commit 8bd35bd

Please sign in to comment.