home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / aix / 13005 < prev    next >
Encoding:
Text File  |  1993-01-05  |  4.5 KB  |  88 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!cs.utexas.edu!torn!csd.unb.ca!dedourek
  3. From: dedourek@jupiter.sun.csd.unb.ca (John DeDourek)
  4. Subject: Re: NFS write error intrepretation
  5. Message-ID: <1993Jan5.153622.25957@jupiter.sun.csd.unb.ca>
  6. Summary: NFS write error interp. and print service on diskless client
  7. Keywords: NFS write error diskless client printing
  8. Sender: dedourek@jupiter.sun.csd.unb.ca
  9. Organization: University of New Brunswick
  10. References: <1993Jan4.131704.86@rcwusr>
  11. Date: Tue, 5 Jan 1993 15:36:22 GMT
  12. Lines: 74
  13.  
  14. In article <1993Jan4.131704.86@rcwusr> jenkinsonjp@rcwusr.bp.com (John P. Jenkinson) writes:
  15. >we get several NFS write errors on our consoles every day in the format
  16. >nfs write error ___ on host ___ ___ ___ ___ ___ ___ ___
  17. >typically the error is 13 (permission) so i know it is benign but some time
  18. >ago in this conference i saw an explanation of how to intrepret the other
  19. >numbers to get the major,minor numbers, the inode, etc to find out why. 
  20. >when i used this posting to intrepret ours, the numbers didn't make sense.
  21. >this is a Sun 690 as the NFS server. can't find this in info, techlib and
  22. >IBM tech support is making this a problem. i just want the how to on
  23. >how to intrepret these numbers. if you know, please reply. thanks.
  24.  
  25.  
  26. The following is the technique I used with errors on a RS/6000 client
  27. to an RS/6000 server.  Can't tell whether this applies to SUN server.
  28.  
  29. There are eight numbers in the message.  Each is an 8 digit hex number
  30. with leading zeroes suppressed.  You are interested in the first and
  31. the fourth number.  Extend these numbers to 8 digits by prepending
  32. leading zeroes.  The first number has the "major,minor" numbers of
  33. the "logical disk" holding the file system on the SERVER, in the
  34. left and right 16 bits (left and right 4 hex digits).  These
  35. correspond to the "major,minor" numbers of the "block special device"
  36. holding the file system with the offending file.  This is located
  37. by doing an "ls -l" on the SERVER in the /dev directory, or one
  38. of its subdirectories (depending on how your server is organized)
  39. and looking for entries with a leading "b" (maybe the SUN is different)
  40. and locating the one which has matching major, minor numbers.
  41. WARNING: the major,minor numbers in the NFS error are HEX, and
  42. those in the "ls -l" are decimal, so you have to convert.
  43.  
  44. Next you must locate the directory over which that file system is
  45. mounted.  (Try the mount command to display this).
  46.  
  47. Now, the fourth number in the NFS error contains the inode number
  48. in the file system in the leftmost 16 bits (4 hex digits).  Locate
  49. this inode using find on the SERVER, e.g. on an RS/6000
  50.     find  /mnt-point  -inum  decimalnumber -xdev -print
  51. You will need the equivalent on the Sun server. Here, /mnt-point
  52. is where the partition is mounted, decimalnumber is the inode
  53. number, and the -xdev option restricts find to search within
  54. only the one file system.
  55.  
  56. As a further note, I suspect that a lot of the NFS write 13 errors
  57. are due to the following problem.  Under Unix, there are a lot
  58. of "set uid to root" programs which work something like this:
  59. User smith runs the program.  The program starts as root, so
  60. it has full access.  The program opens a log file for writing
  61. stuff, which file is only writeable by root.  The program then
  62. switches to run with access permissions of smith, this to process
  63. the files which smith has supplied as parameters without laboriously
  64. checking that smith him/herself really has access to the files
  65. supplied as parameters.  Works fine on a diskful system.
  66.  
  67. Now put the program on a diskless client.  The log file is remotely
  68. mounted from the server using NFS.  NFS is a "stateless" system, i.e.
  69. it doesn't remember the open, but the daemons go after the 
  70. appropriate block every time a request comes.  Obviously the daemons
  71. must be privileged to get everything, so they check the access
  72. authority with EVERY REQUEST WHICH COMES IN.  Now the write
  73. requests come in after the program on the client has switched to
  74. smith, and smith doesn't have access to write to the log file.
  75. SO NFS WRITE ERROR 13.
  76.  
  77. In our case, the problem which I debugged involved running a printer
  78. on one of the diskless clients, and allowing it to act as a server
  79. to the network.  The print spooler runs non-privileged after apparently
  80. opening a status file, to which it writes the "per cent completed."
  81. Penalty: on a long print job, the various queue status displays, e.g. lpq,
  82. or qchk, won't show percent completed.  But you get NFS WRITE ERROR 13
  83. messages on the console of the client.
  84.  
  85. There is a PTF available for the print spooler.
  86.  
  87. dedourek@jupiter.sun.csd.unb.ca
  88.