改完这两个文件后,重启进程serviceyum-updatesd restart,yum即可使用了。
在make install后,出现Pythonbuild finished, but the necessary bits to build these modules were not found:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py indetect_modules() for the module's name.
这个两个模块用不着,不用管它。 另外、启动mfschunkserver、mfsmetalogger和mfsclient时,也要关闭防火墙或者在防火墙上开启对应服务的端口,否则在web界面属于对应功能的面板会出错。 2、can'tresolve master hostname and/or portname (mfsmaster:9421) 说明无法识别mfsmaster的主机名或IP,应该编辑/etc/hosts文件,添加以下语句: 主控的IP(如:192.168.1.239)mfsmaster 另外在查看web界面时,新版的moosefs2.0.72需要输入DNSname,直接输入mfsmaster的名称,如不知,可以在mfsmaster输入hostname查看。 3、查看master上的/va/log/message日志出现: Jan 8 10:10:00 nginx mfsmaster[4845]: chunkservers status: Jan 8 10:10:00 nginx mfsmaster[4845]: total: usedspace: 0 (0 GB),totalspace: 0 (0 GB), usage: 0.00% 这说明master没有发现到chunker服务器,请检查配置文件。 4.2、Mfs客户端挂接类错误 4.2.1、资源暂时不可用
注意:
1,出现这种情况是由于系统内核的版本问题,一般来说升级内核风险较大,不建议。mfsmount在OEL5.8上是不支持UEK的内核的,目前测试过程中,只发现OEL5.8UEK版本不能挂接,其他版本的可以。一般系统默认有好几个内核,所有在启动是选择不是UEK的内核即可使用mfsmount,如果想自动启动,在/boot/grub/grub.conf中修改默认启动内核的default值即可。
2, 如果在挂接的时候出现:
/usr/local/mfs/bin/mfsmount/mnt/mfs -H 192.168.9.4
mfsmaster accepted connection with parameters: read-write,restricted_ip ; rootmapped to root:root
/bin/mount:无法识别的选项“–no-canonicalize”
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere’.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] … : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount –bind olddir newdir
or move a subtree:
mount –move olddir newdir
One can change the type of mount containing the directory dir:
mount –make-shared dir
mount –make-slave dir
mount –make-private dir
mount –make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount –make-rshared dir
mount –make-rslave dir
mount –make-rprivate dir
mount –make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
error in fuse_mount
是mount的版本过低所导致的问题,在mfsmount的时候需要–no-canonicalize 参数支持。
解决方法:下载新版本, util-linux-ng-2.17进行安装。
[root@localhost ~]# tar -zxvf util-linux-ng-2.17.tar.gz
[root@localhost ~]# cdutil-linux-ng-2.17
[root@localhost util-linux-ng-2.17]#./configure --prefix=/usr/local/util-linux-ng-2.17
[root@localhost util-linux-ng-2.17]#make && make install
[root@localhost util-linux-ng-2.17]# mv/bin/mount /bin/mount.old
[root@localhost util-linux-ng-2.17]# mv/bin/umount /bin/umount.old
[root@localhost util-linux-ng-2.17]# ln-s /usr/local/util-linux-ng-2.17/bin/mount /bin/mount
[root@localhost util-linux-ng-2.17]# ln-s /usr/local/util-linux-ng-2.17/bin/umount /bin/umount
[root@localhost util-linux-ng-2.17]#/usr/local/mfs/bin/mfsmount /var/www/html/ -H 192.168.1.56
mfsmaster accepted connection withparameters: read-write,restricted_ip ; root mapped to root:root
此时再次mfsmount就不会出现上述问题。 4.2.2、无法识别fuse
1、安装了fuse却无法识别
修改环境变量文件/etc/profile ,执行以下命令:
#exportPKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
加载fuse模块到内核:
#modprobefuse(最好加入开机启动)
2、error while loading sharedlibraries: libfuse.so.2: cannot open shared object file: No such file ordirectory
解决方法:输入以下命令更新/etc/ld.so.conf即可,记得在root权限下执行:
#ldconfig
3、fuse: mountpoint is not empty
问题分析:挂载点不为空,看看fuse或mfs客户端是否已经挂载上了,或者查看挂接目录/mnt/mfs下是否已有文件。如果想强行挂接,需要在挂接命令后面加入-o nonempty选项,这样挂接后,原来目录下面的文件全部被mfs文件系统所覆盖,暂时不可查看,卸载掉mfs客户端后,原来目录下的文件会显示出来,不用担心文件丢失。 4.2.3、其他类错误
1、产生df:`/usr/xxtsrc/mfs: Transport endpoint is not connected的错误
处理的方式是umount/usr/xxtsrc/mfs,然后再重新挂载就可以了,这种 情况用于用户MFS客户端出现误杀的情况。
2、can’t open file limited 1000
检查系统的文件描述限制,并重新设置。
3、多个mfs客户端挂接后,如果使用普通用户挂接后,对mfs文件系统的用户UID和GID要求:
在正式环境中,四台服务器在创建web用户时,系统UID、GID可能会不同,由于四个mfs客户端挂接同一个mfsmaster,共享盘里面文件的所属用户都是web,所属组是web,这个web用户的UID和GID是mfs客户端第一次挂接后根据该客户端所属的UID、GID附加的,如果挂接多个客户端,那么该UID和GID会在其他客户端显示出来,这样可能会造成其他客户端无法使用的情况,这一点是和windows不一样的。所以要挂接多个客户端,必须要求四台服务器UID,GID相同,在此,更改了38服务器web用户的UID为54326,GID为54326 ,与34的web用户UID和GID相同。下面给出稳妥的修改方法:
groupmod –g 54326 web(修改web用户的GID)
usermod –u 54326 web(修改web用户的UID)
然后 usermod -g web web
或者添加附加组 usermod –G web web
特殊情况:如果该UID被其他用户所占用,请删除该用户。
如果该GID被其他用户所占用,请删除该组或者添加附加组,然后切换到普通用户下,使用newgrp +用户名的方式来切换GID,记得在修改完UID,GID之后,原来该用户下的文件的UID和GID不会自动变过来,需要重新赋予新的用户和组,
切记修改UID和GID不能直接vi系统配置文件,如果擅自修改,出现无法解决的问题后果自负。
4、在查看web界面的时候,发现有2个文件的goal是0,在查看mfsmaster日志文件的时候,发现重复的提示:
mfsmaster[29045]: chunk00000000001028AF_00000001: there are no copies
mfsmaster[29045]: chunk 0000000000102897_00000001:there are no copies
在chunkserver上,查找不到两个文件,这两个文件应该是先前测试数据遗留下来的无用文件。