Simple summary of NFS (network file system) analog errors

Source: Internet
Author: User
Tags nfsd

NFS File System impersonation Error

Server side: 192.168.1.178-server-a share a/tmp/serverdira directory owner set to Nfsnobody

Client-b End: 192.168.1.179-client-b mounted on/TMP/SHAREDIRB

Client-c End: 192.168.1.180-client-c mounted on/TMP/SHAREDIRC


############################## #未连通情况下模拟错误1 ###############################

Server side does not have a shared directory established/tmp/serverdira

The Client-b end has been set up to mount the directory/TMP/SERVERDIRB


####### #server端

[[Email protected] ~]# service Portmap status

Portmap (PID 2244) is running ...

[[Email protected] ~]# service NFS Status

RPC.MOUNTD (PID 2362) is running ...

NFSD (PID 2359 2358 2357 2356 2355 2354 2353 2352) is running ...

Rpc.rquotad (PID 2326) is running ...

[Email protected] ~]# cd/tmp

[Email protected] tmp]# EXPORTFS-RV

Exporting 192.168.1.0/24:/tmp/serverdira

[Email protected] tmp]# ls-l

Total 0

[Email protected] tmp]#


####### #client-B End

[Email protected] ~]# chkconfig--list portmap

Portmap 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[Email protected] ~]# cd/tmp/

[[email protected] tmp]# ls

Sharedirb

[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirb/

Mount:192.168.1.178:/tmp/serverdira failed, reason given by server:no such file or directory # # #模拟错误1 # # #

[Email protected] tmp]#


# # # # #解决未连通情况下模拟错误1 ###########

The server side re-establishes the shared directory/tmp/serverdira

Client-b End Mount Directory successfully/TMP/SERVERDIRB


####### #server端

[Email protected] tmp]# mkdir Serverdira

[Email protected] tmp]# chown nfsnobody serverdira/


####### #client-B End

[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirb/

[Email protected] tmp]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 21%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdira

9.3G 1.9G 7.0G 21%/TMP/SHAREDIRB


############################## #未连通情况下模拟错误2 ###############################

Server side does not have a shared directory established/tmp/serverdira

The client-c end does not have a mounted directory/tmp/serverdirc


####### #server端

[[Email protected] ~]# service Portmap status

Portmap (PID 2244) is running ...

[[Email protected] ~]# service NFS Status

RPC.MOUNTD (PID 2362) is running ...

NFSD (PID 2359 2358 2357 2356 2355 2354 2353 2352) is running ...

Rpc.rquotad (PID 2326) is running ...

[Email protected] ~]# cd/tmp

[Email protected] tmp]# EXPORTFS-RV

Exporting 192.168.1.0/24:/tmp/serverdira

[Email protected] tmp]# ls-l

Total 0

[Email protected] tmp]#


####### #client-C End

[Email protected] ~]# chkconfig--list portmap

Portmap 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[[email protected] ~]# Chkconfig--list NFS

NFS 0:off 1:off 2:off 3:off 4:off 5:off 6:off

[Email protected] ~]# cd/tmp

[Email protected] tmp]# ls-l

Total 0

[Email protected] tmp]# showmount-e 192.168.1.178

Export list for 192.168.1.178:

/tmp/serverdira 192.168.1.0/24


[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirc

Mount.nfs:mount Point/tmp/sharedirc does not exist # #模拟错误2 #####

[Email protected] tmp]#


# # # # #解决未连通情况下模拟错误2 ###########

The server side re-establishes the shared directory/tmp/serverdira

Client-c end re-establish the mounted directory/tmp/sharedirc


[Email protected] tmp]# mkdir SHAREDIRC

[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirc

[Email protected] tmp]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 21%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdira

9.3G 1.9G 7.0G 21%/tmp/sharedirc

[Email protected] tmp]#


############################## #未连通情况下模拟错误3 ###############################

Client-b-side RPC (PORTMAP) service is not started


[[Email protected] tmp]# service Portmap stop

Stopping portmap: [OK]

[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirb/

# # #client-B RPC (PORTMAP) does not start, there is a waiting process


[Email protected] tmp]# showmount-e 192.168.1.178

Export list for 192.168.1.178:

/tmp/serverdira 192.168.1.0/24

[Email protected] tmp]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 21%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

[Email protected] tmp]#

# # # # #解决未连通情况下模拟错误3 ###########

Start the Client-b-side RPC (PORTMAP) service


[[Email protected] tmp]# service Portmap start

Starting portmap: [OK]

[Email protected] tmp]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirb/

[Email protected] tmp]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 21%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdira

9.3G 1.9G 7.0G 21%/TMP/SHAREDIRB

############################## #已连通情况下模拟错误1 ###############################

Under normal circumstances, the test server-side and Client-b-side RPC (PORTMAP) services randomly suddenly hang out

Server-side and Client-b-side RPC (PORTMAP) services can also be shared with normal files while being hung up


####### #server端

[[Email protected] ~]# service Portmap stop

Stopping portmap: [OK]

[Email protected] ~]# cd/tmp/serverdira/

[email protected] serverdira]# Touch SSS

[[email protected] serverdira]# ls

SSS TESTB

[Email protected] serverdira]#

####### #client-B End

[[email protected] sharedirb]#/etc/rc.d/init.d/portmap stop

Stopping portmap: [OK]

[Email protected] sharedirb]# showmount-e 192.168.1.178

# # #client-B RPC (PORTMAP) suddenly hangs up, server side RPC (PORTMAP) is OK

Export list for 192.168.1.178:

/tmp/serverdira 192.168.1.0/24


