Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hao!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!inuxc!ihnp4!laidbak!spl1!iitmax!draughn From: draughn@iitmax.UUCP (Mark T. Draughn) Newsgroups: comp.os.vms Subject: Re: VMS diskquota synchronization. Message-ID: <799@iitmax.UUCP> Date: 24 Feb 88 05:54:27 GMT References: <8802210031.AA25550@ucbvax.Berkeley.EDU> Reply-To: draughn@iitmax.UUCP (Mark T. Draughn) Organization: Illinois Institute of Technology, Chicago Lines: 72 In article <8802210031.AA25550@ucbvax.Berkeley.EDU> PERAINO@GMUVAX.BITNET writes: > [ $ SHOW QUOTA not equal to $ DIR/SIZE ] There are a whole bunch of ways this can happen. The author of the article tried some of these, but I thought I'd repeat them. This can be really arcane but here goes... 1) DIR/SIZE shows the amount of the file that is USED. More space may have been ALLOCATED but not yet written to. Many VMS systems allocate space in a multiple of some small integer, usually 3. Consequently, 100 files that are only 1 block long will use 300 blocks. Use DIR/SIZE=ALLOCATION to see actual allocations. Some programs allocate hundreds of blocks but only use a few and don't truncate the file. 2) There may be files in directories other than the ones you searched. Try searching the entire disk with something like DIR [*...] /BY_OWNER=whatever /SIZE=ALLOCATION 3) The disk quota information may be corrupted. Run DISKQUOTA and use the REBUILD command. (This will lock out a lot of disk-related activity which may bother other users.) 4) There may be files which do not appear in any directory. This is not really a structural problem in the file system. Many temporary files are created in no directory. Sometimes the programs that create them do not delete them. This can also happen by accident or because of crashes. The command ANALYZE/DISK can find these files. It will put them in the [SYSLOST] directory. This has a side affect of rebuilding the quotas and it locks the disk. Read the instructions first. 5) The disk structure may be corrupted and DIR may not be able to find all of the files for some reason. Again, ANALYZE/DISK fixes this. 6) Don't forget that directories themselves take up space. Easy to forget if you are only looking in one directory. (I.e. If creating a file causes more of a chnage than you thought it should, the directory file may have gotten bigger when the file was added.) 7) The headers for all the files are stored in [000000]INDEXF.SYS which the file system maintains. Every file has at least one header record in here and files that are badly fragmented need several records. The quota system charges you for these records and if you have a lot of small files this can really add up. (Even files that DIR says have a size of 0 will still make the quota system charge for the header.) 8) If you use volume sets and the non-primary disks weren't empty when the binding was done, things can get a little strange. I imagine this can cause a few problems with quotas. I don't know much about this. 9) There is a window of vulnerability built into the file system repair facilities (DISKQUOTA REBUILD and ANALYZE/DISK). If the diskquota repairing code discovers that there are files owned by people who do not appear in the diskquota file ([000000]QUOTA.SYS), it will add them. But if all the slots in the file are in use, it will have to extend the quota file. While the utility runs, file system structural changes are locked out. This prevents file creation, deletion, truncation, and extension. The repair facility has to re-enable these activities in order to extend the quota file then disable them again. Some user could slip a change through at this point. (It doesn't require split-second timing because the locked-out operations are queued. They could have been building up for several minutes.) If you really want to be SURE, run the repair facility repeatedly until it runs without adding any new records to the quota file. Let me know if I've missed anything, or if I'm out of date on anything, or if I'm really screwed up on anything. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Mark Draughn UUCP: ...ihnp4!iitmax!draughn Computer Science Department BITNET: SYSMARK@IITVAX Illinois Institute of Technology (312) 567-5334 Chicago, Illinois 60616 This space for rent. "If you think the United States has stood still, who built the largest shopping center in the world?" -- Richard Nixon