#1  
Old 6th October 2007, 01:36
SoftDux SoftDux is offline
Member
 
Join Date: Oct 2006
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default RAID-1 + LVM + drbd?

Hi all

I'm new to drbd, and would like to implement it on a machine which has RAID-1 & LVM running, but don't seem to understand the concept very clearly. Can someone please point me into the right direction? The problem I'm having, is that the data on the one PC doesn't sync on the other PC.

Code:
backup2:~ # cat /proc/drbd
version: 0.7.22 (api:79/proto:74)
SVN Revision: 2554 build by lmb@dale, 2006-10-30 22:52:11
 0: cs:Connected st:Secondary/Secondary ld:Inconsistent
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0

My setup is as follows:
I have 2 PC's, each with 2x 160GB SATA II HDD's
Then I have setup software RAID-1 on each, and LVM on top of it, as follows:

Code:
/dev/sda                 │    149.0 GB    │   │MAXTOR-STM316021    │                │                      │              │
/dev/sda1               │    101.9 MB    |    │Linux RAID                        │                │md0               │              │
/dev/sda2               │      2.0 GB      │   │Linux swap                         │swap        │                      │              │
/dev/sda3               │    146.9 GB    │   │Linux RAID                        │                │md1               │              │
/dev/sdb                 │    149.0 GB    │   │MAXTOR-STM316021    │                │                      │              │
/dev/sdb1               │    101.9 MB   │   │Linux RAID                        │                │md0               │              │
/dev/sdb2               │      2.0 GB       |    │Linux swap                         │swap        │                      │              │
/dev/sdb3               │    146.9 GB    │   │Linux RAID                        │                │md1               │              │
/dev/md0                │    101.8 MB    |    │MD Raid                            │/boot        │                      │              │
/dev/md1                 |    146.9 GB     │   │MD Raid                            │                │LVM system  │              │
/dev/system             │    146.9 GB    │   │LVM2 system                    │                │                      │              │
/dev/system/home    │     80.0 GB     │   │LV                                     │/home       |                       │              │
/dev/system/opt       │     20.0 GB     │   │LV                                     │/opt           |                      │              │
/dev/system/root      │     10.0 GB     │   │LV                                     │/              │                      │              │
/dev/system/share    │     36.9 GB     │   │LV                                      |/share *    │                      │               |
This is my /etc/drbd.conf file:
Code:
resource r0 {
  protocol C;
#  incon-degr-cmd "halt -f";
  incon-degr-cmd "echo 'DRBD: primary requested but inconsistent!' | wall; sleep 3000";
#  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60";

  startup { wfc-timeout 0; degr-wfc-timeout     120; }
#  disk { on-io-error detach; } # or panic, ...
  syncer {
     group 0;
     rate 600M;
  }


  on backup1 {
     device /dev/drbd0;
     disk /dev/mapper/system-share;
     meta-disk internal;
     address 192.168.1.11:7788;
  }
  on backup2 {
     device /dev/drbd0;
     disk /dev/mapper/system-share;
     meta-disk internal;
     address 192.168.1.12:7788;
        }
}
Reply With Quote
Sponsored Links
  #2  
Old 9th October 2007, 08:47
SoftDux SoftDux is offline
Member
 
Join Date: Oct 2006
Posts: 35
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Doesn't anyone know ?
Reply With Quote
  #3  
Old 8th March 2008, 09:48
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
 
Default

I know this is late and you've either solved it or moved onto another idea so this is for others benefits.

the reason is that your in secondary/secondary mode.. there is no primary for a secondary to copy from.
0: cs:Connected st:Secondary/Secondary ld:Inconsistent

You need to set at least 1 of the nodes to primary

on the (to be) primary node :
drbdadm disconnect all
drbdadm invalidate-remote all
drbdadm primary all
drbdadm connect all

on the other (secondary) node :
drbdadm disconnect all
drbdadm invalidate all
drbdadm connect all

after this, cat your /proc/drbd and you should see something like this :
PHP Code:
primary:~# cat /proc/drbd
0cs:SyncSource st:Primary/Secondary ld:Consistent
    ns
:24768676 nr:0 dw:537576684 dr:315968437 al:34170 bm:1852 lo:0 pe:0 ua:0 ap:0
        
[=======>............] synced37.5% (39870/63773)M
        finish
1:04:55 speed10,476 (9,448K/sec 
__________________
www.emperor-it.com for ISPConfig mods/hacks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
debian, lvm, raid, grub, custom kernel koi Installation/Configuration 4 3rd November 2007 10:39
On: Recover Data From RAID1 LVM Partitions With Knoppix Linux LiveCD saracen HOWTO-Related Questions 1 11th May 2007 09:57
Gentoo Cluster using heartbeat and drbd problem nekromancer Server Operation 1 30th November 2006 09:16
SATA Software RAID 1 on Linux mphayesuk Installation/Configuration 2 21st February 2006 11:31
Xen: Smp & Lvm zokahn HOWTO-Related Questions 5 27th January 2006 10:28


All times are GMT +2. The time now is 01:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.