Rootop 服务器运维与web架构

/bin/mount:无法识别的选项“–no-canonicalize”

| 暂无评论

注意:

      我在redhat5下编译完新版本util-linux时,替换 了系统自带的mount命令,mfs可以成功挂载,但是在下次启动系统时发现系统起不来(停留在fsck: /lib64/libblkid.so.1: no version information available (required by fsck)),提示说可以进入修复模式检查文件系统,可是通过fsck检查重启还不行,进入单用户模式,开启网络,打开ssh服务,把另一台同版本的mount替换还是不行,接着替换libblkid.so.1模块,还是失败,最后在grub内核参数后加一句 fastboot ,启动,虽然报错,但是可以进入系统,一切正常,备份数据,重装系统!根本原因就是因为升级了util-linux-ng版本!

可参考下redhat官网bug报告:https://bugzilla.redhat.com/show_bug.cgi?id=568473

在redhat5下mfsmount元数据服务器时报错:
[root@localhost ~]# /usr/local/mfs/bin/mfsmount /mnt/mfs -H 192.168.1.56
mfsmaster accepted connection with parameters: read-write,restricted_ip ; root mapped 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 参数支持。

解决方法:
从 https://www.kernel.org/pub/linux/utils/util-linux/ 下载新版本,我这里对应centos6下的版本util-linux-ng-2.17进行安装。

[root@localhost ~]# yum install -y ncurses ncurses-devel
[root@localhost ~]# wget -c https://www.kernel.org/pub/linux/utils/util-linux/v2.17/util-linux-ng-2.17.tar.gz --no-check-certificate
[root@localhost ~]# tar zxvf util-linux-ng-2.17.tar.gz
[root@localhost ~]# cd util-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 with parameters: read-write,restricted_ip ; root mapped to root:root
[root@localhost util-linux-ng-2.17]#

解决!

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/2401.html

赞赏

微信赞赏支付宝赞赏

作者:Venus

专注于 服务器运维与web架构 E-mail:venus#rootop.org

发表评论