Fixes: http://tracker.ceph.com/issues/20910
Signed-off-by: David Galloway <dgallowa@redhat.com>
tags:
- partition
+- name: set up LVM
+ include: lvm.yml
+ tags:
+ - lvm
+
+- name: mount /var/lib/ceph to specified partition
+ include: var_lib.yml
+ when: var_lib_partition is defined
+ tags:
+ - varlib
+
- name: configure ssh
include: ssh.yml
tags:
tags:
- cpan
-- include: lvm.yml
- tags:
- - lvm
-
# configure ntp
- include: ntp.yml
tags:
--- /dev/null
+---
+# This set of tasks is intended to mount a small NVMe partition to /var/lib/ceph
+# to fix http://tracker.ceph.com/issues/20910
+
+- name: "Create /var/lib/ceph"
+ file:
+ path: "/var/lib/ceph"
+ state: directory
+
+- name: "Create xfs filesystem on {{ var_lib_partition }}"
+ filesystem:
+ dev: "{{ var_lib_partition }}"
+ fstype: xfs
+ force: yes
+
+- name: "Mount {{ var_lib_partition }} to /var/lib/ceph"
+ mount:
+ path: "/var/lib/ceph"
+ src: "{{ var_lib_partition }}"
+ fstype: xfs
+ state: mounted
shell: "lsblk --list --noheadings | grep part | grep -v {{ root_disk|regex_replace('/dev/', '') }} | awk '{ print $1 }'"
register: non_root_partitions
+- name: Unmount any non-root mountpoints
+ mount:
+ path: "{{ item.mount }}"
+ state: unmounted
+ with_items: "{{ ansible_mounts }}"
+ when: item.mount != '/'
+
## http://tracker.ceph.com/issues/20533
## Trusty version of wipefs lacks --force option
- name: Wipe filesystems on non-root partitions