Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
In proxmox GUI drbd9 storage plugin reports as total size the aggregate
cluster size:
In file "/usr/share/perl5/PVE/Storage/Custom/DRBDPlugin.pm" at line 215
the command
drbdmanage list-free-space $redundancy -m
is used to get $total_space and $free_space,
but the first number returned is the "Aggregate cluster storage", as
stated by the output of the same command without the "machine-readable"
flag (-m).
It should be divided by $redundancy in order to obtain the correct value.
=========
208 sub status {
209 my ($class, $storeid, $scfg, $cache) = @_;
210
211 my ($total, $avail, $used);
212
213 eval {
214 my $redundancy = get_redundancy($scfg);
215 my @fs = qx{/usr/bin/drbdmanage free-space $redundancy -m};
216
217 my @f = split /,/, $fs[0];
218 my ($free_space, $total_space) = ($f[0], $f[1]);
219
220 $avail = $free_space*1024;
221 $total = $total_space*1024;
222 $used = $total - $avail;
223
224 };
225 if (my $err = $@) {
226 # ignore error,
227 # assume storage if offline
228
229 return undef;
230 }
231
232 return ($total, $avail, $used, 1);
233 }
bye,
rob