Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the nolock parameters required when NFS is mounted on the target board

Shulou Source: shulou.com Published: 2022-06-03 05:38:32 10月14日 Update

Today, I will talk to you about what nolock parameters are needed when mounting NFS on the target board, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

one。 Check the nfs status:

# service nfs status

two。 Create a nfs shared folder on the host:

# mkdir / nfsroot

# echo "/ nfsroot 192.168.1.118 (rw,sync,no_root_squash)" > / etc/exports

# cat / etc/exports

/ nfsroot 192.168.1.118 (rw.sync,no_root_squash)

Here we create / nfsroot for nfs sharing, and set the sharing property IP to 192.168.1.118 (development board) in the / etc/exports file to be readable and writable for users, and no_root_squash specifies the trusted client.

three。 Start the host nfs service

# service nfs start

Fourth, in the development board mount

# mount 192.168.1.100:/nfsroot / mnt/

Without any prompt to indicate success, you can operate / mnt directory, cp, mv files, etc.

There is the following error message: / # mount-t nfs 192.168.1.249:/appdata / mnt

Portmap: server localhost not responding, timed out

RPC: failed to contact portmap (errno-5).

Portmap: server localhost not responding, timed out

RPC: failed to contact portmap (errno-5).

Lockd_up: makesock failed, error=-5

Portmap: server localhost not responding, timed out

RPC: failed to contact portmap (errno-5).

Mount: Mounting 192.168.1.249:/appdata on / mnt failed: Input/output error

Possible reasons:

Nfs mount default options include file locks, which depend on the dynamic port allocation feature provided by portmap

Simple solution: kill file lock (lockd) or mount-o nolock

What exactly is the reason for the file lock mentioned above? a better solution has not been found yet.

Note: when the host firewall is set, it may also cause the target board to be inaccessible.

Change to: mount-o

Nolock 192.168.1.100:/nfsroot / mnt can solve the problem.

After reading the above, do you have any further understanding of the nolock parameters required when the target board mounts NFS? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: File target host content parameter reason development prompt success lieutenant method function dynamic customer client property folder method more status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno vpn MariaDB Linux