Login got slow with NFS on Solaris / Solaris 在mount了NFS时login变慢

现象:登陆变得很慢,su到普通用户很慢,但是root不受影响
Issue: Login got slow, su to normal user slow, but su to root not effected

检查:在/etc/profile添加检查点,发现原因是执行 /usr/sbin/quota 这一步时很慢,但是系统没有启用quota,只是挂接了NFS
Check: Add checkpoint to /etc/profile and found the step “/usr/sbin/quota” is very slow, but the system hasn’t quota set up, only mounted NFS

原因:一般来说没有防火墙的情况下,其实rquotad也会反应很快不至于变慢,但是在防火墙未打开rquotad时,这一步会耗去很长时间去连接rquotad
Reason: Normally, it’s ok without firewall, but it’s slow when the firewall blocks the rquotad packages

解决方案:启用noquota选项来重新挂载NFS,例如:
Solution: use noquota option to mount NFS, for example:
# mount -F nfs -o noquota server1:/dir1

Done!
登陆慢的另外一个原因也可能是你的DNS server没办法解析你的地址,把ip地址加入/etc/hosts即可

Leave a Reply

Your email address will not be published. Required fields are marked *