Error: configure: error: Cannot build utils without flex, either install flex or pass the -- without-utils option.
Configure: error: Cannot build utils without flex, either install flex or pass the -- without-utils option.
Solution:
[Root @ Heartbeat-Master drbd-8.4.4] # yum install flex
Error: no resources defined is not initialized!
-- = Thank you for participating in the global usage survey = --
The server's response is:
You are the 5047th user to install this version
No resources defined!
Solution:
0
[Root @ Heartbeat-Master etc] # drbdadm create-md data
Error: var/run/drbd: No such file or directory
[Root @ Heartbeat-Master etc] # drbdadm up data
/Byrd/service/drbd-8.4.4/var/run/drbd: No such file or directory
/Byrd/service/drbd-8.4.4/var/run/drbd: No such file or directory
Solution:
[Root @ Heartbeat-Master etc] # mkdir/byrd/service/drbd-8.4.4/var/run
[Root @ Heartbeat-Master etc] # drbdadm up data
Device '0' is configured!
Command 'drbdmeta 0 v08/dev/sdb2 0 apply-Al' terminated with exit code 20
Error: 0: Failure: (104) Can not open backing device.
0
1
0: Failure: (104) Can not open backing device.
Command 'drbdsetup attach 0/dev/sdb1/dev/sdb2 0 -- on-io-error = detach -- disk-flushes = no -- md-flushes = no -- resync-rate = 330 M -- al-extents = 517 'terminated with exit code 10
Solution:
[Root @ Heartbeat-Slave etc] # umount/mnt/
[Root @ Heartbeat-Slave etc] # drbdadm up data
Error: 0: cs: WFConnection ro: Secondary/Unknown ds: UpToDate/DUnknown C r -----
0
[Root @ Heartbeat-Master ~] # Cat/proc/drbd
Version: 8.4.4 (api: 1/proto: 86-101)
GIT-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by root @ Heartbeat-Master, 14:34:01
0: cs: WFConnection ro: Secondary/Unknown ds: UpToDate/DUnknown 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: d oos: 0
Solution: split-brain problem (negotiation will be conducted only after icmp is successful)
[Root @ Heartbeat-Master ~] # Tail-6/etc/sysconfig/iptables
-A input-p tcp-m state -- state NEW-m tcp -- dport 22-j ACCEPT
-A input-j REJECT -- reject-with icmp-host-prohibited
-A input-p tcp-m state -- state NEW-m tcp -- dport 7788-j ACCEPT
-A forward-j REJECT -- reject-with icmp-host-prohibited
COMMIT
Change
[Root @ Heartbeat-Slave ~] # Tail/etc/sysconfig/iptables
: Output accept [22: 2368]
-A input-m state -- state RELATED, ESTABLISHED-j ACCEPT
-A input-p icmp-j ACCEPT
-A input-I lo-j ACCEPT
-A input-p tcp-m tcp -- dport 7788-j ACCEPT
-A input-p tcp-m state -- state NEW-m tcp -- dport 22-j ACCEPT
-A input-j REJECT -- reject-with icmp-host-prohibited
-A forward-j REJECT -- reject-with icmp-host-prohibited
COMMIT
Error: mount: you must specify the filesystem type
[Root @ Heartbeat-Master ~] # Mount/dev/drbd0/data/
Mount: you must specify the filesystem type
[Root @ Heartbeat-Master ~] # Cat/proc/drbd
Version: 8.4.4 (api: 1/proto: 86-101)
GIT-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by root @ Heartbeat-Master, 10:55:33
0: cs: Connected ro: Secondary/Secondary ds: UpToDate/UpToDate C r -----
Ns: 1953108 nr: 0 dw: 0 dr: 1953108 al: 0 bm: 120 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: d oos: 0
Solution:
[Root @ Heartbeat-Master ~] # Drbdadm primary data
[Root @ Heartbeat-Master ~] # Cat/proc/drbd
Version: 8.4.4 (api: 1/proto: 86-101)
GIT-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by root @ Heartbeat-Master, 10:55:33
0: cs: Connected ro: Primary/Secondary ds: UpToDate/UpToDate C r -----
Ns: 1953108 nr: 0 dw: 0 dr: 1953765 al: 0 bm: 120 lo: 0 pe: 0 ua: 0 ap: 0 ep: 1 wo: d oos: 0
[Root @ Heartbeat-Master ~] # Mount/dev/drbd0/data/
Problem: the hard disk gets smaller
[Root @ Heartbeat-Slave mnt] # df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup-lv_root
28 GB 1.1G 26G 4%/
Tmpfs 238 M 0 238 M 0%/dev/shm
/Dev/sda1 477 M 47 M 406 M 11%/boot
/Dev/sdb1 1.9G 2.8 M 1.8G 1%/mnt
Solution:
[Root @ Heartbeat-Slave ~] # Drbdadm down data
[Root @ Heartbeat-Slave ~] # Mount/dev/sdb1/mnt & ll/mnt/
Total 0
-Rw-r --. 1 root 0 May 27 18:06 1
-Rw-r --. 1 root 0 May 27 18:06 10
-Rw-r --. 1 root 0 May 27 18:06 2
-Rw-r --. 1 root 0 May 27 18:06 3
-Rw-r --. 1 root 0 May 27 18:06 4
-Rw-r --. 1 root 0 May 27 18:06 5
-Rw-r --. 1 root 0 May 27 18:06 6
-Rw-r --. 1 root 0 May 27 18:06 7
-Rw-r --. 1 root 0 May 27 18:06 8
-Rw-r --. 1 root 0 May 27 18:06 9
[Root @ Heartbeat-Slave ~] # Umount/mnt/
[Root @ Heartbeat-Slave ~] # Fsck-n/dev/sdb1
Fsck from util-linux-ng 2.17.2
E2fsck 1.41.12 (17-May-2010)
/Dev/sdb1: clean, 20/122160 files, 16585/488277 blocks
[Root @ Heartbeat-Slave ~] # E2fsck-f/dev/sdb1
E2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/Lost + found not found. Create <y>? Yes
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/Dev/sdb1: ***** file system was modified *****
/Dev/sdb1: 21/122160 files (0.0% non-contiguous), 16586/488277 blocks
[Root @ Heartbeat-Slave ~] # Resize2fs/dev/sdb1
Resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on/dev/sdb1 to 1220699 (4 k) blocks.
The filesystem on/dev/sdb1 is now 1220699 blocks long.
[Root @ Heartbeat-Slave ~] # Mount/dev/sdb1/mnt/
[Root @ Heartbeat-Slave ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup-lv_root
28 GB 1.1G 26G 4%/
Tmpfs 238 M 0 238 M 0%/dev/shm
/Dev/sda1 477 M 47 M 406 M 11%/boot
/Dev/sdb1 4.6G 3.8 M 4.4G 1%/mnt