Allow user to choose filesystem for osd
Change-Id: I9c770a08219d2eead5ece8e3462157359cd920cb Partially-Implements: blueprint ceph-improvements
This commit is contained in:
parent
e9b9a84157
commit
6d0cd535d3
@ -225,6 +225,12 @@ ceph_enable_cache: "no"
|
|||||||
# Valid options are [ forward, none, writeback ]
|
# Valid options are [ forward, none, writeback ]
|
||||||
ceph_cache_mode: "writeback"
|
ceph_cache_mode: "writeback"
|
||||||
|
|
||||||
|
# Valid options are [ ext4, btrfs, xfs ]
|
||||||
|
ceph_osd_filesystem: "xfs"
|
||||||
|
|
||||||
|
# These are /etc/fstab options. Comma seperated, no spaces (see fstab(8))
|
||||||
|
ceph_osd_mount_options: "defaults,noatime"
|
||||||
|
|
||||||
# A requirement for using the erasure-coded pools is you must setup a cache tier
|
# A requirement for using the erasure-coded pools is you must setup a cache tier
|
||||||
# Valid options are [ erasure, replicated ]
|
# Valid options are [ erasure, replicated ]
|
||||||
ceph_pool_type: "replicated"
|
ceph_pool_type: "replicated"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
KOLLA_BOOTSTRAP:
|
KOLLA_BOOTSTRAP:
|
||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
OSD_DEV: "{{ item.1.device }}"
|
OSD_DEV: "{{ item.1.device }}"
|
||||||
|
OSD_FILESYSTEM: "{{ ceph_osd_filesystem }}"
|
||||||
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
||||||
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
||||||
image: "{{ ceph_osd_image_full }}"
|
image: "{{ ceph_osd_image_full }}"
|
||||||
@ -55,6 +56,7 @@
|
|||||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||||
CEPH_CACHE:
|
CEPH_CACHE:
|
||||||
OSD_DEV: "{{ item.1.device }}"
|
OSD_DEV: "{{ item.1.device }}"
|
||||||
|
OSD_FILESYSTEM: "{{ ceph_osd_filesystem }}"
|
||||||
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
OSD_INITIAL_WEIGHT: "{{ osd_initial_weight }}"
|
||||||
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
HOSTNAME: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}"
|
||||||
image: "{{ ceph_osd_image_full }}"
|
image: "{{ ceph_osd_image_full }}"
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
- name: Mounting Ceph OSD volumes
|
- name: Mounting Ceph OSD volumes
|
||||||
mount:
|
mount:
|
||||||
src: "UUID={{ item.fs_uuid }}"
|
src: "UUID={{ item.fs_uuid }}"
|
||||||
fstype: xfs
|
fstype: "{{ ceph_osd_filesystem }}"
|
||||||
state: mounted
|
state: mounted
|
||||||
name: "/var/lib/ceph/osd/{{ item['fs_uuid'] }}"
|
name: "/var/lib/ceph/osd/{{ item['fs_uuid'] }}"
|
||||||
|
opts: "{{ ceph_osd_mount_options }}"
|
||||||
with_items: osds
|
with_items: osds
|
||||||
|
|
||||||
- name: Gathering OSD IDs
|
- name: Gathering OSD IDs
|
||||||
|
@ -8,6 +8,7 @@ RUN yum -y install \
|
|||||||
ceph-radosgw \
|
ceph-radosgw \
|
||||||
parted \
|
parted \
|
||||||
hdparm \
|
hdparm \
|
||||||
|
btrfs-progs \
|
||||||
&& yum clean all
|
&& yum clean all
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
@ -17,6 +18,7 @@ RUN apt-get install -y --no-install-recommends \
|
|||||||
radosgw \
|
radosgw \
|
||||||
parted \
|
parted \
|
||||||
hdparm \
|
hdparm \
|
||||||
|
btrfs-tools \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -29,7 +29,14 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
|||||||
OSD_ID=$(ceph osd create)
|
OSD_ID=$(ceph osd create)
|
||||||
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"
|
OSD_DIR="/var/lib/ceph/osd/ceph-${OSD_ID}"
|
||||||
mkdir -p "${OSD_DIR}"
|
mkdir -p "${OSD_DIR}"
|
||||||
mkfs.xfs -f "${OSD_PARTITION}"
|
|
||||||
|
if [[ "${OSD_FILESYSTEM}" == "btrfs" ]]; then
|
||||||
|
mkfs.btrfs -f "${OSD_PARTITION}"
|
||||||
|
elif [[ "${OSD_FILESYSTEM}" == "ext4" ]]; then
|
||||||
|
mkfs.ext4 "${OSD_PARTITION}"
|
||||||
|
else
|
||||||
|
mkfs.xfs -f "${OSD_PARTITION}"
|
||||||
|
fi
|
||||||
mount "${OSD_PARTITION}" "${OSD_DIR}"
|
mount "${OSD_PARTITION}" "${OSD_DIR}"
|
||||||
|
|
||||||
# This will through an error about no key existing. That is normal. It then
|
# This will through an error about no key existing. That is normal. It then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user