Merge "Add mnaio_data_disk_suffix var to support NVMe partition naming"
This commit is contained in:
commit
efad11621a
|
@ -33,6 +33,14 @@ by exporting the extra var before running build.sh, eg:
|
|||
export MNAIO_ANSIBLE_PARAMETERS="-e mnaio_data_disk=sdb"
|
||||
./build.sh
|
||||
|
||||
NVMe partitions generally show a ``p`` before the partition number. The default
|
||||
suffix of ``1`` for ``sdb1`` can be changed to ``p1`` to support NVMe naming
|
||||
conventions using the ``mnaio_data_disk_suffix`` extra var shown here:
|
||||
|
||||
.. code-block:: bash
|
||||
export MNAIO_ANSIBLE_PARAMETERS="-e mnaio_data_disk=nvme0n1 -e mnaio_data_disk_suffix=p1"
|
||||
./build.sh
|
||||
|
||||
The playbooks will look for a volume group named "vg01", if this volume group
|
||||
exists no partitioning or setup on the data disk will take place. To effectively
|
||||
use this process for testing it's recommended that the host machine have at least
|
||||
|
|
|
@ -107,6 +107,8 @@ images:
|
|||
|
||||
# mnaio_data_disk: 'sdc' # str - not required, set this to define a given data disk if no data disk
|
||||
# is defined the largest unpartitioned disk will be used.
|
||||
# mnaio_data_disk_suffix: 1 # str - not required, set this correspond to partition scheme
|
||||
|
||||
mnaio_host_networks:
|
||||
dhcp:
|
||||
iface: 'vm-br-dhcp' # str - required, interface name
|
||||
|
|
|
@ -365,14 +365,14 @@
|
|||
- name: Prepare the data disk file system
|
||||
filesystem:
|
||||
fstype: ext4
|
||||
dev: "/dev/{{ mnaio_data_disk }}1"
|
||||
dev: "/dev/{{ mnaio_data_disk }}{{ mnaio_data_disk_suffix | default('1') }}"
|
||||
force: yes
|
||||
when:
|
||||
- _add_partition is changed
|
||||
|
||||
- name: Mount the data disk
|
||||
mount:
|
||||
src: "/dev/{{ mnaio_data_disk }}1"
|
||||
src: "/dev/{{ mnaio_data_disk }}{{ mnaio_data_disk_suffix | default('1') }}"
|
||||
path: /data
|
||||
state: mounted
|
||||
fstype: ext4
|
||||
|
|
Loading…
Reference in New Issue