Solve the mount timeout problem of the old linux nfs system, nfsmount

Source: Internet
Author: User
Tags nfsd

Solve the mount timeout problem of the old linux nfs system, nfsmount
Background

Due to business needs, the school needs to transplant the examination system to the cloud platform. The first step is to mount the nfs storage platform of the old system A to the new system B. The old examination system A has been in service for A long time. The operating system is redhat4 series, and the version is still linux 2.4.20.

Problem

A problem occurs during mount on the B-end, that is, the input

mount  -t nfs 10.77.30.31:/opt/OJ/contests  /mnt/nfs
Timeout error

For the nfs service on the side, other old systems can mount the nfs files on the mountA side, but the servers after linux 3.0 still cannot mount. Later, I asked other people who had known it before, but they never solved it.

Tracking

First, check the showmount on the B side and find that everything is normal.

root@ubuntu188:/mnt# showmount -e 10.77.30.31Export list for 10.77.30.31:/opt/OJ/contests (everyone)
This indicates that the nfs service on the B-end runs normally and the firewall does not intercept it.

Then, search for logs on Client A and find that errors are reported continuously,

nfsd: unexporting all filesystemsnfsd: last server has exitednfsd: unexporting all filesystems

Therefore, Baidu on the Internet said that/proc/fs/nfsd was not loaded on the nfs server. So I looked at it and found that this was indeed not found on end.

So I tried to mount the file and found that it could not work. An error was prompted.

mount -t nfsd  nfsd  /proc/fs/nfsd mount: mount point /proc/fs/nfsd does not exist
It is normal to mount this type on the B side or other newer systems.

So is the nfsd service not installed on end A? Although it is basically impossible, verify that the service module of end A is loaded, and the/proc contains

[root@cszjusrv3 contests]# lsmod|grep nfsdnfsd                   81104   8  (autoclean)lockd                  59536   1  (autoclean) [nfs nfsd]sunrpc                 87516   1  (autoclean) [nfs nfsd lockd][root@cszjusrv3 contests]# ls /proc/net/rpc/nfsd /proc/net/rpc/nfsd


Problem Solving

At this time, I have confirmed that the nfs service version on the side is too old. However, because A's operating system is too old, it is no longer suitable for installing A new nfs version.

I found two links in the issue "nfsd: unexporting all filesystems", and I felt the problem. After further reading, we found that the nfs version is used for optimization. According to nfsstat, end A only supports 1-3 nfs versions, and now 4 is used by default. Therefore, end B tries the following parameters and finds that the nfs version is successful.

root@ubuntu188:/mnt# mount  -t nfs 10.77.30.31:/opt/OJ/contests  /mnt/nfs -o nfsvers=3root@ubuntu188:/mnt# ls /mnt/nfsproblems  problems.1  runs  work  working

Summary

For such problems, you must first find the log information of the problem, but you should understand the mechanism instead of relying on the omnipotent answers on the Internet. Finally, I would like to thank the author of the following two cited articles :)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.