[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

612.0. "Disk quota" by CURIE::DECARTERET (Jason DeCarteret) Fri Nov 27 1987 16:08

    Hello.  I am having some problems understanding something with my
    quota.  I have 17.000 blocks available to me and I wanted to see
    how many I had used up.  So I did a show quota.  It said I used
    up 13,580 blocks!  "Woah!"  I couldn't have possible used that many!
    So I typed $ DIR/SIZE [...]  and it came up with 8,560 blocks used.
    What else effects the quota?  I know mail does but that couldn't
    have possible used up 8,500 blocks of space!
    
    Signed..
    		Help
T.RTitleUserPersonal
Name
DateLines
612.1dir/size/full??MTBLUE::PFISTER_ROBAre we having fun yet?Fri Nov 27 1987 18:296
   I had that problem once, and I tracked it down to some files that
    were munged up.  with a dir/size, they had a size of 0, but actually
    took up quite a bit of space.  try $ dir/size/full (??) to see how
    many blocks your files *really* take up.
    
    Robb
612.2Allocated (+ Overhead?)TOOK::MICHAUDJeff MichaudFri Nov 27 1987 20:213
    I think /size shows you how much is used, not how much is allocated.
    Filesystem overhead (mapping blocks, ...) may also count toward
    you quota under VMS?
612.3CURIE::DECARTERETWhen there's a will, there's no wayFri Nov 27 1987 21:126
    Wow, thanx for there quick replys. (Not even 5 hours).
    When I did a DIR/SIZE/FULL I saw that the majority of the files
    we something like "12/19 blocks" or "32/50 blocks".  I even had
    one that was "0/316 blocks"!!  So now that I located the problem,
    how do I fix it???
    			-=*>Jason<*=-
612.4Using DIR/SIZE:ALL is the most sane wayGATORS::VICKERSNever argue with a pig OR customerFri Nov 27 1987 23:3011
    As all of us who are old RSX types know the correct DIRECTORY command
    is DIR/SIZ:ALL/DATE.  Looking at the used file size without knowing
    the the allocated size is saving just a few characters on your screen
    and potentially causing the sort of confusion described in .0.
    
    Take a look at the other exciting DIR options like /TOT and /GRAND
    as well.
    
    Have a ball,
    
    Don
612.5SET FILE/TRUNCATE will help to fix the problem.VAXWRK::NEEDLEJeff NeedleSat Nov 28 1987 06:5213
SET

  FILE

    /TRUNCATE

     /TRUNCATE

     Requests that the file is to be truncated at the  end  of  the  block
      containing the end-of-file (EOF) mark.


612.6CURIE::DECARTERETWhen there's a will, there's no waySun Nov 29 1987 02:348
    Well, after trimming EVERYTHING down and setting most of my files
    to truncate I got my dir down to a physical 5711 blocks and my
    quota shows 6449 blocks.  I was thinking, the 738 blocks couldn't
    be missing because I have mail messages because all the mail messages
    are in mail.mai and that is counted in the physical file size.
    
    VMS is STRANGE!!
    -=*>Jason<*=-
612.7Headers count too!MEIS::GORDONTo be 'new' - is that the main thing?Sun Nov 29 1987 04:0522
612.8Disk Cluster Size is important herePILOU::BONGARTZIn a maze of little twisting passages,all alikeSun Nov 29 1987 06:2021
>   You are also charged a minimum of 1 block per file for the file header.
>    If your file has multiple headers, then your quota is charged for
>    each header.

	Well ... a file header does not take up a whole block. What
	really gets your quotas up is the disk cluster size, set up
	when  you  initialize  your pack. If it's 1, a 1 block file
	will  have  1  block allocated, if it's 16, it will have 16
	blocks  charged  to  your  disk quota. On most systems I've
	seen  it's set to 3 (which is the default for disks capable
	of holding 50.000 blocks or more. ($ HELP INIT DEVICE /CLUSTER_SIZE )

	I think big cluster sizes are to be used on disks with just
	a few, big to HUGE files to improve throughput or so....

	You might also have some files with your UIC hanging around
	in some other directory on the disk. DIR/BY_OWN DISK:[*...]
	will find them for you...

			Marc
612.9TLE::BRETTSun Nov 29 1987 15:357
    Are you sure file-headers don't take up a whole block?  I thought
    that there was each file-header and extended-file-header was 1 block
    in the INDEXF.SYS file.
    
    /Bevin
    
    PS: No-one's mentioned lost files yet, have they?
612.10CURIE::DECARTERET4 * -9[ - (54 -23a / 7c) 4a + 6] = 9aSun Nov 29 1987 16:0514
    $ dir/size=all/grand [...]

    Grand total of 28 directories, 307 files, 5713/6144 blocks.
     
    $ sh quota
  
    User [SUPPORT,DECARTERET] has 6487 blocks used, 10513 available,
    of 17000 authorized and permitted overdraft of 1000 blocks on USER$4
    
    This is what I got when I did what reply .7 mentioned.  I tried
    everything else in the other replies and everything with a [*...]
    said I had insufficient privilege.  
    Could it be hidden files or lost files or something?
    			-=*>Jason<*=-
612.11Looks good to meSMAUG::GARRODDTN 226-7114Sun Nov 29 1987 17:2019
    Looks fine to me.
    
    You've got 5713 out of 6144 used because of the disk clustersize,
    most likely 3 (as mentioned in a previous note). A 7 block file
    takes up 9 blocks.
    
    Note that 6144+307=6451 where 307 is the number of files. As previously
    mentioned each file takes up AT LEAST 1 block for the fileheader
    in INDEXF.SYS which is charged to you. We're now talking about a
    piddling discrepancy of 6487-6451=36 blocks.
    
    Now I wouldn't be surprised if that was caused by some files having
    extended headers (ie greater than 1 block). Also I'm not sure if
    the DIR/GRAND takes into account the size of .DIR files. In addition
    you may have files in other people's directories and maybe even
    some lost files that'll only get directoried if somebody does a
    VERIFY/REPAIR on the disk. Is 36 blocks that important to you?
    
    Dave
612.12How to estimate disk quota:CHOVAX::YOUNGBack from the Shadows Again,Sun Nov 29 1987 17:2943
    Re .10, etc:
    
    Pay attention now;
    	
    	To get a fairly good approximation of your Disk Quota, use the
    	following procedure.  Execute the command 
    		DIR/SIZE=ALL/GRAND DISK$:[000000...]
    	Now you are charged for the total blocks ALLOCATED.  This is
    	larger number that comes after the "/".  IE., in 'ssss/aaaa'
    	the 'ssss' is the size in blocks and 'aaaa' is the allocation
    	in blocks.  Now add 1 block for each file.  This is because
    	you are charged at least 1 block for the file header of each
    	file, which resides in the INDEXF.SYS file on your disk.  This
    	will not show up on the directory command so you have to 
    	estimate it using your total number of files. Large files and 
    	fragmented files might be charged more than one block, but these
    	are usually a small percentage of your total files.
    
    Using your figures:
    
>    $ dir/size=all/grand [...]
>
>    Grand total of 28 directories, 307 files, 5713/6144 blocks.
>     
>    $ sh quota
>  
>    User [SUPPORT,DECARTERET] has 6487 blocks used, 10513 available,

    we have:
    		Total Allocation	6144
    		Number of Files		 307
		+			----
    		Estimated Quota		6451
    		
    		Actual Quota	    -	6487
    					----
    		Discrepency		  36  blocks
    
    The final discrepency of 36 blocks can be easily explained by files
    that have large file headers (more than 1 block).  Personally I
    think that an error of 0.55% (36/6487) is a darn good estimate.
    
    --  Barry
612.13.11,.12 -> Notes Collision.CHOVAX::YOUNGBack from the Shadows Again,Sun Nov 29 1987 17:321
    Oops.  Dave beat me to it.
612.14CURIE::DECARTERET4 * -9[ - (54 -23a / 7c) 4a + 6] = 9aSun Nov 29 1987 19:266
    	Thanks for all your help.  Now I know what happens to some of
    my disk space!!  It's haunted me for 12 years!  
    
      Re. 11.
    
    Not really, 36 blocks doesn't really bother me at all.
612.15There's also the top level directory as wellJON::MORONEYQuestion Authority (and the Authorities will question you)Sun Nov 29 1987 23:426
re: Those 36 extra blocks:

Do a DIR/SIZE=ALL [000000]username.DIR, and add a block for this file, if you
haven't already.

-Mike
612.16show device sys$login/fullTOOK::MICHAUDJeff MichaudMon Nov 30 1987 02:523
    You can verify the cluster size for the volume by doing a
    
    	$ show device sys$login/full
612.17fh2$b_mpoffsetPILOU::BONGARTZIn a maze of little twisting passages,all alikeTue Dec 01 1987 17:0614
Re: .9

>    Are you sure file-headers don't take up a whole block?  I thought
>    that there was each file-header and extended-file-header was 1 block
>    in the INDEXF.SYS file.

	Ooops...  got confused somewhere. Yes, you're right, a file
	header takes up one block, and so does the extension header
	if there is any - I guess I've been thinking only about the
	retrieval  pointers  'cause  of some program i made a while
	back... sorry 'bout that !

		Marc_who_should_have_RTFM_before_starting_to_argue...
612.18Opening another can of wormsDELNI::CANTORDave C.Wed Dec 02 1987 01:3816
      And now, the lost files that weren't mentioned yet.
      
      If there are any files on the disk which are owned by your
      UIC, but aren't in your directories (such as those in other
      directories, or those lost, or those in other directories which
      really are yours, but you forgot about them), those will be
      counted against your disk quota, but will not be counted in
      your directory command.  
      
      You can own files in someone else's directory if they have
      allowed you to write a file there and you did so.
      
      Another discrepancy that can show up is files in your directories
      which are owned by someone else.
      
      Dave C.
