File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
lib/puppet/provider/zpool Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -62,19 +62,21 @@ def process_zpool_data(pool_array)
62
62
end
63
63
64
64
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
67
67
zpool_opts = case Facter . value ( :kernel )
68
- # use full device names ("-P") on Linux/ZOL to prevent
68
+ # Do not use the 'scripted mode' ("-H") to maintain
69
+ # compatibility with non-OpenZFS targets.
70
+ #
71
+ # Use full device names ("-P") on OpenZFS to prevent
69
72
# mismatches between creation and display paths:
70
73
when 'Linux'
71
74
'-P'
72
75
else
73
76
''
74
77
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 ] }
78
80
zpool_data
79
81
end
80
82
You can’t perform that action at this time.
0 commit comments