[DRBD-user] DRBD over an existing filesystem

Philipp Reisner philipp.reisner at linbit.com
Mon Mar 29 18:16:50 CEST 2004

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


Am Freitag, 26. März 2004 15:56 schrieb Lars Ellenberg:
> / 2004-03-26 15:23:14 +0100
>
> \ Philipp Reisner:
> > Maybe there is something wrong with -pre5's read_gc.pl, or
> > the metadata handling in -pre5. I will release -pre6 over
> > the weekend.
>
> Ok.
> With CVS at least, read_gc.pl is just fine,
> and the suggested approach WorksForMe ...
>

Hmmm, I just realized that it read_gc/write_gc did not handle
the case of external metadata at all. -> Fixed this.

>  From looking at the code in drbd_fs.c,
> It still is impossible to *grow* the size if I have a la_size,
> and I am not connected. This is ok, since it prevents the unwary from
> shooting themselves.
> BUT, this is at least a usability bug, if one cannot override ...
>

Hmmm, actually I like it. It is makes it impossible to do something
stupid, and it is event not possible to override it :)

You opt for a "--I-know-what-I-do" switch to allow growing while
disconnected ? Or "--Yes-I-want-to-grow-it-while-disconnected"
Right ?

> And, please initialize to default values uppon "drbdsetup down" !
>
> Why?
>
>  # wipeout metadata
>  # read_gc.pl
>
>  > state file corrupt at ./read_gc.pl line 39.
>
>  # load drbd module
>  # read_gc.pl
>
>  > state file corrupt at ./read_gc.pl line 39.
>
>  # drbdadm attach all
>  # read_gc.pl
>
>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n |      0 KB

Ok so far...
>
>  # drbdsetup /dev/nb0 resize -d $[512-128]M
>  # read_gc.pl
>
>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n | 393216 KB
>

Aha. if la_size is 0 we allow the user to grow the device ;) 
Hm.. 

>  # drbdsetup /dev/nb0 resize -d 1
>  # read_gc.pl
>

shrinking. ok. 

>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n |      1 KB
>
>  # drbdsetup /dev/nb0 resize -d 370M
>  # read_gc.pl
>

no growing allowed...

>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n |      1 KB
>
>  # drbdadm down all
>  # wipeout metadata
>  # read_gc.pl
>
>  > state file corrupt at ./read_gc.pl line 39.
>
>  # drbdadm attach all
>  # read_gc.pl
>
>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n |      1 KB
>
>  doh!
>  so the -> la_size member survived the down, and now pollutes metadata
>  of a completely unrelated device!
>

Ahhh, now I understand. You mean that we should inizialize the
mdev->la_size at a detach operation.... Right! 
 [ The first 3 times I read the mail, I though you ment that it should
   be whiped out from the meta-data. ]

>  # drbdadm down all
>  # wipeout metadata
>  # unload module
>  # reload module
>  # drbdadm attach all
>  # read_gc.pl
>
>  >      r0 | 1/c |   1 |   1 |   1 |   1 | 0/s | 0/n |      0 KB
>

Would it make sense to allow the user to shrink the device to 0.
Then it would be possible to grow it in a 2 step process.

Would be easier, but the switch is probabely the sane way...


-Philipp
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :



More information about the drbd-user mailing list