612.19Don't forget librariesNAC::JENSENNot NAC, but CAN!!!Wed Dec 02 1987 13:389
>      If there are any files on the disk which are owned by your
>      UIC, but aren't in your directories (such as those in other
>      directories, or those lost, or those in other directories which


One common way of 'losing' files, is to put them in a library, such as CMS or
DTM.

							$+eve
612.20OVDVAX::LENNIGDave, SWS, @CYO CincinnatiMon Dec 07 1987 01:529
    6144 allocated
     307 file headers for user files
      28 file headers for directories
       1 file headers for top level directory
    ----
    6480 blocks
    
    Your quota used was 6487; wanna bet size of top level dir is 7 blocks?
    
612.21and if not...CSSE32::KUEHNELMon Dec 07 1987 12:301
    you probably have a file with an extension header
612.22Almost. No seegar, how 'bout a Cigarillo?MDVAX3::COARMy hero? Vax Headroom, of course!Thu Dec 17 1987 20:4618
>    6144 allocated
>     307 file headers for user files
>      28 file headers for directories
>       1 file headers for top level directory
>    ----
>    6480 blocks
    
    Sorry.  The .DIR files are just like any other file, and the space
    they take up counts against the directory they are children of.
    So the `28' doesn't count in the above calculation.  So the actual
    discrepancy is 35 blocks, which is probably consumed by the root
    directory, as earlier pointed out.  Do you have a lot of files in
    your SYS$LOGIN directory?  Definitely check out DIRECTORY /SIZE=ALL
    [-]root-dir.DIR;1 and let us know; I'll bet it is 35 blocks long.
    Be sure to specify the .DIR;1 so that you will be able to see it
    without wildcards.
    
    #ken	:-)}
612.23CURIE::DECARTERETGarfieldThu Dec 17 1987 20:574
    re 612.22
    
    	I did what you pointed out and lo and behold, 11/36 came up.
    				-=*>Jason<*=-
612.24Shame on youTOOK::MICHAUDJeff MichaudSat Dec 19 1987 01:572
    36!  That means you have one block which you are not getting charged
    for.  It is one thing to be cheated, but to cheat!  shame shame