最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
DRBD编译安装可能遇到的问题
时间:2022-06-30 20:53:44 编辑:袖梨 来源:一聚教程网
报错: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.
解决:
[root@Heartbeat-Master drbd-8.4.4]# yum install flex
报错:没有初始化 no resources defined!
--== 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!
解决:
0
[root@Heartbeat-Master etc]# drbdadm create-md data
报错: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
解决:
[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
错误: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=330M --al-extents=517' terminated with exit code 10
解决:
[root@Heartbeat-Slave etc]# umount /mnt/
[root@Heartbeat-Slave etc]# drbdadm up data
错误: 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, 2016-05-25 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
解决:裂脑问题(icmp成功后才会进行协商)
[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
错误: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, 2016-05-26 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
解决:
[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, 2016-05-26 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/
问题:硬盘变小
[root@Heartbeat-Slave mnt]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
28G 1.1G 26G 4% /
tmpfs 238M 0 238M 0% /dev/shm
/dev/sda1 477M 47M 406M 11% /boot
/dev/sdb1 1.9G 2.8M 1.8G 1% /mnt
解决:
[root@Heartbeat-Slave ~]# drbdadm down data
[root@Heartbeat-Slave ~]# mount /dev/sdb1 /mnt && ll /mnt/
total 0
-rw-r--r--. 1 root root 0 May 27 18:06 1
-rw-r--r--. 1 root root 0 May 27 18:06 10
-rw-r--r--. 1 root root 0 May 27 18:06 2
-rw-r--r--. 1 root root 0 May 27 18:06 3
-rw-r--r--. 1 root root 0 May 27 18:06 4
-rw-r--r--. 1 root root 0 May 27 18:06 5
-rw-r--r--. 1 root root 0 May 27 18:06 6
-rw-r--r--. 1 root root 0 May 27 18:06 7
-rw-r--r--. 1 root root 0 May 27 18:06 8
-rw-r--r--. 1 root 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
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 (4k) 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
28G 1.1G 26G 4% /
tmpfs 238M 0 238M 0% /dev/shm
/dev/sda1 477M 47M 406M 11% /boot
/dev/sdb1 4.6G 3.8M 4.4G 1% /mnt
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20