EECS Instructional Support, University of California at Berkeley
[ ISG home page ] [ who we are ] [ send us email ] [ search ] [ FAQ ]

                     University of California at Berkeley
           Department of Electrical Engineering & Computer Sciences
		       EECS Instructional Support Group

						                  Feb 24, 2017
/share/b/pub/disk.quotas

CONTENTS:
	Disk Quotas for Instructional Accounts (UNIX & Windows)
	Extra disk space if you need it	(UNIX & Windows)
	Can't Login?  Symptoms of exeeding your quota (UNIX & Windows)
	How to get logged to reduce your disk usage (UNIX & Windows)
	How can I find what to delete? (UNIX & Windows)
	WARNING! You can lose files (UNIX)
	"Quota" vs "du"	(UNIX)
	Counting in "blocks" or "kilobytes"? (UNIX)
	Using USB drives on our workstations
	Why is disk space so limited?


Disk Quotas for Instructional Accounts (UNIX & Windows)
-------------------------------------------------------
 -> UNIX accounts:
    There is typically a disk usage limit ("disk quota") set on the accounts  
    on EECS Instructional UNIX computers.   This policy is necessary because
    of our limited disk space and the need to distribute the usage fairly.

    Type /share/b/bin/iquota on our UNIX systems for a summary of your usage.
    The quota is typically 4GB.  If you exceed your quota, you cannot write 
    any more files until you reduce your disk usage.  
  
    The command "quota -v" or "quota -vAw" will display your disk quota 
    information, including the hostname of the file server that holds your 
    home directory.   
  
 -> Windows accounts:
    Windows accounts in the EECS domain are given disk quotas that vary
    by class.  You can find your Windows quota by right clicking your home 
    directory and selecting "Properties".


Extra disk space if you need it	(UNIX & Windows)
------------------------------------------------

  Our accounts have a disk usage limit, typically 4GB.  The data in your 
  home directory is backed up daily and lasts as long as you have the 
  account.
  
  You can also obtain temporary extra disk space (20GB).  It is not backed 
  up, and it is deleted after the end of the current semester.

  To create an extra directory for yourself, login to the WebAcct service at 
  http://inst.eecs.berkeley.edu/webacct and click on the "Account Details" 
  or "Make /home/tmp Directory" buttons.  

  The directory is created in /home/tmp/$USER on the UNIX systems and 
  is also accessible from your matching Windows account, if you were issued 
  one, as \\napinst\tmp\$USER.  It appears as your Windows P: drive.

  You may also want to create a sym link to your new /home/tmp directory on
  UNIX.  Here is the UNIX command to create a link called 'tmp':

	ln -s /home/tmp/$USER tmp
  
  
Can't Login?  Symptoms of exeeding your quota (UNIX & Windows)
--------------------------------------------------------------

 -> UNIX accounts:
    You type your login and password, the login window goes away, it appears 
    that you are getting logged in but after a few seconds the login window 
    just reappears.  You may see the message "NFS3 write error".

    Also, you can still login to your account from over the net.  

    This a problem occurs when you login at a graphics console in our lab.
    The XWwindow manager (Gnome, CDE, etc), requires disk space whrn you 
    login, so when the quota is exceeded that fails.  If you login to the
    same computer from another account using ssh (or Putty on Windows), 
    you can get in despite being over quota.  Then you can delete old files.

 -> Windows accounts:
    You get error messages pop up that say something like "you can't use 
    NT5 permissions on this filesystem". 

    The missing or useless error messages are caused by essentially the same 
    problem on UNIX and Windows: the file access software does not interpret 
    the error condition properly from the quota manager software.  We hope
    newer versions of all the related software will improve this one day.


