그런데 학교에서는 110번 포트로 나가는 패킷이 차단되어서 이 방법으로는 NFS를 사용하지 못한다.
그 대안으로 portmapper에 접속하지 않고, 바로 NFS 포트를 명시해서 마운트하는 방법이 있다. 그래서 NFS4도 사용할 겸 아래와 같이 마운트를 시도 했는데 계속 파일을 찾지 못하다는 에러가 발생한다. 참고로 서버의 exports 파일은 정상적으로 잘 되어있다.
superkkt@superkkt-143$ sudo mount -t nfs4 -o proto=tcp,port=2049 111.111.111.111:/data/images /mnt
mount.nfs4: mounting 111.111.111.111:/data/images failed, reason given by server:
No such file or directory
mount.nfs4: mounting 111.111.111.111:/data/images failed, reason given by server:
No such file or directory
원인은 NFS4로 넘어오면서 달라진 내용들 때문이다. 우선 fsid=-0 옵션이 exports 파일에 명시되어 있어야 하고, 클라이언트에서 마운트 할 때 export된 디렉토리가 아니라 '/' 디렉토리로 지정해서 마운트해야 한다.
자세한 내용은 여기를 참조하고, 아래는 관련 내용만 발췌한 것이다.
Hi,
I could suceed in configuring nfsv4 server.
the importent thing with nfsv4 server is you need to put fsid=0 option with the exports.
for example: (in /etc/exports)
/home/data *(ro,fsid=0)
if you do not use fsid=0 option you will get the
"mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory "
error
refer the manual page
# man 5 exports
which say that
Quote:
The value 0 has a special meaning when use with NFSv4. NFSv4
has a concept of a root of the overall exported filesystem. The
export point exported with fsid=0 will be used as this root.
If I have to make a correction in the /etc/exports file you have posted it would be as bellow
[root@homepc ~]# cat /etc/exports
Quote:
/export 127.0.0.1(ro,fsid=0) 192.168.1.2(ro,fsid=0) 192.168.1.3(ro,fsid=0)
and while mounting the nfs share observer the folliwing
# mount -t nfs4 <serverip>:/ /mount/point
not mount -t nfs4 <serverip>:/exports /mount/point
I could suceed in configuring nfsv4 server.
the importent thing with nfsv4 server is you need to put fsid=0 option with the exports.
for example: (in /etc/exports)
/home/data *(ro,fsid=0)
if you do not use fsid=0 option you will get the
"mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory "
error
refer the manual page
# man 5 exports
which say that
Quote:
The value 0 has a special meaning when use with NFSv4. NFSv4
has a concept of a root of the overall exported filesystem. The
export point exported with fsid=0 will be used as this root.
If I have to make a correction in the /etc/exports file you have posted it would be as bellow
[root@homepc ~]# cat /etc/exports
Quote:
/export 127.0.0.1(ro,fsid=0) 192.168.1.2(ro,fsid=0) 192.168.1.3(ro,fsid=0)
and while mounting the nfs share observer the folliwing
# mount -t nfs4 <serverip>:/ /mount/point
not mount -t nfs4 <serverip>:/exports /mount/point

comments
comments rss (+댓글 쓰러가기)