File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
lib/puppet/provider/zpool Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -62,19 +62,21 @@ def process_zpool_data(pool_array)
6262 end
6363
6464 def get_pool_data
65- # https://docs.oracle.com/cd/E19082-01/817-2271/gbcve /index.html
66- # we could also use zpool iostat -v mypool for a (little bit) cleaner output
65+ # https://openzfs.github.io/openzfs-docs/msg /index.html
66+ # https://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/gbcve/index.html
6767 zpool_opts = case Facter . value ( :kernel )
68- # use full device names ("-P") on Linux/ZOL to prevent
69- # mismatches between creation and display paths:
68+ # Do not use the 'scripted mode' ("-H") to maintain
69+ # compatibility with non-OpenZFS targets.
70+ #
71+ # Use full device names ("-P") on Linux (OpenZFS) to
72+ # prevent mismatches between creation and display paths:
7073 when 'Linux'
7174 '-P'
7275 else
7376 ''
7477 end
75- out = execute ( "zpool status #{ zpool_opts } #{ @resource [ :pool ] } " , failonfail : false , combine : false )
76- zpool_data = out . lines . select { |line | line . index ( "\t " ) == 0 } . map { |l | l . strip . split ( "\s " ) [ 0 ] }
77- zpool_data . shift
78+ out = execute ( "zpool iostat -v #{ zpool_opts } #{ @resource [ :pool ] } " , failonfail : false , combine : false )
79+ zpool_data = out . lines [ 3 ..-2 ] . map { |line | line . strip . split ( "\s " ) [ 0 ] }
7880 zpool_data
7981 end
8082
You can’t perform that action at this time.
0 commit comments