NFS 마운트에서 "터치" 작업 중 중단됨

NFS 마운트에서 "터치" 작업 중 중단됨

두 개의 NFS 클라이언트가 설치되어 있습니다.파일 관리자 열기2.99 NFS 공유는 192.0.2.3에 있습니다.

  • 192.0.2.1 192.0.2.3:/mnt/nfs01/volnfs01/share01설치rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,noacl,nocto,tcp,nfsvers=3
  • 192.0.2.1 192.0.2.3:/mnt/nfs01/volnfs01/share02설치rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,nfsvers=3,tcp,noacl,nocto
  • 192.0.2.2 192.0.2.3:/mnt/nfs01/volnfs01/share02설치rw,noatime,nodiratime,hard,rsize=32768,wsize=32768,nfsvers=3,tcp,noacl,nocto

touch부서진

내 문제는 192.0.2.2의 NFS 마운트입니다. 해당 설치 파일을 터치하면 프로세스가 무기한 중단됩니다... strace touch /mnt/share02/this지금까지 사용하고 얻었습니다...

rt_sigaction(SIGRTMIN, {0x3b71c05ae0, [], SA_RESTORER|SA_SIGINFO, 0x3b71c0f500}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x3b71c05b70, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x3b71c0f500}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0)                                  = 0xafb000
brk(0xb1c000)                           = 0xb1c000
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=99158576, ...}) = 0
mmap(NULL, 99158576, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fce244c0000
close(3)                                = 0
open("/mnt/share02/this", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666
                                                                    ^^^ stops touching
                                                                     |
                                                                     |

다른 터미널에서 확인해 보니 ps -elf프로세스가 "D" 상태인 것을 알 수 있습니다.

[mpenning@host192_0_2_2 ~]$ ps -elf | awk '$2=="D"'
0 D mpenning  8157  8032  0  80   0 - 26293 rpc_wa 09:59 pts/2    00:00:00 touch /mnt/share02/this
[mpenning@host192_0_2_2 ~]$

showmount아무런 문제가 발견되지 않았지만..

[mpenning@host192_0_2_2 ~]$ showmount -e 192.0.2.3
Export list for 192.0.2.3:
/mnt/nfs01/volnfs01/share01 192.0.2.2/255.255.255.255,192.0.2.1/255.255.255.255
/mnt/nfs01/volnfs01/share02 192.0.2.2/255.255.255.255,192.0.2.1/255.255.255.255
[mpenning@host192_0_2_2 ~]$

NFS 서비스의 다양한 상태...

[mpenning@host192_0_2_2 ~]$ service nfs status
rpc.svcgssd is stopped
rpc.mountd (pid 9168) is running...
nfsd (pid 9232 9231 9230 9229 9228 9227 9226 9225) is running...
rpc.rquotad (pid 9164) is running...
[mpenning@host192_0_2_2 ~]$ service rpcbind status
rpcbind (pid  9088) is running...
[mpenning@host192_0_2_2 ~]$ service nfslock status
rpc.statd (pid  9256) is running...
[mpenning@host192_0_2_2 ~]$

네트워크 구성(전용 레이어 2 NFS VLAN이므로 기본 게이트웨이가 필요하지 않음):

[mpenning@host192_0_2_2 ~]$ sudo cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.0.2.2
NETMASK=255.255.255.0
DNS2=none
TYPE=Ethernet
GATEWAY=
DNS1=none
IPV6INIT=no
USERCTL=no
MTU=9000
[mpenning@host192_0_2_2 ~]$

이것은 매우 짜증나는 것 같습니다. 192.0.2.2에서 다음을 수행했습니다.

  • 모든 NFS를 다시 시작
  • init 6기계
  • ping 192.0.2.3서버에 계속 연결할 수 있는지 확인하세요.
  • dmesg를 확인했습니다.
  • 확인됨showmount -e 192.0.2.3

권한 문제인 것 같지만 여기서 어디로 가야 할지 모르겠습니다...

192.0.2.2 마운트에서 모든 파일을 읽고 쓸 수 있도록 이 문제를 어떻게 해결합니까 192.0.2.3:/mnt/nfs01/volnfs01/share02?


touch일하다

touch192.0.2.1에서 동일한 명령을 실행 하면 모든 것이 정상입니다...

rt_sigaction(SIGRTMIN, {0xb096e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb09b80, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="host192_0_2_1.localdomain.local", ...}) = 0
brk(0)                                  = 0x8d4d000
brk(0x8d6e000)                          = 0x8d6e000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=99158544, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7574000
close(3)                                = 0
open("/mnt/share02/this", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK|O_LARGEFILE, 0666) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
utimensat(0, NULL, NULL, 0)             = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?

/etc/exports192.0.2.3부터

[root@T1-Netfile01 backups]# head /etc/exports

# PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
#       This configuration file was autogenerated
#       by Openfiler. Any manual changes will be overwritten
#       Generated at: Fri Nov 8 9:35:39 CST 2013

/mnt/nfs01/volnfs01/share02 192.0.2.1/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)

/mnt/nfs01/volnfs01/share01 192.0.2.1/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/255.255.255.255(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)

[root@T1-Netfile01 backups]#

답변1

파일의 IP 순서를 변경하면 /etc/exports어떻게 되나요 ? .2.2 IP를 첫 번째로 설정하고 .2.1을 두 번째로 설정합니다.

또한 다음을 사용하여 내보낸 콘텐츠를 확인합니다.

$ showmount -e 192.0.2.3

/etc/exports형식은 매우 특별하다고 할 수 있습니다!

기타 시도해볼 사항

  1. 나는 보통 다음과 같이 호스트를 지정합니다 /etc/exports.

    /cobbler/isos   192.168.1.0/24(rw,no_root_squash)
    

    따라서 호스트 IP가 하나만 있는 경우:

    /mnt/nfs01/volnfs01/share02 192.0.2.1/32(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/32(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)
    /mnt/nfs01/volnfs01/share01 192.0.2.1/32(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)  192.0.2.2/32(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,sync)
    
  2. nfs 관련 서비스

    nfslock이 서비스 및 기타 관련 서비스가 192.0.2.2에서 실행되고 있는지 확인하세요 .

  3. ping -s <jumbo_mtu> 192.0.2.3점보 프레임을 사용하는 경우 192.0.2.2에서 작동하는지 확인하세요.

관련 정보