diff --git a/doc/source/user/aio/quickstart.rst b/doc/source/user/aio/quickstart.rst index 2b55b37bb9..c0e82a0aab 100644 --- a/doc/source/user/aio/quickstart.rst +++ b/doc/source/user/aio/quickstart.rst @@ -132,6 +132,13 @@ on the device, then execute: # export BOOTSTRAP_OPTS="bootstrap_host_data_disk_device=sdb" +By default the filesystem type will be set to ext4, if you want another type +of filesystem to be used, just use something similar to the following: + +.. code-block:: shell-session + + # export BOOTSTRAP_OPTS="bootstrap_host_data_disk_device=sdb bootstrap_host_data_disk_fs_type=xfs" + Additional options may be implemented by simply concatenating them with a space between each set of options, for example: diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index dc676866a6..69504b34be 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -223,6 +223,9 @@ bridge_iptables_rules: | # set the full path to the device. IE: "/dev/xvde" should be "xvde". bootstrap_host_data_disk_device: null # +# Specify the default filesystem type +bootstrap_host_data_disk_fs_type: ext4 +# # Boolean value to force the repartitioning of the secondary device. bootstrap_host_data_disk_device_force: no # diff --git a/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml b/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml index df3e9125cf..10b7ba9330 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_data_disk.yml @@ -20,7 +20,7 @@ # in case these tasks are executed multiple times. - name: Determine whether partitions labeled openstack-data{1,2} are present shell: | - parted --script -l -m | egrep -q ':ext4:openstack-data[12]:;$' + parted --script -l -m | egrep -q ':{{ bootstrap_host_data_disk_fs_type }}:openstack-data[12]:;$' register: data_disk_partitions changed_when: false failed_when: false @@ -38,7 +38,7 @@ mount: name: "{{ item.mount }}" src: "{{ item.device }}" - fstype: ext4 + fstype: "{{ bootstrap_host_data_disk_fs_type }}" state: absent when: - bootstrap_host_data_disk_device_force | bool @@ -52,14 +52,14 @@ - bootstrap_host_data_disk_device_force | bool with_items: - "parted --script /dev/{{ _bootstrap_host_data_disk_device }} mklabel gpt" - - "parted --align optimal --script /dev/{{ _bootstrap_host_data_disk_device }} mkpart openstack-data1 ext4 0% 40%" + - "parted --align optimal --script /dev/{{ _bootstrap_host_data_disk_device }} mkpart openstack-data1 {{ bootstrap_host_data_disk_fs_type }} 0% 40%" - "parted --align optimal --script /dev/{{ _bootstrap_host_data_disk_device }} mkpart openstack-data2 {{ bootstrap_host_data_disk2_fs }} 40% 100%" tags: - create-data-disk-partitions - name: Format the partition 1 filesystem: - fstype: ext4 + fstype: "{{ bootstrap_host_data_disk_fs_type }}" dev: "/dev/{{ _bootstrap_host_data_disk_device }}1" opts: "{{ bootstrap_host_format_options['ext4'] | default(omit) }}" when: @@ -87,8 +87,8 @@ systemd_mounts: - what: "/dev/{{ _bootstrap_host_data_disk_device }}1" where: "/openstack" - type: "ext4" - options: "{{ bootstrap_host_data_mount_options['ext4'] }}" + type: "{{ bootstrap_host_data_disk_fs_type }}" + options: "{{ bootstrap_host_data_mount_options[bootstrap_host_data_disk_fs_type] }}" state: 'started' enabled: true tags: