Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DRBD: Users

size in drbd.conf and size of drbd0 should be the same?

 

 

DRBD users RSS feed   Index | Next | Previous | View Threaded


linux at vfemail

Aug 27, 2008, 12:49 AM

Post #1 of 11 (452 views)
Permalink
size in drbd.conf and size of drbd0 should be the same?

Hello all,

I have drbd-8.2.6 working on dual-primary configuration, mirroring /dev/hdb1
from shd1 with /dev/hdc1 from shd2 using internal metadata setup.

hdb on shd1 have 40GB total capacity with 2 slices (hdb1, hdb2), each slice
20GB
hdc on shd2 have 80GB total capacity with 2 slices (hdc1, hdc2), each slice
40GB

How can i see /dev/drbd0 size? Which command should i use?

fdisk is reporting 19.3GB for /dev/drbd0 but in drbd.conf i configured a
smaller size for it (18GB). Is this normal?

[root[at]shd1 ~]# fdisk -l /dev/drbd0
Disk /dev/drbd0: 19.3 GB, 19327352832 bytes
[root[at]shd1 ~]#

[root[at]shd2 ~]# fdisk -l /dev/drbd0
Disk /dev/drbd0: 19.3 GB, 19327352832 bytes
[root[at]shd2 ~]#

On booth machines, in drbd.conf i have:

disk {
on-io-error detach;
size 18G;
}

on shd1 {
device /dev/drbd0;
disk /dev/hdb1;
address 192.168.113.6:7789;
meta-disk internal;
}

on shd2 {
device /dev/drbd0;
disk /dev/hdc1;
address 192.168.113.7:7789;
meta-disk internal;
}

Questions:
1. which size is correct for drbd0 device: 18GB or 19.3GB?
2. which directive is valid to be used inside disk {} section of drbd.conf:
"size" or "disk-size"?

Regards,
Alx
_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


norbert at tretkowski

Aug 27, 2008, 6:55 AM

Post #2 of 11 (426 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

Am Wed, 27 Aug 2008 10:49:03 +0300 schrieb Alex:
> fdisk is reporting 19.3GB for /dev/drbd0 but in drbd.conf i configured a
> smaller size for it (18GB). Is this normal?

Yes.

18*1024*1024*1024 -> 19327352832

Norbert

_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


cshobe at bepress

Aug 27, 2008, 6:03 PM

Post #3 of 11 (424 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Aug 27, 2008, at 12:49 AM, Alex wrote:
> On both machines, in drbd.conf i have:
>
> disk {
> on-io-error detach;
> size 18G;
> }
[...]
> Questions:
> 1. which size is correct for drbd0 device: 18GB or 19.3GB?
> 2. which directive is valid to be used inside disk {} section of
> drbd.conf:
> "size" or "disk-size"?

Why use either one? It works fine without them. I don't even see
either one of these in man 5 drbd.conf...

Cheers,
--
Casey Allen Shobe
Database Architect, The Berkeley Electronic Press
cshobe[at]bepress.com (email/jabber/aim/msn)
http://www.bepress.com | +1 (510) 665-1200 x163

_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


linux at vfemail

Aug 28, 2008, 1:25 AM

Post #4 of 11 (418 views)
Permalink
Re: Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Wednesday 27 August 2008 16:55, Norbert Tretkowski wrote:
> Am Wed, 27 Aug 2008 10:49:03 +0300 schrieb Alex:
> > fdisk is reporting 19.3GB for /dev/drbd0 but in drbd.conf i configured a
> > smaller size for it (18GB). Is this normal?
>
> Yes.
>
> 18*1024*1024*1024 -> 19327352832
>
> Norbert

No, that's not correct: 19327352832 != 19.3GB!

19327352832 bytes mean all the time 18GB, not 19.3GB.

So, which is the correct size of /dev/drbd0? How can i display it? Why this
discrepancy between size specified in drbd.conf and the one reported by
fdisk?

Regards,
Alx
_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


linux at vfemail

Aug 28, 2008, 1:57 AM

Post #5 of 11 (418 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Thursday 28 August 2008 04:03, you wrote:
> On Aug 27, 2008, at 12:49 AM, Alex wrote:
> > On both machines, in drbd.conf i have:
> >
> > disk {
> > on-io-error detach;
> > size 18G;
> > }
>
> [...]
>
> > Questions:
> > 1. which size is correct for drbd0 device: 18GB or 19.3GB?
> > 2. which directive is valid to be used inside disk {} section of
> > drbd.conf:
> > "size" or "disk-size"?
>
> Why use either one? It works fine without them. I don't even see
> either one of these in man 5 drbd.conf...
>

Is on drbd documentation:
http://www.drbd.org/users-guide/re-drbdconf.html

[snip]
disk

This section is used to fine tune DRBD's properties in respect to the low
level storage. Please refer to drbdsetup(8) for detailed description of the
parameters.

