diff options
author | Tim Smith <tsmith@llnw.com> | 2013-08-17 10:09:59 -0700 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-10-04 09:52:10 -0700 |
commit | c12a97632ca6173019f2fa49de943a25c43e8b05 (patch) | |
tree | b4d7c62a72f156752bca295fbbe461c3f64e68d6 /lib/chef/provider/mdadm.rb | |
parent | 396eb347939f7f37391aeb623af7ab397f4df413 (diff) | |
download | chef-c12a97632ca6173019f2fa49de943a25c43e8b05.tar.gz |
MDADM provider: Don't pass chunk size for mirrors
Mirros don't use chunk size. MDADM ignores it currently, but Chef
really shouldn't be passing it. It's easy enough to avoid.
Diffstat (limited to 'lib/chef/provider/mdadm.rb')
-rw-r--r-- | lib/chef/provider/mdadm.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/mdadm.rb b/lib/chef/provider/mdadm.rb index c1a7dab2c4..51c9b8d3c6 100644 --- a/lib/chef/provider/mdadm.rb +++ b/lib/chef/provider/mdadm.rb @@ -48,7 +48,8 @@ class Chef def action_create unless @current_resource.exists converge_by("create RAID device #{new_resource.raid_device}") do - command = "yes | mdadm --create #{@new_resource.raid_device} --chunk=#{@new_resource.chunk} --level #{@new_resource.level}" + command = "yes | mdadm --create #{@new_resource.raid_device} --level #{@new_resource.level}" + command << " --chunk=#{@new_resource.chunk}" unless @new_resource.level == 1 command << " --metadata=#{@new_resource.metadata}" command << " --bitmap=#{@new_resource.bitmap}" if @new_resource.bitmap command << " --raid-devices #{@new_resource.devices.length} #{@new_resource.devices.join(" ")}" |