Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Allow raid_su and raid_sw to be blank, even if it is not recommended.
Browse files Browse the repository at this point in the history
There could be some cases when you want to omit these choices.

Bug reported by Gilles Dubreuil.
  • Loading branch information
purpleidea committed Apr 10, 2014
1 parent 117ac5c commit c1e6e03
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions manifests/brick.pp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@

$lvm_dataalignment = inline_template('<%= @raid_su.to_i*@raid_sw.to_i %>')

$lvm_pvcreate = "/sbin/pvcreate --dataalignment ${lvm_dataalignment}K ${dev1}"
$lvm_pvcreate = "${raid_su}${raid_sw}" ? { # both empty ?
'' => "/sbin/pvcreate ${dev1}",
default => "/sbin/pvcreate --dataalignment ${lvm_dataalignment}K ${dev1}",
}

$lvm_vgcreate = "/sbin/vgcreate ${lvm_vgname} ${dev1}"

Expand Down Expand Up @@ -241,7 +244,10 @@
# system. These options are sometimes auto-detected but manual
# configuration is needed with many of the hardware RAID
# volumes.
$xfs_arg05 = "-d su=${raid_su}k,sw=${raid_sw}"
$xfs_arg05 = "${raid_su}${raid_sw}" ? { # both empty ?
'' => '',
default => "-d su=${raid_su}k,sw=${raid_sw}",
}

$xfs_cmdlist = [
"${xfs_arg00}",
Expand Down

0 comments on commit c1e6e03

Please sign in to comment.