lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.9 vs lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.10

- old
+ new

@@ -86,18 +86,25 @@ line = line.strip.chomp.split(':') unless vg[line[1]].nil? vg[line[1]][:disks] << { :name => line[0], - :uuid => line[11].to_i, - :size => (line[2].to_i * 1024), + :uuid => line[11], + :size => (line[8].to_i * (line[7].to_i * 1024)), # See Note 1 below :extents => { :size => (line[7].to_i * 1024), :total => line[8].to_i, :allocated => line[10].to_i, :free => line[9].to_i } } + + # the output of certain versions of pvdisplay -c reports a blatantly incorrect + # physical volume total size. the workaround is to calculate the actual total size + # via (total extents * extent size) + # + # this may or may not be GPT related + # end end stat :disk, { \ No newline at end of file