Enable discard

By default discard/trim requests are disabled for libvirt. This
patch enables them by default although in order to actually use
them, instances still need be using scsi disk devices. Also this
patch only permits Nova storage (e.g. instance root disk) to use
discard. For Cinder volumes this must be enabled in Cinder.

Change-Id: Iceb22fe5206629bc7b4096f518b8977c2e14def3
Closes-Bug: #1781382
This commit is contained in:
Edward Hope-Morley 2018-07-12 11:27:22 +01:00
parent 03b298a1ec
commit 2f9bbed3a9
4 changed files with 4 additions and 0 deletions

View File

@ -207,6 +207,7 @@ live_migration_tunnelled = False
{% if use_multipath -%}
iscsi_use_multipath = {{ use_multipath }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}
[lxd]

View File

@ -207,6 +207,7 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}
[lxd]

View File

@ -208,6 +208,7 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}
[lxd]

View File

@ -211,6 +211,7 @@ live_migration_tunnelled = False
{% if use_multipath -%}
volume_use_multipath = {{ use_multipath }}
{% endif %}
hw_disk_discard = unmap
{% if virt_type == 'lxd' -%}
[lxd]