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

2017-10-18 Thread Roland Kammerer
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
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


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

2017-10-17 Thread Roberto Resoli
Il 17/10/2017 16:25, Robert Altnoeder ha scritto:
> On 2017/10/17 3:19 PM, Roberto Resoli wrote:
>> but the second [editor's note] 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.
> Actually, rather an approximate value than the correct one.

yes

> The value reported as free space for the specified redundancy takes meta
> data into account, using the currently configured maximum peers value.
> It is supposed to be the maximum size of a single volume that can be
> created with the specified redundancy, but even this value is only
> half-way correct. E.g., creating two volumes with half the size each
> would still fail due to fixed meta data overhead per volume.
> 
> That being said, what is or is not a correct value is mostly a question
> of interpretation.

Ok, thanks for the explanation.

> It would possibly make more sense to simply query free-space for the
> currently configured redundancy and report free space as total space in
> the Proxmox GUI.

Do you mean to display free space only? I do not know if this is
feasible; in pve GUI interface (and even more in command line one, see
"pvesm" ) Total, Used and Available space are clearly specified.

rob
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


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

2017-10-17 Thread Robert Altnoeder

On 2017/10/17 3:19 PM, Roberto Resoli wrote:

but the second [editor's note] 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.

Actually, rather an approximate value than the correct one.

The value reported as free space for the specified redundancy takes meta 
data into account, using the currently configured maximum peers value. 
It is supposed to be the maximum size of a single volume that can be 
created with the specified redundancy, but even this value is only 
half-way correct. E.g., creating two volumes with half the size each 
would still fail due to fixed meta data overhead per volume.


That being said, what is or is not a correct value is mostly a question 
of interpretation.


It would possibly make more sense to simply query free-space for the 
currently configured redundancy and report free space as total space in 
the Proxmox GUI.


br,
Robert

___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


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

2017-10-17 Thread Roberto Resoli
Il 17/10/2017 15:19, Roberto Resoli ha scritto:
> 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",

Sorry, it is the second number; for instance:

# drbdmanage free-space 3 -m
643182372,5032497152
Operation completed successfully

or, as human-readable:

# drbdmanage free-space 3
The maximum size for a 3x redundant volume is 643182372 kiB
(Aggregate cluster storage size: 5032497152 kiB)
Operation completed successfully

bye,
rob






___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user