특정 IP 또는 호스트에 대한 NFS 공유 액세스를 제한하고 다른 IP 또는 호스트의 사용을 제한합니다.

특정 IP 또는 호스트에 대한 NFS 공유 액세스를 제한하고 다른 IP 또는 호스트의 사용을 제한합니다.

공유 폴더를 만들었습니다/data01/공유Suse Gnu/Linux 항목도 호스트(클라이언트) 시스템에 대해 생성되었습니다./etc/export /data01/share 10.241.200.53 (읽기-쓰기, 동기화, no_root_squash, no_subtree_check). 그런데 이걸 받고 나니파일 시스템 내보내기 -a

exportfs: No options for /data01/share  10.241.200.53(rw,sync,no_root_squash,no_subtree_check) : suggest (sync) to avoid warning
exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export ":/data01/share  10.241.200.53(rw,sync,no_root_squash,no_subtree_check)".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: Failed to stat /data01/share  10.241.200.53(rw,sync,no_root_squash,no_subtree_check): No such file or directory

cat/etc/os-release

NAME="SLES"
VERSION="12-SP3"
VERSION_ID="12.3"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp3"

systemctl 상태 nfs-server.service

nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/nfs-server.service.d
           └─nfsserver.conf
        /run/systemd/generator/nfs-server.service.d
           └─order-with-mounts.conf
   Active: active (exited) since Wed 2019-07-24 02:32:03 EDT; 2h 34min ago
 Main PID: 2562 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)
   CGroup: /system.slice/nfs-server.service

Jul 24 02:32:03 OPT001CORE0002 systemd[1]: Starting NFS server and services...
Jul 24 02:32:03 OPT001CORE0002 systemd[1]: Started NFS server and services.

고양이/등/수출

# See the exports(5) manpage for a description of the syntax of this file.
# This file contains a list of all directories that are to be exported to
# other computers via NFS (Network File System).
# This file used by rpc.nfsd and rpc.mountd. See their manpages for details
# on how make changes in this file effective.

/data01/share  10.241.200.53(rw,sync,no_root_squash,no_subtree_check)

ls -la /data01/share

total 0
drwxrwxrwx 4 acmuser acmgrp 36 Jul 24 04:18 .
drwxr-xr-x 6 acmuser acmgrp 65 Jul 24 04:16 ..
drwxrwxrwx 3 acmuser acmgrp 18 Jul 24 04:18 support
drwxrwxrwx 5 acmuser acmgrp 45 Jul 24 04:17 upgrade

답변1

다음과 같이 /etc/exports에 subtree_check 옵션을 추가하기만 하면 됩니다.

# cat /etc/exports
/views_raw      10.143.3.44(rw,sync,no_root_squash,subtree_check)

NFS 서비스 다시 시작

# systemctl restart nfs-server
# exportfs -av

관련 정보