nfs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. .TH NFS 4
  2. .SH NAME
  3. nfs \- Sun network file system client
  4. .SH SYNOPSIS
  5. .B nfs
  6. [
  7. .B -DRv
  8. ]
  9. [
  10. .B -p
  11. .I perm
  12. ]
  13. [
  14. .B -s
  15. .I srvname
  16. ]
  17. [
  18. .B -u
  19. .I passwd
  20. .I group
  21. ]
  22. .I addr1
  23. [
  24. .I addr2
  25. ]
  26. .PP
  27. .B aux/portmap
  28. [
  29. .B -R
  30. ]
  31. .I host
  32. .I cmd
  33. ...
  34. .PP
  35. .B aux/nfsmonut
  36. [
  37. .B -R
  38. ]
  39. .I host
  40. .I cmd
  41. ...
  42. .SH DESCRIPTION
  43. .I Nfs
  44. translates between the Sun network file system protocol (NFS)
  45. and 9P, allowing 9P clients to mount file systems on NFS servers.
  46. NFS servers comprise two separate services: a mount service used to
  47. obtain the initial file handle, and a file service used to perform
  48. actual file system operations.
  49. The Sun port mapper service is typically used to find these two services.
  50. If one address is given, it is taken to be the address of a port mapper service;
  51. .I nfs
  52. queries the port mapper to find the addresses
  53. of the NFS mount service and file service.
  54. If two addresses are given, the port mapper is bypasswd;
  55. .I addr1
  56. is used as the address of the NFS mount service,
  57. and
  58. .I addr2
  59. is used as the address of the file service.
  60. .PP
  61. The options are:
  62. .TP
  63. .B -D
  64. print all 9P messages.
  65. .TP
  66. .B -R
  67. print all NFS messages.
  68. .TP
  69. .B -v
  70. print verbose information about session startup.
  71. .TP
  72. .B -p \fIperm
  73. set the posted service file to have mode
  74. .IR perm ,
  75. which is assumed to be octal;
  76. the default is
  77. .BR 600 .
  78. .TP
  79. .B -s \fIsrvname
  80. post the service as
  81. .BI /srv/ srvname \fR;
  82. the default is
  83. .BI /srv/ addr1 \fR.
  84. .TP
  85. .B -u \fIpasswd\fR \fIgroup
  86. translate user and group names using the
  87. .I passwd
  88. and
  89. .I group
  90. files, which are in the traditional Unix format.
  91. The translation is used to present names for
  92. user and group in
  93. .IR stat (5)
  94. and
  95. .I wstat
  96. messages.
  97. The translation is also used to
  98. choose the user and group credentials
  99. to present for a user.
  100. Without this option, users and groups are presented
  101. as decimal numbers, and everyone attaches as uid \-1
  102. .RB ( nobody
  103. on most Unix systems).
  104. .PD
  105. .I Portmap
  106. and
  107. .I nfsmount
  108. are test programs to perform port mapper and NFS mount RPCs.
  109. Run
  110. .B aux/portmap
  111. .B -?
  112. and
  113. .B aux/nfsmount
  114. .B -?
  115. for lists of commands.
  116. .SH EXAMPLE
  117. We use this in our
  118. .B /rc/bin/9fs
  119. script to mount all the home directories served by
  120. .IR bopp :
  121. .IP
  122. .EX
  123. case bopp
  124. if(! test -f /srv/bopp)
  125. nfs -p 666 -u /lib/ndb/1127.passwd /lib/ndb/1127.group bopp
  126. unmount /n/bopp >[2]/dev/null
  127. for(i in u0 u1 u2 u3 u4 u5 u6 u7 u8 u9)
  128. mount -a /srv/bopp /n/bopp /$i
  129. .EE
  130. .SH SOURCE
  131. .B /sys/src/cmd/nfs.c
  132. .br
  133. .B /sys/src/libsunrpc
  134. .SH "SEE ALSO
  135. .IR nfsserver (8),
  136. .IR srv (4)
  137. .SH BUGS
  138. The authentication employed by NFS is laughable.
  139. The server simply trusts the uid, gid, and group list
  140. presented by the client.
  141. .PP
  142. .I Nfs
  143. speaks only NFS version 3.
  144. Older operating systems typically
  145. have reasonable NFS version 2 servers
  146. but crash when serving version 3.