[DRBD-user] 2nd try of reducing size...

Christian Völker cvoelker at knebb.de
Mon May 28 21:31:32 CEST 2012

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi Arnold,



>
> Should be as far as I can tell from the distance. Be sure to include the
> metadata-overhead in your resize-calculations. And make sure the backup is
> fine.
Well, I did. I reduced the ext3 to 1,400GB. The drbd device to 1,450GB
and the LV to 1,550GB
50GB added for additional data should be fine.

But see what's happened:
 
[e2fsck was run before including read-only test of all blocks without
errors!]

[root at backuppc ~]# lvdisplay -m /dev/vg1/drbdvol
  --- Logical volume ---
  LV Name                /dev/vg1/drbdvol
  VG Name                vg1
  LV UUID                19LHxy-MKqX-4DY1-c20W-cPti-O7FK-1spSZh
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                2.00 TB
  Current LE             32767
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Segments ---
  Logical extent 0 to 32766:
    Type                linear
    Physical volume     /dev/sdb1
    Physical extents    0 to 32766


[root at backuppc ~]# lvreduce /dev/vg1/drbdvol -L 1550G
  WARNING: Reducing active and open logical volume to 1.51 TB
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce drbdvol? [y/n]: y
  Reducing logical volume drbdvol to 1.51 TB
  Logical volume drbdvol successfully resized
[root at backuppc ~]# cat /proc/drbd
version: 8.3.13 (api:88/proto:86-96)
GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by
mockbuild at builder10.centos.org, 2012-05-07 11:56:58
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate A r-----
    ns:2147353276 nr:0 dw:744 dr:1997616262 al:954723 bm:150729 lo:1
pe:0 ua:0 ap:1 ep:1 wo:b oos:0
 1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate A r-----
    ns:1086233284 nr:0 dw:352252520 dr:734014853 al:53963 bm:44799 lo:0
pe:0 ua:0 ap:0 ep:1 wo:b oos:0

So far everything seems to run pretty fine. Then I started the e2fsck
incl. the read-only test for all blocks.

Some minutes after the start drbd failed:

[root at backuppc ~]# cat /proc/drbd
version: 8.3.13 (api:88/proto:86-96)
GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by
mockbuild at builder10.centos.org, 2012-05-07 11:56:58
 0: cs:Connected ro:Primary/Secondary ds:Diskless/UpToDate A r-----
    ns:2147353280 nr:314516 dw:744 dr:1997676362 al:954724 bm:150729
lo:0 pe:1 ua:0 ap:1 ep:1 wo:b oos:0
 1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate A r-----
    ns:1086233284 nr:0 dw:352252520 dr:734014853 al:53963 bm:44799 lo:0
pe:0 ua:0 ap:0 ep:1 wo:b oos:0

May 28 21:07:51 backuppc kernel: block drbd0: drbd_bm_resize called with
capacity == 3040870400
May 28 21:07:51 backuppc kernel: block drbd0: resync bitmap:
bits=380108800 words=11878400 pages=11600
May 28 21:07:51 backuppc kernel: block drbd0: size = 1450 GB (1520435200 KB)
May 28 21:07:51 backuppc kernel: block drbd0: Writing the whole bitmap,
size changed
May 28 21:07:51 backuppc kernel: block drbd0: bitmap WRITE of 0 pages
took 0 jiffies
May 28 21:07:51 backuppc kernel: block drbd0: 0 KB (0 bits) marked
out-of-sync by on disk bit-map.
May 28 21:08:09 backuppc kernel: kjournald starting.  Commit interval 5
seconds
May 28 21:08:09 backuppc kernel: EXT3 FS on drbd0, internal journal
May 28 21:08:09 backuppc kernel: EXT3-fs: mounted filesystem with
journal data mode.
May 28 21:09:39 backuppc kernel: attempt to access beyond end of device
May 28 21:09:39 backuppc kernel: dm-0: rw=17, want=4294836155,
limit=3250585600
May 28 21:09:39 backuppc kernel: block drbd0:
drbd_md_sync_page_io(,4294836154s,WRITE) failed!
May 28 21:09:39 backuppc kernel: block drbd0: disk( UpToDate -> Failed )
May 28 21:09:39 backuppc kernel: block drbd0: Local IO failed in
w_al_write_transaction. Detaching...
May 28 21:09:39 backuppc kernel: block drbd0: receiver updated UUIDs to
effective data uuid: 96C335C60E438B20
May 28 21:09:39 backuppc kernel: block drbd0: disk( Failed -> Diskless )
May 28 21:09:39 backuppc kernel: block drbd0: Should have called
drbd_al_complete_io(, 12360), but my Disk seems to have failed :(
May 28 21:20:08 backuppc kernel: block drbd0: disk( Diskless -> Attaching )
May 28 21:20:08 backuppc kernel: block drbd0: Error while reading
metadata, magic not found.
May 28 21:20:08 backuppc kernel: block drbd0: disk( Attaching -> Failed )
May 28 21:20:08 backuppc kernel: block drbd0: disk( Failed -> Diskless )

So we see I've resized the drbd device to 1,450GB. The lv to 1,550. But
it still says: "access beyond end of device" :-(

This time I was prepared and didn't reduce the secondary's device. As
soon as I got the "diskless" state I extended the lv for another 100G
and now it's syncing...

May I assume the understanding of the "G" parameter is different between
drbd and lvm? 1,024 vs. 1,000?

Greetings

Christian



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAk/D0pQACgkQ0XNIYlAXmzuetgCguMtVLbSrEbtHxnSemKyw1TJL
MhIAoK0gfrslxIhdCO/o82an+0f5XRaT
=4n1D
-----END PGP SIGNATURE-----




More information about the drbd-user mailing list