drbd on centos 6

General support questions
Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/25 18:30:03

I want load my drbd module, with "modprode drbd" but when I run it, I have this error :

[code] FATAL: Error inserting drbd (/lib/modules/2.6.32-279.1.1.el6.i686/weak-updates/drbd83/drbd.ko): Cannot allocate memory[/code]

and in /var/log/messages, I have :

[code] Jul 23 07:48:06 cluster1 kernel: drbd: module cleanup done.
Jul 23 07:48:06 cluster1 kernel: drbd: ran out of memory
Jul 23 07:48:15 cluster1 kernel: drbd: module cleanup done.
Jul 23 07:48:15 cluster1 kernel: drbd: ran out of memory
Jul 23 07:49:54 cluster1 kernel: drbd: module cleanup done.
Jul 23 07:49:54 cluster1 kernel: drbd: ran out of memory
Jul 23 07:51:01 cluster1 kernel: drbd: module cleanup done.
Jul 23 07:51:01 cluster1 kernel: drbd: ran out of memory [/code]

I'm not understand,

[code]
Mem: 1030796k total, 101440k used,
Swap: 2064376k total, 0k used,[/code]

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drbd on centos 6

Post by TrevorH » 2012/07/25 19:35:23

I've never seen that error message before. Can you post your DRBD configuration files here please? Also run

[code]
grep -i drbd /etc/modprobe.d/*
grep -i drbd /etc/modprobe.conf
[/code]

I am suspecting that your next step will be to post all this information on the DRBD mailing list since it looks like one for the real experts.

Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/25 19:35:30

You know what.... I'm really SO *********!!!!

I do "modprode drbd" before "drbdadm create-md my_ressource".....

[code] .......drbd.ko): Cannot allocate memory[/code] really strange...hahahhaa

Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/25 20:08:19

Why in all tutorial, I see in the ressource configure file a device name "/dev/drbd0"?

So I make my configuration why there tutorial, but I didn't find one device named like that.. Maybe my question is really stupid, but I want understand why they used it.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drbd on centos 6

Post by TrevorH » 2012/07/25 20:17:47

Because that's what DRBD devices are called? /dev/drbd0 - 255 are the names they are assigned.

Post your config files if you are still having problems.

Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/25 20:31:34

Uhm...

I just want used an new device named /dev/sdb. I formated it so I have one partition named /dev/sbd1. and /dev/sda is my system partition.

[code] Disque /dev/sda: 21.5 Go, 21474836480 octets
255 têtes, 63 secteurs/piste, 2610 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x0002a211

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 64 512000 83 Linux
La partition 1 ne se termine pas sur une frontière de cylindre.
/dev/sda2 64 2611 20458496 8e Linux LVM

Disque /dev/sdb: 21.5 Go, 21474836480 octets
255 têtes, 63 secteurs/piste, 2610 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x7fe9112d

Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 1 2610 20964793+ 8e Linux LVM

[/code]

So I didn't understrand why they used the mention "device /dev/drbd0"

My configuration file is
[code]resource r0 {

on cluster1 {
device /dev/drbd0;
disk /dev/sdb1;
address XXX.XXX.XXX.XXX:7788;
meta-disk internal;
}

on cluster2 {
device /dev/drbd0;
disk /dev/sdb1;
address XXX.XXX.XXX.XXX:7788;
meta-disk internal;
}
}
[/code]

And maybe it's the reason of my error.... "......Cannot allocate memory"

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drbd on centos 6

Post by TrevorH » 2012/07/25 21:17:07

I've no idea if it is the source of your error but you name /dev/sdb1 in the configs on both systems but the fdisk output you show has /dev/sdb1 tagged as type 0x83 (LVM). If you've created a physical volume on this partition using pvcreate then it will already be in use and not be available to DRBD. If you haven't run pvcreate on it then don't do so, it won't be the source of the problem in that case.

Do you also have a drbd config containing the common stuff like syncer, protocol, common, global etc?

Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/26 05:45:51

Yeah sure, he is on drbd.d/global....
I have incluse my ressource file in drbd.conf

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drbd on centos 6

Post by TrevorH » 2012/07/26 08:17:52

It's like extracting blood from a stone!

How about sharing it then? If you don't post it then no-one else can see it and work out if there's a problem with it!

Jonas
Posts: 67
Joined: 2012/02/01 12:45:23
Location: France, Rouen

Re: drbd on centos 6

Post by Jonas » 2012/07/26 08:29:59

I removed my older device (/dev/sdb1) and I add new one device (not formated.)
fdisk -l show :
[code]Disque /dev/sda: 21.5 Go, 21474836480 octets
255 têtes, 63 secteurs/piste, 2610 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x0002a211

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 64 512000 83 Linux
La partition 1 ne se termine pas sur une frontière de cylindre.
/dev/sda2 64 2611 20458496 8e Linux LVM

Disque /dev/sdb: 21.5 Go, 21474836480 octets
255 têtes, 63 secteurs/piste, 2610 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x00000000 [/code]

I do "drbdadm create-md r0", the result is
[code] --== Thank you for participating in the global usage survey ==--
The server's response is:

Writing meta data...
initializing activity log
NOT initialized bitmap
New drbd meta data block successfully created.
[/code]

Well it's great, but I can't do "/etc/init.d/drbd start or I can't load my module.(modprode drbd)
I have already an error like that.
[code]FATAL: Error inserting drbd (/lib/modules/2.6.32-279.1.1.el6.i686/weak-updates/drbd83/drbd.ko): Cannot allocate memory
[/code]

Did I make something wrong?

Post Reply