Skip to content

Commit

Permalink
Workaround for Ceph issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilienM committed Aug 30, 2023
1 parent cc435ad commit d7212c2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
17 changes: 17 additions & 0 deletions playbooks/prepare_host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,23 @@
- name: Wipe filesystem from disk # noqa no-changed-when
ansible.builtin.command: wipefs -a "{{ item }}"
loop: "{{ ceph_devices }}"
- name: Expose Ceph devices to LVM
when:
- ceph_devices_to_lvm
block:
- name: Ensure we have lvm2
ansible.builtin.package:
name: lvm2
state: present
- name: Create VG for ceph devices
community.general.lvg:
vg: vg_ceph
pvs: "{{ ceph_devices | join(',') }}"
- name: Create LV for ceph devices
community.general.lvol:
vg: vg_ceph
lv: data
size: 100%VG

- name: Prepare kernel and reboot
when:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/roles/ceph/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
content: |
data_devices:
paths:
{% if ceph_devices is defined and ceph_devices | length > 0 %}
{% if ceph_devices is defined and (ceph_devices | length > 0) and (ceph_devices is not true) and (not ceph_devices_to_lvm | default(false)) %}
{% for d in ceph_devices %}
- {{ d }}
{% endfor %}
Expand Down
7 changes: 7 additions & 0 deletions playbooks/vars/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ ceph_enabled: true
# ceph_devices:
# - /dev/disk/by-path/pci-0000:45:00.0-ata-3

# It will create a LVM PV from all `ceph_devices` and then
# create a VG and LV. Then the VG will be exposed to Ceph to
# create the OSD on it.
# This can be used to workaround hardware issues like
# reported here: https://bugzilla.redhat.com/show_bug.cgi?id=2235819
ceph_devices_to_lvm: false

# Size of the loop device that will be
# used for Ceph (in GB).
ceph_loop_device_size: 100
Expand Down

0 comments on commit d7212c2

Please sign in to comment.