Skip to content

Commit 6ce7885

Browse files
authored
Merge pull request #130 from rchikatw/master
Added check when thinpool size is specified
2 parents 6dc6baa + b7f9ed6 commit 6ce7885

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roles/backend_setup/tasks/thin_pool_create.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
233233
234234
- name: Create a LV thinpool
235-
command: "lvcreate -l {{ item.thinpoolsize | default('100%FREE') }} --options {% if item.raid is defined and item.raid is not none
235+
command: "lvcreate {% if item.thinpoolsize is defined %} -L {{ item.thinpoolsize }} {% else %} -l 100%FREE {% endif %} --options {% if item.raid is defined and item.raid is not none
236236
and item.raid.level is defined and item.raid.devices is defined and item.raid.stripe is defined
237237
and item.raid.level in [0,5,6,10]%}
238238
{% if item.raid.level == 0 %}
@@ -286,7 +286,7 @@
286286
#end-block
287287

288288
- name: Create a LV thinpool for similar device types
289-
command: "lvcreate --type thin-pool --zero n -l {{ item.thinpoolsize | default('100%FREE') }} --chunksize {{ lv_chunksize }} --poolmetadatasize {{ item.poolmetadatasize + \"iB\" }} -n {{ item.thinpoolname }} {{ item.vgname }} "
289+
command: "lvcreate --type thin-pool --zero n {% if item.thinpoolsize is defined %} -L {{ item.thinpoolsize }} {% else %} -l 100%FREE {% endif %} --chunksize {{ lv_chunksize }} --poolmetadatasize {{ item.poolmetadatasize + \"iB\" }} -n {{ item.thinpoolname }} {{ item.vgname }} "
290290
# lvol:
291291
# state: present
292292
# shrink: false

0 commit comments

Comments
 (0)