[DRBD-user] Size issues with new drbd device

Chris Miller drbd at scratchspace.com
Fri Sep 12 19:17:45 CEST 2008

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


Lars Ellenberg wrote:

> do
>  cat /proc/partitions
>  lvs  --units k -o name,vg_name,kernel_major,kernel_minor,size
> and, please do NOT use --units K.
> but --units k.
> see man lvs.
> 
> also, do
>  tune2fs -l /dev/drbd0  |
> 	awk -F: '/^Block count:/ { bc = $2; };
> 		/^Block size:/ { bz = $2; };
> 	END { print bc, bz ; print bc*bz/1024 }'

[root at ha2 ~]# cat /proc/partitions
major minor  #blocks  name

   8     0  732410880 sda
   8     1     200781 sda1
   8     2  732202537 sda2
 253     0   40960000 dm-0
 253     1  690716672 dm-1
 253     2     524288 dm-2
 147     0  690662788 drbd0

[root at ha2 ~]# lvs  --units k -o
name,vg_name,kernel_major,kernel_minor,size
  LV       VG         KMaj KMin LSize
  LogVol00 VolGroup00 253  0     40960000.00K
  LogVol01 VolGroup00 253  2       524288.00K
  LogVol02 VolGroup00 253  1    690716672.00K

[root at ha2 ~]# tune2fs -l /dev/drbd0  | awk -F: '/^Block count:/ { bc
= $2; }; /^Block size:/ { bz = $2; }; END { print bc, bz ; print
bc*bz/1024 }'

              172665697                4096
690662788

>> or is this just a GB/GiB thing?.
> 690662788 / 1024 / 1024 == 658
> so, yes, this latter thing aparently is a GB GiB thing,
> as the size given in drbd.conf is GiB.

So I should have put 658G in drbd.conf?

Aside from that, my impression was this declaration was not "required".

> my guess is that you did NOT do mkfs.ext3 /dev/drbd0,
> but you did mkfs.ext3 /dev/mapper/VolGroup00-LogVol02.

I did that the very first time I used DRBD about 4 years ago and
learned the associated lesson ;-). This time I *did* run "mkfs.ext3
/dev/drbd0" and checked my history to be sure.

So given the above output, where does this leave us? Is everything
configured correctly, or is there some other problem?

Thanks again for your help Lars!

Chris



More information about the drbd-user mailing list