lib/kuzushi.rb in kuzushi-0.0.45 vs lib/kuzushi.rb in kuzushi-0.0.46
- old
+ new
@@ -54,10 +54,11 @@
@init = (ENV['JUDO_FIRSTBOOT'] == "true")
@config = JSON.parse(File.read("config.json"))
@scripts = false
process :packages
+ task "stopping udev" do
process :volumes
execute_tasks
end
@@ -181,16 +182,18 @@
end
end
def handle_raid(r)
task "create raid #{r.device}", :init => true do
+ shell "service udev stop"
shell "mdadm --create #{r.device} -n #{r.drives.size} -l #{r.level} -c #{r.chunksize || 64} #{r.drives.join(" ")}"
+ shell "service udev start"
end
task "assemble raid #{r.device}" do ## assemble fails a lot with device busy - is udev to blame :(
if not dev_exists? r.device
- shell "service stop udev"
+ shell "service udev stop"
shell "mdadm --assemble #{r.device} #{r.drives.join(" ")}"
- shell "service start udev"
+ shell "service udev start"
end
end
add_package "mdadm"
end