문서의 이전 판입니다!
rpc.mountd | NFS 클라이언트가 마운트를 요청하면 이 데몬프로세스가 /etc/export 파일설정에 따라 마운트 요청을 처리한다. |
---|---|
rpc.nfsd | rpc.mountd 에 의해 마운트된 디렉토리에 대해 읽고,쓰는 작업들을 처리해주는 데몬프로세스이다. |
rpc.rquotad | NFS 파일시스템을 마운트한 로컬 사용자에 대해 quota를 처리한다. |
rpc.lockd | 파일 잠금을 통해 여러 사용자가 한 파일을 수정하는것을 방지한다. |
rpc.statd | rpc.lockd와 함께 사용되며 파일 잠금의 해제와 복구를 담당한다. |
share-directory client1(options,,,) client2(options,,,)
share-directory | 공유할 디렉토리명 |
client1 | 공유 디렉토리에 접근할수 있도록 허용된 호스트들 |
options | 접근 권한설정 옵션 ro : 클라이언트는 공유 디렉토리에 대해 읽기만 가능하다. rw : 클라이언트는 공유 디렉토리에 대해 읽기/쓰기가 가능하다. no_root_squash : 클라이언트의 root는 서버의 root와 같은 권한을 가진다. No_subtree_check : 공유된 디렉토리내에 있는 서브 디렉토리들을 공유에서 제외 시키는 경우 설정한다. |
# cat /etc/exports /home/group01 *.adminschool.net(ro) /export/pub 192.168.1.1/255.255.255.0(ro) / banana(rw),kiwi(rw,no_root_squash)
# exportfs -v
# exportfs -ar
# nfsstat
# /etc/init.d/nfs-kernel-server start # /etc/init.d/nfs-common start # /etc/init.d/portmap start
# /etc/init.d/portmap stop # /etc/init.d/nfs-common stop # /etc/init.d/nfs-kernel-server stop
# ps -ef | grep portmap | grep -v grep daemon 2127 1 0 Sep20 ? 00:00:00 /sbin/portmap # /etc/init.d/nfs-common status rpc.statd running # /etc/init.d/nfs-kernel-server status nfsd running
# mount -t nfs nfs_server_host:/export/pub /shared/pub <code> - 마운트 실행시 사용할수 있는 옵션들 ^ -o timeo=10 | NFS 서버와 연결이 끊어진 경우 timeo에서 지정한시간(1/10초단위) 기다렸다가 경고 메시지를 발생 | ^ -o rsize=1024 wsize=1024 | 읽고/쓰기 버퍼의 크기를 설정한다.(1024KB=1M) | ^ -o soft | remote mount를 실행할 때 성공하지 못하면 timeo 까지만 retry 후 에러 메시지를 발생하고 종료 | ^ -o hard | remote mount가 성공할 때 까지 무한시 재시도한다. (디폴트값이다) | ^ -o bg | 첫번째 마운트 시도가 실패인경우 백그라운드로 계속 마운트를 재시도한다. | ==== 부팅시 자동마운트설정 ==== - 시스템 부팅시 자동으로 서버의 파일시스템을 마운트하도록 설정한다. - /etc/fstab 파일로부터 읽어들여서 자동으로 마운트한다. <code> # cat /etc/fstab nfs_server_host:/export/pub /shared/pub nfs defaults