diff --git a/multi-node-aio/README.rst b/multi-node-aio/README.rst index 2d389d36..8d3d5308 100644 --- a/multi-node-aio/README.rst +++ b/multi-node-aio/README.rst @@ -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 diff --git a/multi-node-aio/playbooks/group_vars/all.yml b/multi-node-aio/playbooks/group_vars/all.yml index c7f6d9ca..c7b46678 100644 --- a/multi-node-aio/playbooks/group_vars/all.yml +++ b/multi-node-aio/playbooks/group_vars/all.yml @@ -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 diff --git a/multi-node-aio/playbooks/setup-host.yml b/multi-node-aio/playbooks/setup-host.yml index 4f1c858d..e8236259 100644 --- a/multi-node-aio/playbooks/setup-host.yml +++ b/multi-node-aio/playbooks/setup-host.yml @@ -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