Optional parameter: on-io-error, size, ...
[end snip]

And i am using it to have better control over drbd devices. I am running LVM
on top of drbd0 and GFS on top of LVM. GFS does not support shrinking. In any
scenario, I don't want to be suprissed when i'm replacing disks and drbd are
resizing drbd0 on the fly. GFS could be corrupted. Even if disks (raid5 or
raid6 arrays) will be the same in size, this is not a must to be identical.
So, shortly, i don't want to give permission to drbd to adjust the size on
the fly (to avoid shrinking). I want to have full controll regarding drbd
size and all the time i am setting it in drbd.conf with 5-10% less then
minimum available hardware size available on our nodes.

And my question comes naturally, because i want to be sure that i am using the
correct syntax. Probably, "size" directive is the correct one to be used in
newer drbd versions and "disk-size" syntax is deprecated (has been used on
old drbd implementations).

Can somebody clarify this aspect?

Regards,
Alx


_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


cshobe at bepress

Aug 28, 2008, 11:21 AM

Post #6 of 11 (411 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Aug 28, 2008, at 1:57 AM, Alex wrote:
> And i am using it to have better control over drbd devices. I am
> running LVM
> on top of drbd0 and GFS on top of LVM. GFS does not support
> shrinking. In any
> scenario, I don't want to be suprissed when i'm replacing disks and
> drbd are
> resizing drbd0 on the fly. GFS could be corrupted. Even if disks
> (raid5 or
> raid6 arrays) will be the same in size, this is not a must to be
> identical.
> So, shortly, i don't want to give permission to drbd to adjust the
> size on
> the fly (to avoid shrinking). I want to have full controll regarding
> drbd
> size and all the time i am setting it in drbd.conf with 5-10% less
> then
> minimum available hardware size available on our nodes.

That doesn't really make sense. DRBD does not magically try to shrink
your filesystems on the fly. I belive the place to set the size 5-10%
lower than hardware is at the first level above the hardware - below
LVM even - just set the LVM partition in fdisk to be 5-10% less than
available and that's all you should have to worry about. Then you can
forget about the size directive.

> And my question comes naturally, because i want to be sure that i am
> using the
> correct syntax. Probably, "size" directive is the correct one to be
> used in
> newer drbd versions and "disk-size" syntax is deprecated (has been
> used on
> old drbd implementations).
>
> Can somebody clarify this aspect?

According to the documentation you just sent a link to, size should
exist within a disk section if used at all. Though I see reference to
it in the disk section, there is no documentation of it otherwise. So
I'm really curious how you're deducing that this will give you some
control that is not documented anywhere - are you just guessing or is
this discussed elsewhere I haven't seen?

Cheers,
--
Casey Allen Shobe
Database Architect, The Berkeley Electronic Press
cshobe[at]bepress.com (email/jabber/aim/msn)
http://www.bepress.com | +1 (510) 665-1200 x163

_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


linux at vfemail

Aug 29, 2008, 12:22 AM

Post #7 of 11 (409 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

> That doesn't really make sense.

