Merge "Create two loop devices for bluestore and filestore"
This commit is contained in:
commit
668c03178d
|
@ -1,21 +1,26 @@
|
|||
ceph-loop-device
|
||||
================
|
||||
|
||||
This role creates the /dev/loop3 (default) loop device required when you have
|
||||
ceph services in the deployment. For Stein and newer it creates three logical
|
||||
volumes for use with bluestore.
|
||||
This roles creates the /dev/loop3 and /dev/loop4 (default) loop
|
||||
devices required when you have Ceph services in the deployment.
|
||||
The first device is used for legacy jobs which use Ceph Filestore.
|
||||
The second loop device has three logical volumes created on it for
|
||||
use with Ceph Bluestore.
|
||||
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
ceph_loop_device: /dev/loop3
|
||||
ceph_loop_device: /dev/loop4
|
||||
ceph_loop_device_legacy: /dev/loop3
|
||||
ceph_loop_device_file: /var/lib/ceph-osd.img
|
||||
ceph_loop_device_file_legacy: /var/lib/ceph-osd-legacy.img
|
||||
ceph_logical_volume_group: ceph_vg
|
||||
ceph_logical_volume_wal: ceph_lv_wal
|
||||
ceph_logical_volume_db: ceph_lv_db
|
||||
ceph_logical_volume_data: ceph_lv_data
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
ceph_loop_device: /dev/loop3
|
||||
ceph_loop_device: /dev/loop4
|
||||
ceph_loop_device_legacy: /dev/loop3
|
||||
ceph_loop_device_file: /var/lib/ceph-osd.img
|
||||
ceph_loop_device_file_legacy: /var/lib/ceph-osd-legacy.img
|
||||
ceph_logical_volume_group: ceph_vg
|
||||
ceph_logical_volume_wal: ceph_lv_wal
|
||||
ceph_logical_volume_db: ceph_lv_db
|
||||
|
|
|
@ -12,21 +12,22 @@
|
|||
- name: Make sure we have losetup installed/latest
|
||||
become: true
|
||||
package:
|
||||
name: util-linux
|
||||
name:
|
||||
- util-linux
|
||||
- lvm2
|
||||
state: latest
|
||||
|
||||
- name: Use dd and losetup to create the loop device
|
||||
- name: Use dd and losetup to create the loop devices
|
||||
become: true
|
||||
shell: |
|
||||
dd if=/dev/zero of={{ ceph_loop_device_file }} bs=1 count=0 seek=7G
|
||||
losetup {{ ceph_loop_device }} {{ ceph_loop_device_file }}
|
||||
dd if=/dev/zero of={{ item.0 }} bs=1 count=0 seek=7G
|
||||
losetup {{ item.1 }} {{ item.0 }}
|
||||
lsblk
|
||||
with_together:
|
||||
- ["{{ ceph_loop_device_file }}", "{{ ceph_loop_device_file_legacy }}"]
|
||||
- ["{{ ceph_loop_device }}", "{{ ceph_loop_device_legacy }}"]
|
||||
|
||||
- name: Get branch
|
||||
set_fact:
|
||||
ci_branch: "{{ zuul.branch | default('master') | replace('stable/','') }}"
|
||||
|
||||
- name: Use {pv,vg,lv}create to create logical volumes on loop device
|
||||
- name: Use {pv,vg,lv}create to create logical volumes on one loop device
|
||||
become: true
|
||||
shell: |
|
||||
pvcreate {{ ceph_loop_device }}
|
||||
|
@ -35,6 +36,3 @@
|
|||
lvcreate -n {{ ceph_logical_volume_db }} -l 375 {{ ceph_logical_volume_group }}
|
||||
lvcreate -n {{ ceph_logical_volume_data }} -l 1041 {{ ceph_logical_volume_group }}
|
||||
lvs
|
||||
when:
|
||||
- ci_branch is defined
|
||||
- ci_branch is not match('(newton|ocata|pike)')
|
||||
|
|
Loading…
Reference in New Issue