[Email protected] sharedirb]# showmount-e 192.168.1.178

Mount Clntudp_create:RPC:Port Mapper failure-rpc:unable to receive

# # #server端RPC (Portmap) suddenly hung up, client-b-side RPC (PORTMAP) normal

[Email protected] sharedirb]#


[Email protected] sharedirb]# showmount-e 192.168.1.178

# # #server端RPC (Portmap) suddenly hangs up and restarts, client-b-side RPC (PORTMAP) is normal

Mount Clntudp_create:RPC:Program not registered

# # #这个由于重新启动的portmap没有nfs注册的记录, restart NFS to resolve



############################## #已连通情况下模拟错误2 ###############################

Under normal circumstances, the NFS service on the test server side hangs off




####### #client-B End

[Email protected] ~]# showmount-e 192.168.1.178

Mount Clntudp_create:RPC:Program not registered

# # #这个由于重新启动的portmap没有nfs注册的记录, restart NFS to resolve

[Email protected] ~]# CD/TMP/SHAREDIRB

# # #server端的nfs服务挂掉, the input cd/tmp/sharedirb,client-b end zombie State, unable to use CTRL + C fallback # # #出, Server Side Restart NFS service can solve


############################## #已连通情况下模拟错误3 ###############################

Under normal circumstances, the server side of the NFS service configuration file/etc/exports original/tmp/serverdira shared to 192.168.1.0/24 network segment changed to 192.168.2.0/24



####### #server端

[Email protected] ~]# Cat/etc/exports

# # #nfs by crazy#20151022

/tmp/serverdira 192.168.1.0/24 (Rw,sync)

[[Email protected] ~]# sed ' s/1.0\/24/2.0\/24/g '/etc/exports-i

# # #使用sed替换命令把1.0/24 network segment changed to 2.0/24 network segment

[Email protected] ~]# Cat/etc/exports

# # #nfs by crazy#20151022

/tmp/serverdira 192.168.2.0/24 (Rw,sync)

[Email protected] ~]#/etc/rc.d/init.d/nfs Reload


####### #client-B End

[Email protected] ~]# showmount-e 192.168.1.178

Export list for 192.168.1.178:

/tmp/serverdira 192.168.2.1/24 # # #server共享给192.168.2.1/24 the directory of the network segment

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 21%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdira

----/TMP/SHAREDIRB

[Email protected] ~]# UMOUNT/TMP/SHAREDIRB

[Email protected] ~]# mount-t NFS 192.168.1.178:/tmp/serverdira/tmp/sharedirb/

Mount:192.168.1.178:/tmp/serverdira failed, reason given by Server:permission denied

# # #上面一条错误提示by Server:permission denied: Because the server side/tmp/serverdira share to the 192.168.2.1/24 network segment

# # #解决错误, reconfigure the/etc/exports. config file, and then make the configuration file effective to resolve


############################## #已连通情况下模拟错误4 ###############################

Under normal circumstances, test server-side NFS service configuration file/etc/exports


####### #server端

[Email protected] ~]# Vi/etc/exports

#/tmp/serverdira/192.168.1.0/24 (Rw,sync) # #注释 share of/tmp/serverdira/


/TMP/SERVERDIRB/192.168.1.0/24 (Rw,sync) # #添加 share of/tmp/serverdirb/

[Email protected] ~]# EXPORTFS-RV

Exporting 192.168.1.0/24:/tmp/serverdirbb/

[Email protected] ~]# mkdir-p/TMP/SERVERDIRB

[Email protected] ~]# ls-l/tmp/serverdirb/

Total 0

[Email protected] ~]#


####### #client-B End

[Email protected] ~]# showmount-e 192.168.1.178

Export list for 192.168.1.178:

/TMP/SERVERDIRB 192.168.1.0/24

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 22%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdira

----/TMP/SHAREDIRB

# # #由于server端/tmp/serverdira not shared out

[Email protected] ~]# mount-t NFS 192.168.1.178:/tmp/serverdirb/tmp/sharedirb/

Mount.nfs:Stale NFS File Handle # # #由于client-B end of/tmp/sharedirb/is also occupied resulting

[[email protected] ~]# UMOUNT/TMP/SHAREDIRB # # #client-B End of/tmp/sharedirb/cancel the original Mount

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 22%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

[Email protected] ~]# mount-t NFS 192.168.1.178:/tmp/serverdirb/tmp/sharedirb/

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/sda3 9.3G 1.9G 7.0G 22%/

/DEV/SDA1 190M 12M 169M 7%/boot

Tmpfs 30M 0 30M 0%/dev/shm

192.168.1.178:/tmp/serverdirb

9.3G 1.9G 7.0G 22%/TMP/SHAREDIRB

# # #client-B/tmp/sharedirb/successfully mounted/TMP/SERVERDIRB

[Email protected] ~]#


======================================================================================

Summarize:

After the server side and client end are connected:

1.server RPC (PORTMAP) suddenly hangs up, client side RPC (PORTMAP) is normal and does not affect normal file sharing

2.client RPC (PORTMAP) suddenly hangs up, server side RPC (PORTMAP) is normal and does not affect normal file sharing

3.server RPC (PORTMAP) suddenly hangs up, client side RPC (PORTMAP) suddenly hangs up, does not affect the normal file sharing

4.server NFS suddenly hangs, lient-b-side RPC (PORTMAP) Normal, server side can normally access local files, client input #df-h command will appear zombie state, unable to normal file sharing


This article is from the "Crazy Days" blog, be sure to keep this source http://crazyday.blog.51cto.com/9974109/1705360

Simple summary of NFS (network file system) analog errors

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.