summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaravanan D <saravanand@outlook.com>2022-03-15 17:25:54 -0700
committerGitHub <noreply@github.com>2022-03-15 17:25:54 -0700
commitcbc8437f9f8e1b7a60af061dc68882185b5e20b3 (patch)
treec6d2640f8c4aee9ed5ade8892395a0a1943d2903 /lib
parent996b52b8017f1378e4c29b4faeb9ed90db1e9579 (diff)
downloadohai-cbc8437f9f8e1b7a60af061dc68882185b5e20b3.tar.gz
[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 <saravanand@fb.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ohai/plugins/linux/mdadm.rb2
1 files changed, 2 insertions, 0 deletions
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]+)/