Oliver Freyermuth
2018-11-30 10:44:51 UTC
Dear Cephalopodians,
I'm probably missing something obvious, but I am at a loss here on how to actually make use of a customized crush location hook.
I'm currently on "ceph version 13.2.1" on CentOS 7 (i.e. the last version before the upgrade-preventing bugs). Here's what I did:
1. Write a script /usr/local/bin/customized-ceph-crush-location. The script can be executed by user "ceph":
# sudo -u ceph /usr/local/bin/customized-ceph-crush-location
host=osd001 datacenter=FTD root=default
2. Add the following to ceph.conf:
[osd]
crush_location_hook = /usr/local/bin/customized-ceph-crush-location
3. Restart an OSD and confirm that is picked up:
# systemctl restart ceph-***@0
# ceph config show-with-defaults osd.0
...
crush_location_hook /usr/local/bin/customized-ceph-crush-location file
...
osd_crush_update_on_start true default
...
However, the script is not executed, and I can ensure that since the script should also write a log to /tmp, which is not created.
Also, the "datacenter" type does not show up in the crush tree.
I have already disabled SELinux just to make sure.
Any ideas what I am missing here?
Cheers and thanks in advance,
Oliver
I'm probably missing something obvious, but I am at a loss here on how to actually make use of a customized crush location hook.
I'm currently on "ceph version 13.2.1" on CentOS 7 (i.e. the last version before the upgrade-preventing bugs). Here's what I did:
1. Write a script /usr/local/bin/customized-ceph-crush-location. The script can be executed by user "ceph":
# sudo -u ceph /usr/local/bin/customized-ceph-crush-location
host=osd001 datacenter=FTD root=default
2. Add the following to ceph.conf:
[osd]
crush_location_hook = /usr/local/bin/customized-ceph-crush-location
3. Restart an OSD and confirm that is picked up:
# systemctl restart ceph-***@0
# ceph config show-with-defaults osd.0
...
crush_location_hook /usr/local/bin/customized-ceph-crush-location file
...
osd_crush_update_on_start true default
...
However, the script is not executed, and I can ensure that since the script should also write a log to /tmp, which is not created.
Also, the "datacenter" type does not show up in the crush tree.
I have already disabled SELinux just to make sure.
Any ideas what I am missing here?
Cheers and thanks in advance,
Oliver