[DRBD-user] drbdmanage-proxmox reports wrong total size for drbd storage

Roland Kammerer roland.kammerer at linbit.com
Wed Oct 18 10:46:45 CEST 2017

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Tue, Oct 17, 2017 at 03:19:32PM +0200, Roberto Resoli wrote:
> 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).

Ok, from the second mail we talk about the second value, good.

> 
> It should be divided by $redundancy in order to obtain the correct value.

I don't see how this makes anything better, because, what you say is
basically this:

> 
> =========
> 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;

$total = total_space*1024/$redundancy;

> 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 }

So, what would that mean? Let's assume you have 3 drbdmanage nodes, a
redundancy of 2, and storage sizes of 2, 10, 100GB.

In sum you have 112/2 = 56GB. That is then your "total". Does not
make (more) sense to me.

With what we have, the values have the following meaning:
total: The total in the cluster. Why not? Where does that cause
problems?
avail: The maximum for the given redundancy. Should be fine. If not, why
not and where does it cause problems?
used: The difference. Read it as "used", meaning not usable for you. IMO
also fine. If not, why not, where does it cause problems?

Regards, rck



More information about the drbd-user mailing list