Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
2005/9/11, Lars Ellenberg <Lars.Ellenberg at linbit.com>: > > / 2005-09-11 15:52:29 +0800 > \ Longming Lee: > > I have installed DRBD-0.7.10 on AS3, ha1 & ha2. > > you want to use 0.7.13, in case you have SMP. > > > ha1 is the primary and there are many files in it. > > ha2 is the secondary, it will be replicated after I start up DRBD. > > > > I have checked that ha1 is primary and ha2 is secondary before I > > connected the cross link cable between them. All files in ha1 are > > gone after I connected this cable. I don't know what is going on. > > This isn't the first time I installed DRBD. I have done before and > > they were OK then. > > > > Which commands I can use to force data sync from ha1 to ha2 while these > > two ha1 & ha2 are connected firstly, and that can prevent me from > > this mistake? > > what do you mean by "gone"? where exactly have "all files" been before? DRBD is a very good software for HA, and replicated data automatically. I just recover host and DRBD will take care of HA, and I don't worry anything. To initialize DRBD first time, it will automatically sync data from primary to secondary. But sometimes it sync data from secondary to primary, if I made some procedures wrong while starting DRBD. I have installed DRBD for many times, and it works well. I knew I have did something wrong this time. Does DRBD provide some commands to sync data from primary to secondary manually? and make sure data to be replicated first to prevent mistakes done by person. ha1: /dev/sdb1 : there are many files in it before started DRBD. ha2: /dev/sda4 : did 'mkfs -t ext3 /dev/sda4' before started DRBD. I started both DRBD, and the DRBD sync data from ha2 /dev/sda4 to ha1 /dev/sdb1, and clean /dev/sda4 of ha1. I want to sync from ha1 to ha2. where is the drbd mounted? on ha1 { device /dev/drbd0; disk /dev/sdb1; address 192.168.0.192:7788 <http://192.168.0.192:7788>; meta-disk internal; } on ha2 { device /dev/drbd0; disk /dev/sda4; address 192.168.0.193:7788 <http://192.168.0.193:7788>; meta-disk internal; } do you have heartbeat configured? > did your actions interfere with heartbeat actions? I have heartbeat then. ---------------------- haresources -------------------------------------------- ha1 drbddisk::r0 Filesystem::/dev/drbd0::/raid::ext3 210.59.22.14<http://210.59.22.14> ha2 ---------------------- ha.cf <http://ha.cf>----------------------------------------- logfacility daemon # Log to syslog as facility "daemon" node ha1 ha2 # List our cluster members keepalive 1 # Send one heartbeat each second deadtime 10 # Declare nodes dead after 10 seconds bcast eth0 eth1 # Broadcast heartbeats on eth0 and eth1 interfaces ping 210.59.22.254 <http://210.59.22.254> # Ping our router to monitor ethernet connectivity auto_failback on # fail back to paul automatically respawn hacluster /usr/lib/heartbeat/ipfail # Failover on network failures # serial portname serial /dev/ttyS0 #baud rate for serial port baud 19200 ----------------------------------------------------------------------------------------------------------- > please provide some log messages from that event. > you should have something like > kernel: drbd0: drbd0_receiver [###]: cstate WFConnection --> > WFReportParams > kernel: drbd0: Handshake successful: DRBD Network Protocol version 74 > kernel: drbd0: Connection established. > kernel: drbd0: I am(P): 1:00000002:00000001:00000046:00000005:10 > kernel: drbd0: Peer(S): 1:00000002:00000001:00000045:00000005:01 > kernel: drbd0: drbd0_receiver [###]: cstate WFReportParams --> WFBitMapS > kernel: drbd0: Primary/Unknown --> Primary/Secondary > kernel: drbd0: drbd0_receiver [###]: cstate WFBitMapS --> SyncSource > kernel: drbd0: Resync started as SyncSource (need to sync ### KB [### bits > set]). Sep 10 14:19:56 ha1 kernel: drbd: initialised. Version: 0.7.10(api:77/proto:74) Sep 10 14:19:56 ha1 kernel: drbd: SVN Revision: 1743 build by root at baumeister, 2005-01-31 13:08:05 Sep 10 14:19:56 ha1 kernel: drbd: registered as block device major 147 Sep 10 14:19:56 ha1 kernel: drbd0: Creating state block Sep 10 14:19:56 ha1 kernel: drbd0: resync bitmap: bits=137184413 words=4287014 Sep 10 14:19:56 ha1 kernel: drbd0: size = 523 GB (548737652 KB) Sep 10 14:19:56 ha1 kernel: drbd0: Assuming that all blocks are out of sync (aka FullSync) Sep 10 14:20:07 ha1 kernel: drbd0: 548737652 KB now marked out-of-sync by on disk bit-map. Sep 10 14:20:07 ha1 kernel: drbd0: drbdsetup [2809]: cstate Unconfigured --> StandAlone Sep 10 14:20:07 ha1 kernel: drbd0: drbdsetup [2844]: cstate StandAlone --> Unconnected Sep 10 14:20:07 ha1 kernel: drbd0: drbd0_receiver [2845]: cstate Unconnected --> WFConnection Sep 10 14:20:59 ha1 kernel: drbd0: Secondary/Unknown --> Primary/Unknown Sep 10 14:23:02 ha1 kernel: drbd0: Primary/Unknown --> Secondary/Unknown Sep 10 14:23:45 ha1 kernel: drbd0: Secondary/Unknown --> Primary/Unknown Sep 10 14:24:58 ha1 kernel: drbd0: Handshake successful: DRBD Network Protocol version 74 Sep 10 14:24:58 ha1 kernel: drbd0: Connection established. Sep 10 14:24:58 ha1 kernel: drbd0: I am(P): 1:00000002:00000001:00000001:00000002:10 Sep 10 14:24:58 ha1 kernel: drbd0: Peer(S): 1:00000006:00000004:00000027:00000006:01 Sep 10 14:24:58 ha1 kernel: drbd0: Current Primary shall become sync TARGET! Aborting to prevent data corruption. Sep 10 14:24:58 ha1 kernel: drbd0: drbd0_receiver [2845]: cstate WFReportParams --> StandAlone Sep 10 14:24:58 ha1 kernel: drbd0: error receiving ReportParams, l: 72! Sep 10 14:24:58 ha1 kernel: drbd0: worker terminated Sep 10 14:24:58 ha1 kernel: drbd0: asender terminated Sep 10 14:24:58 ha1 kernel: drbd0: drbd0_receiver [2845]: cstate StandAlone --> StandAlone Sep 10 14:24:58 ha1 kernel: drbd0: Connection lost. Sep 10 14:24:58 ha1 kernel: drbd0: receiver terminated Sep 10 14:32:50 ha1 drbd: Starting DRBD resources: Sep 10 14:32:50 ha1 kernel: drbd: initialised. Version: 0.7.10(api:77/proto:74) Sep 10 14:32:50 ha1 kernel: drbd: SVN Revision: 1743 build by root at baumeister, 2005-01-31 13:08:05 Sep 10 14:32:50 ha1 kernel: drbd: registered as block device major 147 Sep 10 14:32:50 ha1 drbd: [ Sep 10 14:32:50 ha1 drbd: d0 Sep 10 14:32:50 ha1 kernel: drbd0: resync bitmap: bits=137184413 words=4287014 Sep 10 14:32:50 ha1 kernel: drbd0: size = 523 GB (548737652 KB) Sep 10 14:33:03 ha1 kernel: drbd0: 523 GB marked out-of-sync by on disk bit-map. Sep 10 14:33:03 ha1 kernel: drbd0: Found 6 transactions (324 active extents) in activity log. Sep 10 14:33:03 ha1 kernel: drbd0: drbdsetup [2573]: cstate Unconfigured --> StandAlone Sep 10 14:33:03 ha1 drbd: s0 Sep 10 14:33:03 ha1 kernel: drbd0: drbdsetup [2586]: cstate StandAlone --> Unconnected Sep 10 14:33:03 ha1 kernel: drbd0: drbd0_receiver [2587]: cstate Unconnected --> WFConnection Sep 10 14:33:03 ha1 drbd: n0 ]. Sep 10 14:33:03 ha1 drbd: WARN: stdin/stdout is not a TTY; using /dev/console Sep 10 14:33:03 ha1 kernel: drbd0: drbd0_receiver [2587]: cstate WFConnection --> WFReportParams Sep 10 14:33:03 ha1 kernel: drbd0: Handshake successful: DRBD Network Protocol version 74 Sep 10 14:33:03 ha1 kernel: drbd0: Connection established. Sep 10 14:33:03 ha1 kernel: drbd0: I am(S): 1:00000002:00000001:00000002:00000002:00 Sep 10 14:33:03 ha1 kernel: drbd0: Peer(S): 1:00000006:00000004:00000027:00000006:00 Sep 10 14:33:03 ha1 kernel: drbd0: drbd0_receiver [2587]: cstate WFReportParams --> WFBitMapT Sep 10 14:33:03 ha1 kernel: drbd0: Secondary/Unknown --> Secondary/Secondary Sep 10 14:33:03 ha1 drbd: WARN: stdin/stdout is not a TTY; using /dev/console Sep 10 14:33:03 ha1 rc: Starting drbd: succeeded Sep 10 14:33:04 ha1 kernel: drbd0: drbd0_receiver [2587]: cstate WFBitMapT --> SyncTarget Sep 10 14:33:04 ha1 kernel: drbd0: Resync started as SyncTarget (need to sync 548737652 KB [137184413 bits set]). Sep 10 14:33:32 ha1 kernel: drbd0: Secondary/Secondary --> Primary/Secondary -- > : Lars Ellenberg Tel +43-1-8178292-0 : > : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : > : Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com : > __ > please use the "List-Reply" function of your email client. >