mount.nfs: Ubuntu Machine에 마운트하는 동안 서버에서 액세스가 거부되었습니까?

mount.nfs: Ubuntu Machine에 마운트하는 동안 서버에서 액세스가 거부되었습니까?

나는 세 대의 기계를 가지고 있습니다 -

machineA    10.108.24.132
machineB    10.108.24.133
machineC    10.108.24.134

그 모든 머신에는 Ubuntu 12.04가 설치되어 있고 저는 그 세 머신 모두에 대한 루트 액세스 권한을 갖고 있습니다.

이제 위의 기계에서 아래 작업을 수행해야 합니다.

Create mount point /opt/exhibitor/conf
Mount the directory in all servers.
 sudo mount <NFS-SERVER>:/opt/exhibitor/conf /opt/exhibitor/conf/

/opt/exhibitor/conf위에서 언급한 대로 세 컴퓨터 모두에 이미 디렉터리를 만들었습니다 .

이제 저는 세 머신 모두에 마운트 지점을 생성하려고 합니다. 그래서 저는 아래 과정을 따랐습니다.

NFS 지원 파일 및 NFS 커널 서버 설치

$ sudo apt-get install nfs-common nfs-kernel-server

공유 디렉터리 생성

$ mkdir /opt/exhibitor/conf/

/etc/exports를 편집하고 다음과 같은 항목을 추가했습니다.

# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/opt/exhibitor/conf/     10.108.24.*(rw)

내보내기 실행

root@machineA:/# exportfs -rv
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "10.108.24.*:/opt/exhibitor/conf/".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exporting 10.108.24.*:/opt/exhibitor/conf

이제 내가 showmount그랬어machineA

root@machineA:/# showmount -e 10.108.24.132
Export list for 10.108.24.132:
/opt/exhibitor/conf 10.108.24.*

이제 이 작업을 수행하면 오류가 발생합니다.

root@machineA:/# sudo mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf/
mount.nfs: access denied by server while mounting 10.108.24.132:/opt/exhibitor/conf

내가 여기서 뭘 잘못하고 있는지 아시나요?

답변1

/etc/export를 다음에서 변경하세요.

/opt/exhibitor/conf/     10.108.24.*(rw)

에게

/opt/exhibitor/conf/     10.108.24.0/24(rw)

답변2

동일한 서버에서 NFS 마운트를 수행하려는 것 같습니다.

root@machineA:/# sudo mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf/

MachineA는10.108.24.132

시도해 보았 니?

root@machineB:/# mkdir -p /opt/exhibitor/conf
root@machineB:/# sudo mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf/

그리고 machineC에서는

root@machineC:/# mkdir -p /opt/exhibitor/conf
root@machineC:/# sudo mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf/

machineA에서 수행할 수 있지만 마운트 지점으로 다른 디렉터리를 사용하면 됩니다.

root@machineA:/# mkdir -p /opt/exhibitor/conf2
root@machineA:/# sudo mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf2/

답변3

그 전에는 영어가 너무 서툴어서 미안해요. 하지만 최대한 잘 쓰도록 노력하겠습니다.

마운트하는 동안 사용자 이름과 비밀번호를 설정해야 할 것 같아요.

mount -t nfs 10.108.24.132:/opt/exhibitor/conf /opt/exhibitor/conf/ -o username=USERNAME,password=PASSWORD 

나는 nfs를 시도한 적이 없으며 내 컴퓨터에서 삼바를 사용하고 있습니다. Samba에서는 Samba 사용자에 Linux 사용자를 추가해야 합니다.

smbpasswd -a username

아마도 nfs에서도 같은 경우 일 것입니다.

관련 정보