[보드에서 nfs 마운트가안되니다]. unbuntu nfs 설정과 보드에서 nfs 마운트 좀 도와 주세요 ㅜ_ㅜ

caeshan의 이미지

pc에서 nft설정후 임베디드 보드에서 nfs를 마운트 하면

[root@hybus nfs]# mount -t -nfs 203.250.78.206:/mnt/nfs /mnt/nfs
mount: RPC: Timed out
mount: nfsmount failed: Bad file descriptor
mount: Mounting 203.250.78.206:/mnt/nfs on /mnt/nfs failed: Invalid argument

이렇게 나오면서 마운트가 안됩니다. 왜 그런거죠??

이상한게 있다면 pc nfs 시작할때

* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "203.250.78.205:/mnt/nfs/".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[ OK ]
* Starting NFS kernel daemon
[ OK ]
[질문1] 이렇게 나왔었는데 "/etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified" 이 부분이 잘못된것인가요? 보드에서 nfs mount하는 법좀 가르쳐 주세요 !!

질문[2] "/etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified" 이 경고 왜뜨죠 그냥 무시해되 되는건가요?

이해를 돕기 위해 아래에 제가 pc랑 보드에 입력 했던거랑 결과 정리 해놓았습니다.

----------------------------pc 설정 및 실행 과정 ---------------------------------
1- 일단 nfs-kernel-server 설치 했고 /mnt/nfs 도 만들어 주었습니다.

2- /etc/exports에 설정도 이렇게 했습니다.
/mnt/nfs 203.250.78.205(rw,no_root_squash,no_all_squash,async)
#pc 주소는 203.250.78.206

3- $ sudo /etc/init.d/nfs-kernel-server restart <-- 이거 실행하니 이렇게 됩니다.

* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "203.250.78.205:/mnt/nfs/".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[ OK ]
* Starting NFS kernel daemon [ OK ]

4.$ sudo exportfs -r 이거 실행 시켰고요

--------------------------------------------------------------------------------------------
--------------------------------보드 설정 및 실행 과정---------------------------------------------

*보도에 /mnt/nfs 를 만들어 놓았습니다.
1. ifconfig eth0 203.250.78.205 설정후 ifconfig 로 ip확인 했고요

2. ping 203.250.78.206 으로 핑 확인해보니 연결은 되어있습니다.

[root@hybus ~]# ping 203.250.78.206
PING 203.250.78.206 (203.250.78.206): 56 data bytes
64 bytes from 203.250.78.206: icmp_seq=0 ttl=64 time=0.6 ms
64 bytes from 203.250.78.206: icmp_seq=1 ttl=64 time=0.6 ms

--- 203.250.78.206 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.6/0.6/0.6 ms

3. portmapt
4. ps aux | grep portmap

[root@hybus ~]# portmap
[root@hybus ~]# ps aux | grep portmap
805 rpc 600 S portmap
893 root 428 S grep portmap

5. mount -t -nfs 203.250.78.206:/mnt/nfs /mnt/nfs 입력하면 이렇게 안됩니다.

[root@hybus nfs]# mount -t -nfs 203.250.78.206:/mnt/nfs /mnt/nfs
mount: RPC: Timed out
mount: nfsmount failed: Bad file descriptor
mount: Mounting 203.250.78.206:/mnt/nfs on /mnt/nfs failed: Invalid argument

vamf12의 이미지

rpc 서비스가 없는것 같습니다.
NFS는 2가지(실제로는 3가지) 서비스를 바탕으로 실행됩니다.
1. rpc
2. nfsd
nfsd야 당연히 nfs데몬이구요. rpc는 remote procedure call 입니다. 윈도우에 에서는 rpc가 독립적으로 동작하지만, 유닉스(리눅스)에서는 portmapper의 도움을 받아서 동작합니다.

그래서 rpc timeout 이 뜨셨으니, 일단 rpc가 제대로 동작하는지 우선 살펴 봐야 할겁니다.

* Exporting directories for NFS kernel daemon... exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "203.250.78.205:/mnt/nfs/".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x

이부분은 적혀 말 그대로 입니다. 'subtree_check'와 'no_subtree_check'가 둘중하나는 옵션에 들어 가야 하는데, 없는 관계로 기본값(no_subtree_check)를 적용한다는 이야기 입니다.

subtree_check는 NFS가 요청하는 파일 핸들이 export영역에 속하는지 확인 하는 겁니다. 특별하게 외부에서 nfs취약점을 이용하는 공격이 들어 오지 않으면 쓸모 없습니다. (파일의 위치가 바꿔었을때 이것 때문에 깨지기도 합니다. -_-)

쓸데없는 잔소리를 더 붙이면, 네이버에서 nfs rpc timeout 으로 하면 똑같은 내용이 넘처나는 군요... 한번쯤 검색을 합시다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.