From 7a1b20fff18bfaec108f0166bed4d9797b0cf0aa Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 11 Jun 2019 18:18:44 +0100 Subject: [PATCH] Increase size of /dev/shm on fume --- cookbooks/hardware/recipes/default.rb | 9 +++++++++ roles/fume.rb | 3 +++ 2 files changed, 12 insertions(+) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index bd525babf..c8898f405 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -535,3 +535,12 @@ unless Dir.glob("/sys/class/hwmon/hwmon*").empty? notifies :run, "execute[/etc/sensors.d/chef.conf]" end end + +if node[:hardware][:shm_size] + mount "/dev/shm" do + action [:mount, :enable] + device "tmpfs" + fstype "tmpfs" + options "rw,nosuid,nodev,size=#{node[:hardware][:shm_size]}" + end +end diff --git a/roles/fume.rb b/roles/fume.rb index 5ee5ce04e..694394c5d 100644 --- a/roles/fume.rb +++ b/roles/fume.rb @@ -2,6 +2,9 @@ name "fume" description "Master role applied to fume" default_attributes( + :hardware => { + :shm_size => "6g" + }, :networking => { :interfaces => { :external_ipv4 => { -- 2.39.5