GlusterFS无法在启动时挂载,但稍后在Ubuntu 12.04中挂载

前端之家收集整理的这篇文章主要介绍了GlusterFS无法在启动时挂载,但稍后在Ubuntu 12.04中挂载前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有两台机器,profitmargin和修正主义者,我在profitmargin中创建了一个卷:
root@profitmargin:~# gluster volume info

Volume Name: uploads
Type: Distribute
Status: Started
Number of Bricks: 1
Transport-type: tcp
Bricks:
Brick1: profitmargin:/var/lib/gluster/brick01

在修正主义者中,我将此行添加到fstab以在引导时挂载它:

profitmargin:/uploads /mnt/uploads glusterfs defaults,_netdev 0 0

但是当计算机启动时它没有安装:

root@revisionist:~# mount
/dev/mapper/revisionist-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nodev)
/dev/sda1 on /boot type ext2 (rw)

在日志文件中我发现了这个:

root@revisionist:~# cat /var/log/glusterfs/mnt-uploads.log
[2014-05-19 10:41:18.591355] I [glusterfsd.c:1493:main] 0-/usr/sbin/glusterfs: Started running /usr/sbin/glusterfs version 3.2.5
[2014-05-19 10:41:18.704144] E [common-utils.c:125:gf_resolve_ip6] 0-resolver: getaddrinfo Failed (Name or service not known)
[2014-05-19 10:41:18.704195] E [name.c:253:af_inet_client_get_remote_sockaddr] 0-glusterfs: DNS resolution Failed on host profitmargin
[2014-05-19 10:41:18.704236] E [glusterfsd-mgmt.c:740:mgmt_rpc_notify] 0-glusterfsd-mgmt: Failed to connect with remote-host: Success
[2014-05-19 10:41:18.704375] W [glusterfsd.c:727:cleanup_and_exit] (-->/usr/sbin/glusterfs(glusterfs_mgmt_init+0x1d0) [0x7f1bc152c850] (-->/usr/lib/libgfrpc.so.0(rpc_clnt_start+0x12) [0x7f1bc0e93c72] (-->/usr/sbin/glusterfs(+0x8abf) [0x7f1bc152cabf]))) 0-: received signum (1),shutting down
[2014-05-19 10:41:18.704400] I [fuse-bridge.c:3727:fini] 0-fuse: Unmounting '/mnt/uploads'.

如果我稍后尝试安装它,它的工作原理:

root@revisionist:~# mount -a
root@revisionist:~# mount
/dev/mapper/revisionist-root on / type ext4 (rw,nodev)
/dev/sda1 on /boot type ext2 (rw)
profitmargin:/uploads on /mnt/uploads type fuse.glusterfs (rw,allow_other,default_permissions,max_read=131072)

我正在运行Ubuntu 12.04并且我知道与init脚本相关的错误,但我正在运行具有修复的GlusterFS版本3.2.5-1ubuntu1.我也知道一些IPv6,所以我确保IPv4和IPv6都能正常工作:

root@revisionist:~# ping profitmargin
PING profitmargin (192.168.1.111) 56(84) bytes of data.
64 bytes from profitmargin (192.168.1.111): icmp_req=1 ttl=64 time=0.355 ms
64 bytes from profitmargin (192.168.1.111): icmp_req=2 ttl=64 time=0.417 ms
^C
--- profitmargin ping statistics ---
2 packets transmitted,2 received,0% packet loss,time 999ms
rtt min/avg/max/mdev = 0.355/0.386/0.417/0.031 ms
root@revisionist:~# ping6 profitmargin
PING profitmargin(profitmargin) 56 data bytes
64 bytes from profitmargin: icmp_seq=1 ttl=64 time=0.637 ms
64 bytes from profitmargin: icmp_seq=2 ttl=64 time=0.472 ms
64 bytes from profitmargin: icmp_seq=3 ttl=64 time=0.407 ms
64 bytes from profitmargin: icmp_seq=4 ttl=64 time=0.393 ms
64 bytes from profitmargin: icmp_seq=5 ttl=64 time=0.402 ms
^C
--- profitmargin ping statistics ---
5 packets transmitted,5 received,time 3998ms
rtt min/avg/max/mdev = 0.393/0.462/0.637/0.092 ms

可能导致此问题的任何其他想法和/或如何修复它?

我不是专家,但它似乎与机器修订列表没有通过DNS解析profitmargin的IP地址有关.也许mount命令在网络服务之前执行,这就是为什么revisionlist无法找到profitmargin.启动网络服务后,它可以找到机器.您应该尝试找到GlusterFS挂载的方法,以等待网络服务联机.
原文链接:https://www.f2er.com/ubuntu/347911.html

猜你在找的Ubuntu相关文章