[HPADM] [SUMMARY Addition] User Disk Quota

From: Ben Le (ble_at_pcc.edu)
Date: 04/25/05

  • Next message: Whittemore, Dale: "[HPADM] Summary - Problems with ITRC today?"
    Date: Mon, 25 Apr 2005 09:23:17 -0700
    To: hpux-admin@dutchworks.nl
    
    

    Hi List,

    I have been discussed this issue with Bill Hassell and got very good info
    from Bill that I thought I would share with all of you.

     From Bill:

    In Unix, a block has been a classic unit of measure, 512 bytes or
    1/2 Kbytes. So 10,000 blocks is 5,000K or 5 megs. The du command
    also measures disk space in 1/2K blocks.
                block value * 0.5 / 1,000 = Size in mg
                example: 10,000 * .05 /1,000 = 5mg
    If you want to set 50mg disk quota for user, you need to set the value of
    'hard block' to 100,000.
    Use this to test if quotas work, as in:
                 prealloc testfile 50000000
    to create a 50 meg file.

    I also sent this question to Bill:
    A little odd with disk space reporting. I created a test account for disk
    quota setup. Set disk quota block to 100,000. Create a 'testfile' for 50mg
    as you suggested. After 50mg file created, disk quota reports only usage of
    48,835 block size. Should it reported 100,000 block size, any idea?

     From Bill:
    Welcome to the world of Unix sparse files. The Unix filesystem can be told
    to create a file with exactly 2 records, one at location 1 and the other at
    address 1,000,000. Users can read the file serially and technically, the
    undefined records do not exist but Unix will supply a series of nulls for
    the missing records. The occupied space is just 2 records but if you
    copy the file, the copy will be 1 million records in size. So there is
    a directory size and an occupied size. If you run these commands:

        du file_name
         ll file_name

    You'll see a big difference.

    Prealloc creates a sparse file. Just cp the file to another file and
    you'll get a 50meg result.

    __________________________________________
    Benjamin Le
    Sr. Systems Administrator
    Information Technology Services
    Portland Community College
    Voice:(503)-977-4736 Fax:(503)-977-8124
    Mailto:ble@pcc.edu http://www.pcc.edu

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Whittemore, Dale: "[HPADM] Summary - Problems with ITRC today?"

    Relevant Pages

    • Re: Anti-Virus Software Suggestions
      ... The theory that "Windoze is attacked because it is ubiquitous" is pure ... the bulk of the net is run on unix machines of some sort ... If the myth wasn't a myth, the attacks should ... "Bill says we must do this!" ...
      (rec.photo.digital)
    • Re: looking for a printer recommendation
      ... "Dan Martin" wrote in message ... > Thank you for your reply, Bill. ... > anything, including printing re-directed text (from unix or DOS), ... > I was hoping to use netcat. ...
      (comp.unix.sco.misc)
    • Re: Anyone interested in building a vms-like OS?
      ... Bill Gunshannon wrote: ... Linux provided things no proprietary/Legacy UNIX ... I would think a BasicPlus compiler for RSTS would be a lot easier ...
      (comp.os.vms)
    • Senate passes patient safety bill with new error reporting system
      ... Senate passes patient safety bill with new error reporting system ... The measure would allow physicians and hospitals to convey data on ... The bill has bipartisan support from powerful members of each party, ...
      (sci.med)
    • Re: Results of my straw poll.
      ... Bill Gunshannon wrote: ... How many people does it take to support Unix? ... Oh yeah, between Windows and Unix, I'll give you three guesses which one ...
      (comp.os.vms)