An lvm module that can set issue_discards and global_filter
[mirror/dsa-puppet.git] / modules / lvm / templates / lvm.conf-buster.erb
index f2bcf02..fe17ea9 100644 (file)
@@ -148,6 +148,10 @@ devices {
        # global_filter are not opened by LVM.
        # This configuration option has an automatic default value.
        # global_filter = [ "a|.*/|" ]
+<% if @global_filter -%>
+       global_filter = <%= @global_filter -%>
+
+<% end -%>
 
        # Configuration option devices/types.
        # List of additional acceptable block device types.
@@ -282,8 +286,13 @@ devices {
        # benefit from discards, but SSDs and thinly provisioned LUNs
        # generally do. If enabled, discards will only be issued if both the
        # storage and kernel provide support.
+<% if @issue_discards -%>
+       issue_discards = 1
+
+<% else -%>
        issue_discards = 0
 
+<% end -%>
        # Configuration option devices/allow_changes_with_duplicate_pvs.
        # Allow VG modification while a PV appears on multiple devices.
        # When a PV appears on multiple devices, LVM attempts to choose the