diff options
Diffstat (limited to 'udev')
-rw-r--r-- | udev/95-ceph-osd.rules | 48 | ||||
-rw-r--r-- | udev/95-ceph-osd.rules.systemd | 32 |
2 files changed, 24 insertions, 56 deletions
diff --git a/udev/95-ceph-osd.rules b/udev/95-ceph-osd.rules index 3565f7caf13..5ad73956f12 100644 --- a/udev/95-ceph-osd.rules +++ b/udev/95-ceph-osd.rules @@ -1,53 +1,53 @@ -# activate ceph-tagged partitions +# OSD_UUID ACTION=="add", SUBSYSTEM=="block", \ ENV{DEVTYPE}=="partition", \ ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-9d25-41b8-afd0-062c0ceff05d", \ - RUN+="/usr/sbin/ceph-disk activate /dev/$name" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# activate ceph-tagged partitions +# JOURNAL_UUID 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" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# activate multipath ceph-tagged partitions +# MPATH_JOURNAL_UUID ACTION=="add", SUBSYSTEM=="block", \ ENV{ID_PART_ENTRY_TYPE}=="4fbd7e29-8ae0-4982-bf9d-5a8d867af560", \ - RUN+="/usr/sbin/ceph-disk activate /dev/$name" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# activate multipath ceph-tagged partitions +# MATH_OSD_UUID ACTION=="add", SUBSYSTEM=="block", \ ENV{ID_PART_ENTRY_TYPE}=="45b0969e-8ae0-4982-bf9d-5a8d867af560", \ - RUN+="/usr/sbin/ceph-disk activate-journal /dev/$name" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# Map journal if using dm-crypt and plain +# DMCRYPT_JOURNAL_UUID 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" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# Map journal if using dm-crypt and luks +# DMCRYPT_LUKS_JOURNAL_UUID 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}" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# Map data device and -# activate ceph-tagged partitions -# for dm-crypted data devices and plain +# DMCRYPT_OID_UUID 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", \ - RUN+="/bin/bash -c 'while [ ! -e /dev/mapper/$env{ID_PART_ENTRY_UUID} ];do sleep 1; done'", \ - RUN+="/usr/sbin/ceph-disk activate /dev/mapper/$env{ID_PART_ENTRY_UUID}" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" -# Map data device and -# activate ceph-tagged partitions -# for dm-crypted data devices and luks +# DMCRYPT_LUKS_OSD_UUID 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'", \ - RUN+="/usr/sbin/ceph-disk activate /dev/mapper/$env{ID_PART_ENTRY_UUID}" + OWNER:="ceph", GROUP:="ceph", MODE:="660", \ + RUN+="/usr/sbin/ceph-disk --log-stdout -v trigger /dev/$name" diff --git a/udev/95-ceph-osd.rules.systemd b/udev/95-ceph-osd.rules.systemd deleted file mode 100644 index 235c25509c7..00000000000 --- a/udev/95-ceph-osd.rules.systemd +++ /dev/null @@ -1,32 +0,0 @@ -# activate ceph-tagged partitions -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 -# activate ceph-tagged partitions -# for dm-crypted data devices -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" |