주 메뉴 열기

wwiki β

바뀜

NFS

575 바이트 추가됨, 2022년 4월 10일 (일) 08:55
mount하기
== NFS client ==
 
=== 설치 ===
$ apt-get install nfs-common
 
=== 공유폴더 확인 ===
다음 명령으로 nfs서버의 공유폴더를 확인할 수 있다.
$ showmount --exports [nfs 서버 아이피]
 
==== 위치 ====
/sbin/showmount
 
==== 사용법 ====
Usage: /sbin/showmount [-adehv]
 
[--all] [--directories] [--exports]
 
[--no-headers] [--help] [--version] [host]
 
=== 마운트 ===
[[mount]]명령으로 마운트할 수 있다. uid와 gid에 대한 옵션은 서버와 클라이언트 버전이 낮은 경우 적용이 되지 않는다. 서버의 옵션으로 설정할 수 있다.
$ mount --types nfs --options uid=1000,gid=1000,rw 192.168.0.256:/export /export
/etc/[[fstab]]파일을 편집하여 자동마운트 시킬 수 있다.
client가 root면 server에도 root로 접근하게 함. 신뢰할 수 있는 사람에게만 허용하는 것이 좋다.
 
===== all_squash =====
모든 uid와 gid를 익명유저 매핑한다.
 
===== anonuid and anongid =====
익명 계정의 uid,gid를 명시적으로 설정한다.
all_squash,anonuid=xxx,anongid=yyy
=== 서비스 ===
$ systemctl status nfs-server.service
"A dependency job for nfs-server.service failed."에러가 날 때는 재부팅하거나 서비스파일(/lib/systemd/system/nfs-server.service)에서 의존성 항목을 체크한다.
 
== [[mount]]하기 ==
 
=== /sbin/showmount ===
Usage: /sbin/showmount [-adehv]
 
[--all] [--directories] [--exports]
 
[--no-headers] [--help] [--version] [host]
 
다음 명령으로 nfs서버의 공유폴더를 확인할 수 있다.
$ showmount --exports [nfs 서버 아이피]
[[분류:파일]]
[[분류:네트워크]]
[[분류:프로토콜]]
편집
2,431