What will be..... if you, before post, will try to read $subject of this
thread and drbd FAQ (http://www.linux-ha.org/DRBD/FAQ). Does this really make
sense for you?

> DRBD does not magically try to shrink

This is offtopic in this thread. Before to post here the 3rd offtopic reply,
please open another thread for that.

Our topic here is: WHY SIZE in drbd.conf and size of /dev/drbd0 are different
and which size is correct: the one in drbd.conf 18GB or the one reported by
fdisk: 19.3GB? Why we have this difference? How can i display the correct
size of /dev/drvd0... Which command? Is more then evident that 18GB will
never be equals with 19.3GB! Does this make sense for you?

Regards,
Alx
_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Matthias.Boettcher at evh

Aug 29, 2008, 3:49 AM

Post #8 of 11 (409 views)
Permalink
RE: size in drbd.conf and size of drbd0 should be the same? [In reply to]

> -----Original Message-----
> From: Alex <linux[at]vfemail.net>
> Sent: Friday, August 29, 2008 9:22 AM
> To: <drbd-user[at]lists.linbit.com>
> Subject: Re: [DRBD-user] size in drbd.conf and size of drbd0 should be thesame?
>
[...]
>
> Our topic here is: WHY SIZE in drbd.conf and size of /dev/drbd0
> are different and which size is correct: the one in drbd.conf
> 18GB or the one reported by fdisk: 19.3GB?

Both are correct.

> Why we have this difference?

We haven't any difference.
Please take a look at the definitions of GB (gigabyte)
http://en.wikipedia.org/wiki/Gigabyte

drbd assumes: "1 gigabyte = 1024^3 bytes = 1,073,741,824 bytes"
and: "18 gigabytes = 18 * 1024^3 bytes = 19,327,352,832 bytes"

fdisk assumes: "1 gigabyte = 1,000,000,000 bytes"
and shows the size in gigabytes and (for clarification) in bytes:

> [root[at]shd1 ~]# fdisk -l /dev/drbd0
> Disk /dev/drbd0: 19.3 GB, 19327352832 bytes


> Regards,
> Alx

HTH
Matthias
_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


linux at vfemail

Aug 29, 2008, 6:39 AM

Post #9 of 11 (406 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Friday 29 August 2008 13:49, Böttcher, Matthias wrote:
> > -----Original Message-----
> > From: Alex <linux[at]vfemail.net>
> > Sent: Friday, August 29, 2008 9:22 AM
> > To: <drbd-user[at]lists.linbit.com>
> > Subject: Re: [DRBD-user] size in drbd.conf and size of drbd0 should be
> > thesame?
>
> [...]
>
> > Our topic here is: WHY SIZE in drbd.conf and size of /dev/drbd0
> > are different and which size is correct: the one in drbd.conf
> > 18GB or the one reported by fdisk: 19.3GB?
>
> Both are correct.
>
> > Why we have this difference?
>
> We haven't any difference.
> Please take a look at the definitions of GB (gigabyte)
> http://en.wikipedia.org/wiki/Gigabyte
>

Hi Mattias,

As is specifyed in link posted by you, since 1999, IEC recommends that this
unit (1024*1024*1024) should instead be called a gibibyte and to be
abbreviated GiB, to avoid confusions!

> drbd assumes: "1 gigabyte = 1024^3 bytes = 1,073,741,824 bytes"
> and: "18 gigabytes = 18 * 1024^3 bytes = 19,327,352,832 bytes"
>

... here we are talking about GiB...

> fdisk assumes: "1 gigabyte = 1,000,000,000 bytes"
>

... and here, about GB!

GiB != GB

So, at the end, is right to say that i created a fixed size of 18GiB and not a
18GB (which is wrong) in drbd.conf which is equivalent with 19.3GB size
reported by fdisk!

18GiB is always equivalent with 19.3GB!
18GB will never be equal or equivalent with 19.3GB!

Drbd documentation is wrong when talking about GB and not GiB ... Maybe is
better to be added a new question in DRBD FAQ pointing to $subj, in order
avoid future usage confussions!

Regards,
Alx
_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


norbert at tretkowski

Aug 29, 2008, 8:03 AM

Post #10 of 11 (406 views)
Permalink
Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

Am Thu, 28 Aug 2008 11:25:23 +0300 schrieb Alex:

> On Wednesday 27 August 2008 16:55, Norbert Tretkowski wrote:
>> Am Wed, 27 Aug 2008 10:49:03 +0300 schrieb Alex:
>> > fdisk is reporting 19.3GB for /dev/drbd0 but in drbd.conf i
>> > configured a smaller size for it (18GB). Is this normal?
>>
>> Yes.
>>
>> 18*1024*1024*1024 -> 19327352832
>
> No, that's not correct: 19327352832 != 19.3GB!

>From util-linux source:

/* With K=1024 we have `binary' megabytes, gigabytes, etc.
Some misguided hackers like that.
With K=1000 we have MB and GB that follow the standards
[SI, ATA, IEEE etc] and the disk manufacturers and the law. */
#define K 1000

Norbert

_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


linux at vfemail

Aug 29, 2008, 8:37 AM

Post #11 of 11 (403 views)
Permalink
Re: Re: size in drbd.conf and size of drbd0 should be the same? [In reply to]

On Friday 29 August 2008 18:03, Norbert Tretkowski wrote:
> Am Thu, 28 Aug 2008 11:25:23 +0300 schrieb Alex:
> > On Wednesday 27 August 2008 16:55, Norbert Tretkowski wrote:
> >> Am Wed, 27 Aug 2008 10:49:03 +0300 schrieb Alex:
> >> > fdisk is reporting 19.3GB for /dev/drbd0 but in drbd.conf i
> >> > configured a smaller size for it (18GB). Is this normal?
> >>
> >> Yes.
> >>
> >> 18*1024*1024*1024 -> 19327352832
> >
> > No, that's not correct: 19327352832 != 19.3GB!
> >
> >From util-linux source:
>
> /* With K=1024 we have `binary' megabytes, gigabytes, etc.
> Some misguided hackers like that.
> With K=1000 we have MB and GB that follow the standards
> [SI, ATA, IEEE etc] and the disk manufacturers and the law. */
> #define K 1000
>
> Norbert
>

You are right Norbert. From the first time you was right, and in my last post
i agree that... In fact, my confussion started when drbd has used in the
wrong way, the same abbreviation (GB) to express different measurement units
(GiB and GB), booth referring size... and i said: wow... how i possible that
2 shoes to be equal with 3 shoes... this is impossible...shoes are shoes all
the time... ;-)

Regards,
Alx


_______________________________________________
drbd-user mailing list
drbd-user[at]lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user

DRBD users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.