From cbc8437f9f8e1b7a60af061dc68882185b5e20b3 Mon Sep 17 00:00:00 2001 From: Saravanan D Date: Tue, 15 Mar 2022 17:25:54 -0700 Subject: [mdadm] Record array UUID (#1742) Useful to have the UUID of the arrays to assemble them when the need arises Signed-off-by: Saravanan D --- lib/ohai/plugins/linux/mdadm.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/ohai/plugins/linux/mdadm.rb b/lib/ohai/plugins/linux/mdadm.rb index f7bfc528..b20d99bb 100644 --- a/lib/ohai/plugins/linux/mdadm.rb +++ b/lib/ohai/plugins/linux/mdadm.rb @@ -35,6 +35,8 @@ Ohai.plugin(:Mdadm) do device_mash[:size] = Regexp.last_match[1].to_f when /State\s+: ([a-z]+)/ device_mash[:state] = Regexp.last_match[1] + when /UUID\s+: ([0-9a-z:]+)/ + device_mash[:UUID] = Regexp.last_match[1] when /Total Devices\s+: ([0-9]+)/ device_mash[:device_counts][:total] = Regexp.last_match[1].to_i when /Raid Devices\s+: ([0-9]+)/ -- cgit v1.2.1