[TUHS] Quotas - did anyone ever use them?

reed at reedmedia.net reed at reedmedia.net
Sat Jun 1 10:30:13 AEST 2019


(Sharing some from my book in regards to at Berkeley slowly being 
written ... some questions below too.)

% prior to March 19, 1976 \cite{unix-news-19760319}
In addition to teaching and writing Unix Pascal, Thompson
coded or advised on various other system modifications.
He put in disk space quotas to prevent runaways.\cite{kenthompson1}
% (inode.flags & 060000) == 020000
A special file named ``.q'' would track (in its inode) the
maximum number of blocks that may be used by files in the
directory and its descendents and a count of the number of used blocks.
A new ``quot'' system call was added to make directories with
quotas.
In addition, a modified link(2) allowed quotas to be exceeded 
temporarily
so a move/rename operation could work on a near full
quota.\cite{unix-news-19760319}

% NOTE: cptree source for system call use example

% I cannot find this quot program 

A new quot command was used to define the quotas.
% CITE:
Later, Kurt Shoens, a student in Thompson's
operating systems course\cite{arnold1}, wrote a tool called pq that 
would
search up from your current working directory to find the nearest quota 
file
and display what is used, the defined maximum quota, and its percentage 
used.
% CITE: pq manpage and source
Also a custom ls command identified if an entry was a quota file,
file command could identify quota files,
ex could warn if the ``Quota exceeded'',
and cptree and lntree could copy quota files, 

This quotas implementation was not integrated back into Unix.  So
back to ``threatening messages of the day and personal letters.''
Also a different quot tool was added a couple years later in the
Seventh Edition of Unix (and also shipped with later BSDs) to
display (but not restrict) the disk usage for each
user.\cite{ritchie-7th-edition-setting-up}
(A new quotas implementation was written and introduced to
Berkeley years later. This story is in \autoref{chapter:4BSD}.)

---------------

At first I thought that a side-effect of quotas was that users couldn't 
chown files to others, but wrong since already is documented that chown 
is for super-user only in V6. Any thoughts on that?

What is the unused pw_quota in v7 getpwent? Is that related at all to 
disk quotas.





More information about the TUHS mailing list