Re: Sparsed Files

From: Justin Bleistein (justin.bleistein_at_TOWERSPERRIN.COM)
Date: 11/03/05

  • Next message: Yves Dorfsman: "Re: Sparsed Files"
    Date:         Thu, 3 Nov 2005 14:14:22 -0500
    To: aix-l@Princeton.EDU
    
    

    Kind of like what TSM does with the storage pool, db, and log files. Also,
    what Oracle database does with it's *dbfs/tablespaces, they are
    files/space which are
    allocated, but just not utilized.
    Thanks.

    --Justin Richard Bleistein
     AIX Systems Administrator

    Robert Binkley <leebinkley@YAHOO.COM>
    Sent by: IBM AIX Discussion List <aix-l@Princeton.EDU>
    11/03/2005 01:38 PM
    Please respond to
    IBM AIX Discussion List <aix-l@Princeton.EDU>

    To
    aix-l@Princeton.EDU
    cc

    Subject
    Re: Sparsed Files

    Tina :

     To identify if a file is sparsely-allocated, use the
    fileplace command
    Understanding Sparse Files

    A file is a sequence of indexed blocks of arbitrary
    size. The indexing is accomplished through the use of
    direct mapping or indirect index blocks from the files
    inode. Each index within a files address range is not
    required to map to an actual data block.

    A file that has one or more indexes that are not
    mapped to a data block is referred to as being
    sparsely-allocated or a sparse file. A sparse file
    will have a size associated with it, but it will not
    have all of the data blocks allocated to fulfill the
    size requirements. To identify if a file is
    sparsely-allocated, use the fileplace command. It will
    indicate all blocks in the file that are not currently
    allocated.

    NOTE: In most circumstances, du can also be used to
    determine if the number of data blocks allocated to a
    file do not match those required to hold a file of its
    size. A compressed filesystem might show the same
    behavior for files that are not sparsely-allocated.
    A sparse file is created when an application extends a
    file by seeking to a location outside the currently
    allocated indexes, but the data that is written does
    not occupy all of the newly assigned indexes. The new
    file size reflects the farthest write into the file.

    A read to a section of a file that has unallocated
    data blocks results in a default value of null bytes
    being returned. A write to a section of a file that
    has unallocated data blocks causes the neccesary data
    blocks to be allocated and the data written.

    --- SUBSCRIBE aix-l Tina N
    <christina_lewis@NEXNET.NAVY.MIL> wrote:

    > Hello All..
    >
    > I am trying to understand how to work with Sparsed
    > Files.
    > Does anyone know 'how' I can tell if a particular
    > file is sparsed or not?
    >
    > Also... How can I copy a sparsed file with retaining
    > permissions and
    > sparseness, so as to not increase the space
    > utilization.
    > Right now, when we copy using 'cp' - the file copies
    > as unsparsed and
    > requires a lot of additional space not used
    > previously.
    >
    > Tks for any info...
    >
    >
    >
    ***************************defiant************************************
    > This email and any files transmitted with it are
    > intended solely for
    > the use of the individual or agency to whom they are
    > addressed. If
    > you have received this email in error please notify
    > the Navy Exchange
    > Service Command e-mail administrator.
    >
    > This footnote also confirms that this email message
    > has been scanned
    > for the presence of computer viruses.
    >
    > messaging_support_team@nexnet.navy.mil
    >
    **********************************************************************
    >
    >

    Robert Lee Binkley leebinkley@yahoo.com
     IBM AIX Specialist Certified
     HP-UX System Administration Certified
    Work It's Nice To Be Important But It's More Important To Be Nice


  • Next message: Yves Dorfsman: "Re: Sparsed Files"