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

有两台机器,profitmargin和修正主义者,我在profitmargin中创build了一个卷:

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,noexec,nosuid,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,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,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,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,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,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,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,我知道与初始化脚本相关的错误,但我运行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, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.393/0.462/0.637/0.092 ms 

任何其他的想法是什么可能导致这个问题和/或如何解决它?

我不是专家,但它似乎与机器修订列表不通过DNSparsingprofitmargin的IP地址有关。 也许mount命令在networking服务之前执行,这就是为什么revisionlist不能findprofitmargin。 启动networking服务后,可以find机器。 您应该尝试findGlusterFS挂载等待networking服务联机的方法。