home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / admin / 6977 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  3.9 KB

  1. Path: sparky!uunet!paladin.american.edu!gatech!destroyer!ncar!vexcel!copper!slate!mbarkah
  2. From: mbarkah@slate.mines.colorado.edu (Ade Barkah)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: Disk quotas
  5. Message-ID: <1993Jan8.131122.5912@slate.mines.colorado.edu>
  6. Date: 8 Jan 93 13:11:22 GMT
  7. Organization: Colorado School of Mines
  8. Lines: 86
  9.  
  10. In article <1993Jan7.100012.11101@ugle.unit.no>:
  11. : The edquota starts VI and then You should write in the quotas.
  12. : You get a line like this:
  13. : fs /home blocks ( soft=0, hard=0 ) inodes ( soft=0, hard=0 )
  14. : What does it mean with soft and hard, - and what relation am I to use 
  15. : between blocks and inodes ?
  16.  
  17. The 'soft' limit is a `warning' limit. That is, the user may use
  18. more than the soft limit, but only temporarily. When a user
  19. violates this soft limit, a timer is started. If the user then
  20. reduces his/her dataspace within a certain time (usually a week,)
  21. then nothing happens. If the user still violates the soft limit
  22. after the week, then any attempt to create more data will fail.
  23. The user then needs to reduce his/her dataspace below the
  24. soft limit.
  25.  
  26. The 'hard' limit is the 'real' limit. At no time can the user
  27. have more than the hard limit.
  28.  
  29. For example, I might set up quota for user 'joe' as having a
  30. soft limit of 5000 blocks, and a hard limit of 8000 blocks.
  31. If `joe' currently has 4900 blocks, he can create up to 3100
  32. (up to the hard limit) blocks of dataspace. However, if after
  33. one week, 'joe' hasn't reduced his dataspace to below 5000,
  34. any attempt to use more space will fail.
  35.  
  36. In other words, 'joe' can create more than the soft limit for
  37. a week, but he can never have more than the hard limit.
  38.  
  39. Actually, the amount of time a user may violate the soft
  40. limit can be changed with edquota -t.
  41.  
  42. As with data blocks, the number of inodes a user can consume
  43. can also be rationed. Inodes quota also follow the "soft" and
  44. "hard" limit convention. Systems may run into problems when
  45. a large number of users have an abnormally large number of
  46. small files, since each files consume inodes. However, this
  47. situation is probably rare, and simply using the default
  48. values might be enough. If you have to set up inode quotas,
  49. then you need to find out the total number of inodes your
  50. filesystem can handle, subtract the number of inodes used
  51. by the system, then divide by the maximum number of users
  52. you may have. Personally, I don't bother. :)
  53.  
  54. To use the default values (both for the soft and hard, block
  55. and inode quotas) simply use '0' as limit (eg. soft=0.) 
  56. Consult your documentation to find out what are the default
  57. values. On my svr4 system it is defined in the /usr/include/
  58. sys/fs/ufs_quota.h or something similar.
  59.  
  60. It might be easier to make one 'template' user, say, your
  61. own account, with the appropriate quotas. Then you can
  62. `copy' or `pass-on' these quotas to other users using
  63. the -p option, which duplicates the quota for the `template'
  64. (proto) user to another user.
  65.  
  66. For example, use `edquota -t' to set the soft-limit time
  67. expiration. Then use `edquota my_login' to change your
  68. own quota. Then use 'edquota -p my_login user_login'
  69. to change user_login's quota to match yours.
  70.  
  71. I put `edquota -p my_login new_login' in a program which
  72. accepts new accounts. That way, all new accounts gets
  73. the quota. To set up quotas for existing accounts, run
  74. `edquota -p' in a shell script.
  75.  
  76. Before turning on quota on a filesystem, it is advisable
  77. to run `quotacheck.' quotacheck updates the quota file
  78. to reflect the current disk space. Also double check
  79. your documentation, since your version of Unix may work
  80. slightly differently, and more importantly, I may have
  81. forgotten something.... <smile>
  82.  
  83. Finally, since soft-limit violation are not automatically
  84. announced to users, you may want to encourage them to
  85. put the `quota -v' command (the -v checks all filesystems 
  86. with quotas) in their startup file (.login/.profile.)
  87.  
  88. Regards,
  89.  
  90. -Ade
  91. -- 
  92. Internet  : mbarkah@slate.mines.colorado.edu    (NeXT Mailable)
  93. CompuServe: 74160,3404
  94.