diff options
author | Sage Weil <sage@redhat.com> | 2015-08-31 20:50:40 +0200 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2015-09-01 17:22:25 +0200 |
commit | 3662a225b8807f091809388bfb9c5a7eb15efc42 (patch) | |
tree | 62bee5a0f08eef380f99d37e9129245943928797 /udev | |
parent | systemd: consolidate into a single ceph-disk@.service (diff) | |
download | ceph-3662a225b8807f091809388bfb9c5a7eb15efc42.tar.xz ceph-3662a225b8807f091809388bfb9c5a7eb15efc42.zip |
udev: use ceph-disk trigger ... with single set of udev rules
Signed-off-by: Sage Weil <sage@redhat.com>
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" |