关于NIS服务绑定和mount挂载的问题

来源:互联网 发布:windows缩小图片大小 编辑:程序博客网 时间:2024/05/23 13:59


换成备份节点mu01后,

登陆到计算节点很慢,发现nis服务没有挂载,


[root@c02b01 ~]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local
modprobe lnet
modprobe lustre
sleep 10
mount -t lustre 10.0.0.51@o2ib:/lustre /lustre
mount --bind /lustre/home /home
mount -t nfs -o vers=3 mu02:/opt/tsce/share /opt/tsce/share
service pbs_mom restart

 [root@c02b02 ~]# mount -l
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/kernel/config type configfs (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.1.51:/public on /public type nfs (rw,vers=3,addr=192.168.1.51)
nfsd on /proc/fs/nfsd type nfsd (rw)
10.0.0.51@o2ib:/lustre on /lustre type lustre (rw)
/lustre/home on /home type none (rw,bind)


发现 mount -t nfs -o vers=3 mu02:/opt/tsce/share /opt/tsce/share 未执行,在计算节点上执行 

mount -t nfs -o vers=3 192.168.0.123:/opt/tsce/share /opt/tsce/share, 发现检查时NIS服务没挂载导致的


执行service ypbind start,  结果进程死在:
[root@c02b02 ~]# service ypbind start
Starting NIS service: [  OK  ]
Binding NIS service: ..。。


发现是ypdomain 不对,

修改mu01下的服务器域名:  
[root@mu01 ~]# cat /var/yp/
binding/   Makefile   nicknames  TS10K/     ypservers  
[root@mu01 ~]# cat /var/yp/ypservers 
192.168.0.123

修改子节点的域名:
[root@c02b01 ~]# cat /etc/yp.conf 
# generated by /sbin/dhclient-script
domain TS10K server 192.168.0.123

重启NIS服务

[root@mu02 ~]#service ypserv restart
[root@c02b01 ~]#service ypbind restart


[root@c02b01 ~]#service ypbind restart


[liuqiang2@mu01 ~]$ ssh c02b01
Last login: Wed May 25 06:40:56 2005 from 192.168.0.123
-bash: /opt/tsce/share/tsce.profile: No such file or directory

没有挂载

[liuqiang2@c02b01 ~]$

 [root@c02b01 ~]# mount -t nfs -o vers=3 192.168.0.123:/opt/tsce/share /opt/tsce/share
[root@c02b01 ~]# mount -l
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /sys/kernel/config type configfs (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
192.168.1.51:/public on /public type nfs (rw,vers=3,addr=192.168.1.51)
nfsd on /proc/fs/nfsd type nfsd (rw)
10.0.0.51@o2ib:/lustre on /lustre type lustre (rw)
/lustre/home on /home type none (rw,bind)
/lustre/home on /home type none (rw,bind)
192.168.0.123:/opt/tsce/share on /opt/tsce/share type nfs (rw,vers=3,addr=192.168.0.123)




[liuqiang2@mu01 ~]$ ssh c02b01
Last login: Wed May 25 06:55:27 2005 from 192.168.0.123
[liuqiang2@c02b01 ~]$ 


OK解决。







 

1 0