[DRBD-user] [RFC] DRBD9 - compat cleanup - everybody can help

2018-05-18 Thread Roland Kammerer
Dear users,

tl;tr: download, compile-test (& try) this release, which is 9.0.14 + 2
very noncritical cleanup patches.

we are currently cleaning up our compat code. This code is used to
ensure that the out-of-tree module builds against all kinds of kernels.

Over the years that collected code back to very very ancient kernels.
Time to clean that up a bit.

What happend:
- I compiled the latest release against all kernels where LINBIT
  provides support. These are *a lot*. Different distributions,
  different kernels.
- I collected the generated compat.hs and checked which defines are the
  same in all compat.hs.
- Deleted these checks, and adapted the code.

It would be great if you could compile the resulting code. Even compile
tests help. Extra points for loading/testing the resulting module. Maybe
not on Friday in production ;-). This is WIP and needs more careful
review.

So how far back is this expected to work: The oldest kernel we target
for DRBD9 is the one from RHEL6 (aka. 2.6.32 + hectoliters of RedHat
special sauce). So RHEL6 with 2.6.32 has to work, which does not mean it
compiles against a Linux upstream 2.6.32 tag).

What was compile tested is:
debian-jessie, debian-stretch, oracle7, rhel6, rhel7, sles11-sp4,
sles12, ubuntu-bionic, ubuntu-trusty, ubuntu-xenial, xenserver6,
xenserver7. With various kernels (e.g., from every RHEL dot-release) and
various flavours (like ubuntu AWS kernels).

Every feedback is welcome, mainly I'm interested in breakage of the
mentioned distributions/kernels, but not so much for
$specialsnowflakelinux.

http://packages.linbit.com/rckcompat/drbd-9.0.14-1.tar.gz

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


Re: [DRBD-user] primary reverts to secondary after reboot

2018-05-18 Thread Veit Wahlich
Hi Nico,

if you want DRBD to promote one node automatically at boot-up, your
resource file(s) will need a startup{} section featuring a
become-primary-on statement.

If your setup is not yet in production, you might consider using single
DRBD ressources per VM instead of a replicated filesystem, so you could
live-migrate VMs between the hosts and let libvirt promote/demote the
ressource when the VM is powered on/off using a handler script.
You do not need a permanent dual-primary configuration for this, but
only during live migration and only for the ressource of the VM being
currently migrated.

Best regards,
// Veit


Am Mittwoch, den 16.05.2018, 10:20 +0200 schrieb Nico De Ranter:
> 
> 
> Hi all,
> 
> 
> I'm trying to create a simple setup containing 2 servers.  One server
> has a filesystem on /dev/drbd0 mounted as /var/lib/libvirt/. The drbd
> disk is synchronised to a second 'passive' server.  If something goes
> wrong with the primary a script should be run manually on the
> secondary to promote it to primary and restart all VM's.  I do not
> intend this to be automatic.
> 
> 
> The initial configuration seems to run fine until I reboot the primary
> server.  After the primary reboots the drbd0 resource is set to
> Secondary/Secondary. I need to manually promote it back to Primary and
> restart all my services.  
> 
> cat /proc/drbd 
> version: 8.4.5 (api:1/proto:86-101)
> srcversion: 4B3E2E2CD48CAE5280B5205 
>  0: cs:Connected ro:Secondary/Secondary ds:UpToDate/UpToDate C r-
> ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
> 
> 
> How can I prevent this from happening?  I want my primary to remain
> primary until I manually promote the secondary in which case the
> original primary is considered dead and will be wiped.
> 
> content of /etc/drbd.d/test.res
> resource r0 {
> protocol C;
> startup {
> wfc-timeout  15;
> degr-wfc-timeout 60;
> }
> syncer {
> rate 200M;
> al-extents 1801;
> }
> net {
> cram-hmac-alg sha1;
> shared-secret "somesillypassword";
> max-buffers8000;
> max-epoch-size8000;
> }
> on core1-spc {
> address 10.0.0.1:7788;
> device /dev/drbd0;
> disk /dev/md3;
> meta-disk internal;
> }
> on core2-spc {
> address 10.0.0.2:7788;
> device /dev/drbd0;
> disk /dev/md3;
> meta-disk internal;
> }
> } 
> 
> 
> content of /etc/fstab
> ...
> /dev/drbd0/var/lib/libvirtext4 defaults,_netdev
> 0   0
> 
> 
> 
> 
> 
> -- 
> 
> Nico De Ranter
> Operations Engineer
> 
> T. +32 16 38 72 10
> 
> 
> 
> 
> 
> 
> eSATURNUS
> Romeinse straat 12
> 3001 Leuven – Belgium
> 
> 
> T. +32 16 40 12 82
> F. +32 16 40 84 77
> www.esaturnus.com
> 
> 
> 
> For Service & Support 
> 
> Support Line: +32 16 387210 or via email : supp...@esaturnus.com
> 
>  
> 
> 
> 
> 
> ___
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


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