How to get logged to reduce your disk usage (UNIX & Windows)
------------------------------------------------------------

 -> UNIX accounts:
    'ssh' is not blocked by the quota limit, so you can login from another 
    account (perhaps from your home computer) and clean up.  Also, each CDE 
    login screen has a way; select "FAILSAFE" from the Options menu, then 
    log in.  You get one simple window that doesn't use a window manager or
    try to open any of your files, so you can delete some files.

 -> Windows accounts:
    You should be able to login, but you will be unable to add anymore files
    until you reduced your disk usage.

How can I find what to delete? (UNIX & Windows)
-----------------------------------------------

 -> UNIX accounts:
    First look for large files that you could delete.  Here are UNIX commands
    that display the size (in KB) of files and subdirectories (the '~' means 
    your home directory):

    du -ks * .[a-z]* .[A-Z]* 		# files and dirs in the current dir
    find ~ -type d -exec du -ks {} \;	# all subdirs in your account

    A major source of wasteful disk usage is caused by the MacOSX version of 
    Microsoft Word.  It copies 82MB of fonts into your home directory, in
    Library/Fonts.  You can replace that with a link to a shared version with 
    these commands (in a command line window on any MacOSX or UNIX system):

	cd ~/Library
	rm -rf Fonts
	ln -s /Applications/"Microsoft Office 2004"/Office/Fonts1 Fonts

    Another source of wasteful disk usage is caused by MacOSX documentation.
    Look in Library/Developer/Shared/Documentation/ for *.docset files.  Then
    look in /Applications for the same files, using

	find /Applications -name \*.docset

    If the same docset is in /Applications, you can delete your copy and make
    a symbolic link to the one in /Applications.

    Look for things to delete in the large directories, such as 
    
	- "core" files (left behind by programs that crashed)
	- .nfs files (left behind by the NFS remote filesystem software) 
	- old files in your ~/.netscape/cache directory
	- excessive email stored in your ~/mbox file or ~/Mail directory
	
    These commands can be used to delete such files:
  
	find ~ -name core -exec rm {} \;
	find ~ -name \.nfs\* -exec rm {} \;
	rm  ~/.netscape/cache/*/*
	rm .mozilla/default/*.slt/Cache/*
	ls -la ~/mbox ~/Mail

    The .nfs* files are created by the UNiX filesystem to keep track of files 
    or programs that you have opened.  If you remove the .nfs file which is 
    still open, then it simply gets renamed to .nfs again so the client that 
    has it open can still use it.  To delete a .nfs file, you first should 
    close the file in the application that has the file open, or stop the 
    program if it is a binary you are trying to remove.  Usually the 
    application will delete the file as it shuts down.

    The default browser caches of netscape and mozilla are higher than needed.
    You can reduce your cache size so that the disk space that is used for it
    is smaller.   To reduce your cache size in  Mozilla:

    1) Click on Edit-->Preferences
    2) In the Preferences dialog box, click on plus (+) next to "Advanced"
    3) Select "Cache"
    4) Change your cache size to something small such as 2 MB.


 -> Windows accounts:
    Your profile directory (for example,  U:\{your_logon}\profile) under your
    Windows home directory stores may things that you do when you logon and
    saves them.  The contents of this directory are downloaded to your 
    workstation when you logon and is copied back to the home directory of 
    the server when you logoff.  This directory can grow huge over time and 
    can cause delays when you logon and logoff as well as uses up your disk 
    quota.  
    
    Windows by default limits the profile to 30 MB, and if you exceed that.
    and you get an error message when you try to logoff. 

    You should clean out the "U:\{your_logon}\profile\Temporary Internet Files"
    directory, either manually or by deleting them using the options of your
    WEB browser ("View/Internet Options/Delete Files" in IE).  You may also 
    change settings so the directory doesn't get so large.

    You can clear the disk cache that saved by your broswer (in Netscape, 
    select "Edit/Preferences/Advanced/Cache/Clear Disk Cache").

    You can remove old files and directories you don't need any more.

    For more information, please see
    https://inst.eecs.berkeley.edu/cgi-bin/pub.cgi?file=windowsprofile.help


WARNING! You can lose files (UNIX)
----------------------------------

 -> UNIX accounts:
    The accounting for disk quotas is done by the operating system on the 
    computer where the file system is locally mounted (the "file server").  
    On the EECS Instructional computers, all home directory file systems are 
    exported from the file servers to the other computers, using software 
    called "NFS" (Network File Service).  This allows users to access their 
    home directories from any computer.   
  
    Unfortunately, NFS does not respect the quota accounting software, and the
    soft quota warnings are ignored.  That means that if you are logged into
    a system other than your file server and you exceed your hard quota limit,
    the file that you are trying to save may be deleted!  We hate this, but 
    cannot fix it - this behavior is inherent in the operating systems of our 
    computers.  The best protection against it is to be aware of your disk 
    usage and be careful.

  
"Quota" vs "du"	(UNIX)
----------------------

 -> UNIX accounts:
    Note that "quota" counts not only the disk usage in your home directory, 
    but also any other files owned by you on the same disk partition.
  
    The "du -s" command simply adds up the disk space used by the directory 
    or file that you specify.  For this reason, "quota" and "du" often display 
    different numbers when referring to your home directory.
  
  
Counting in "blocks" or "kilobytes"? (UNIX)
-------------------------------------------

 -> UNIX accounts:
    The "quota" command typically computes in 1024-byte units (kilobytes).
  
    However, the "du" command may use 512-byte "blocks" or 1024-byte 
    "kilobytes".  The Solaris UNIX systems default to 512-byte blocks, 
    but can take the -k option to force "du" to compute in kilobytes.
    Other UNIX systems may compute the usage in kilobytes.  
  
    So if you run the "du -s" command on an HP computer, it will give you 
    a number that is roughly twice as big as the same command run on a DEC 
    computer.  (The different computing algorithms seem to generate slightly 
    different results.)
  
    Adding to the confusion is the influence of NFS (Network File System), 
    the software that allows systems to access one anothers disks over the 
    network.  NFS attempts to adjust for the difference in units, and that 
    can end up doubling or halving the correct answer.
  
    Here are examples of the bizarre results:
  
 	home directory 		if logged 	quota		du -s ~
 	is on:			in on:		says usage is:	says usage is:
 	======================	=============	=============	==============
  User 1:
	HP system		HP system	3933 (KB)	7722 (blocks)
  				DEC system	3933 (KB)	1968 (KB) *
  	----------------------	-------------	-------------	--------------
  User 2:
	DEC system		DEC system	4133 (KB)	4133 (KB)
  				HP system	4133 (KB)	8168 (KB) **
  	----------------------	-------------	-------------	--------------
  	 * here NFS is over-compensating, dividing by 2 in error
  	** here NFS is over-compensating, multiplying by 2 in error
  
    The bottom line is:  trust the "quota" command, which displays the quota 
    in kilobytes from the system that holds your home directory.   Read 
    "man du" on the system where you run it to determine if it is using blocks 
    of kilobytes.
  
  
Using USB drives on our workstations
------------------------------------
  The Windows PCs and UNIX SunRays in EECS Instructional labs can read 
  standard UCB memory sticks.  You can copy files to and from it.  We 
  encourage students to keep a backup copy of their own files this way.
  
  On the SunRays, you plug it into USB port on the back and it mounts on:
	
	/tmp/SUNWut/mnt/$USER/lexarmedia 

  
Why is disk space so limited?
----------------------------
  Despite the apparent low cost of additional disks, we never seem to have
  enough.  Disks incur other costs:  new file servers, expansion cabinets, 
  tape drives (for archiving) and maintenance contracts always drives up 
  the real cost.  Also, applications programs are becoming larger with
  each new release. 
  


		   		EECS Instructional Support
    				378/384/386 Cory, 333 Soda
				http://inst.eecs.berkeley.edu
  				inst@eecs.berkeley.edu