AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  phantom file space on restored file system

    Posted Thu December 11, 2008 01:17 PM

    Originally posted by: DavidHMC


    A filesystem exists on one of our machines which indicates that space is in
    use even when emptied of all files :-

    ls -laR /liv1
    total 8
    drwxr-xr-x 3 appfis dba 256 Jul 16 15:04 .
    drwxr-xr-x 35 root system 4096 Jul 14 18:45 ..
    drwxr-xr-x 2 root system 256 Apr 01 2005 lost+found
    /liv1/lost+found:
    total 0
    drwxr-xr-x 2 root system 256 Apr 01 2005 .
    drwxr-xr-x 3 appfis dba 256 Jul 16 15:04 ..

    df -gt /liv1
    Filesystem GB blocks Used Free %Used Mounted on
    /dev/lvliv1 51.50 4.30 47.20 9% /liv1

    The filesystem is regularly cleared and repopulated of files every week
    from another system as it is intended as a backup of that system.

    The above "phantom space" increases every week with each repopulation.
    What would cause this?

    The filesystem consists mainly of three sub-directory trees,
    which make up the majority of the filesystem.
    On the source system, they are backed up to tar files using a command of the following form :-

    tar cf - fiscomn | compress >$STAGE/fiscomn.tar.Z 2>$STAGE/fiscomn.tar.err

    The resulting compressed tar files are copied over to the target system
    using ftp. The /liv1 filesystem sub-directories on the target system
    as shown above are deleted (eg rm -Rf /liv1/fiscomn).

    (Note the filesystem is not unmounted/mounted or removed/recreated at this stage.)

    The copied tar.Z files are then unpacked into /liv1 on the target system with a command
    of the following form:-

    cat ${STAGE}/${SRCNAME}.tar.Z | uncompress | tar xfp -

    Any ideas?


  • 2.  Re: phantom file space on restored file system

    Posted Fri December 12, 2008 03:59 AM

    Originally posted by: hdkutz


    Hello,
    check with lsof-command from AIX-Toolbox if there are any open files on your Filesystem /liv1.
    Looks to me that opened Files have been removed in the Filesystem.

    Cheers,
    ku


  • 3.  Re: phantom file space on restored file system

    Posted Fri December 12, 2008 06:27 AM

    Originally posted by: DavidHMC


    Thanks, we have used "fuser -c" and this has not shown any open files.
    I should also have stated that the operating system level is
    AIX 5.2 TL10 service pack 3. The filesystems are JFS2.

    David


  • 4.  Re: phantom file space on restored file system

    Posted Fri December 12, 2008 07:14 AM

    Originally posted by: j.gann


    like hdkutz wrote, deleted open files are very likely the cause. you can verify this by trying to unmount the fs. fuser -c does not do what you think it does.

    smaller increase of empty fs usage is often due to a growing root directory (not contents, but the directory special file itself) since directories can only grow and never shrink. but your 4g usage is too large to be caused by this.


  • 5.  Re: phantom file space on restored file system

    Posted Fri December 12, 2008 07:35 AM

    Originally posted by: hdkutz


    Hello,
    just do a
    fuser /dev/lvliv1
    or
    lsof |grep lvliv1
    Both commands should print out opened Files on your Filesystem.

    Cheers,
    ku


  • 6.  Re: phantom file space on restored file system

    Posted Tue December 16, 2008 07:34 AM

    Originally posted by: DavidHMC


    I created a test filesystem to examine the above problem.
    Before populating with files, the df output was :-

    1. df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 8332 52420468 1% /liv1

    After populating with files as tar/untar as described in the original post,
    the df output was :-

    1. df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 496740 51932060 1% /liv1

    1. ls -lasR /liv1
    total 4
    0 drwxr-xr-x 2 root system 256 21 Oct 13:07 .
    4 drwxr-xr-x 43 root system 4096 28 Nov 10:09 ..

    I ran the suggested commands :-

    1. fuser /liv1
    /liv1:
    1. umount /liv1
    2. mount /liv1
    3. df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 496740 51932060 1% /liv1
    A similar initial figure (497MB) occurred on the production filesystem.
    The figure of 4.3GB was reached on the production filesystem after
    successive deletions and re-populations.

    Thanks,David


  • 7.  Re: phantom file space on restored file system

    Posted Tue December 16, 2008 08:26 AM

    Originally posted by: tony.evans


    Unmount your test filesystem and run an fsck on it.


  • 8.  Re: phantom file space on restored file system

    Posted Wed December 17, 2008 07:31 AM

    Originally posted by: DavidHMC


    This does not seem to make a difference; no errors are flagged.

    1. df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 496740 51932060 1% /liv1
    1. umount /liv1
    2. fsck /liv1

    ****************
    The current volume is: /dev/lvliv1
    **Phase 1 - Check Blocks, Files/Directories, and Directory Entries
    **Phase 2 - Count links
    **Phase 3 - Duplicate Block Rescan and Directory Connectedness
    **Phase 4 - Report Problems
    **Phase 5 - Check Connectivity
    **Phase 7 - Verify File/Directory Allocation Maps
    **Phase 8 - Verify Disk Allocation Maps
    52428800 kilobytes total disk space.
    0 kilobytes in 1 directories.
    0 kilobytes in 0 user files.
    51932060 kilobytes are available for use.
    File system is clean.
    1. mount /liv1
    2. df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 496740 51932060 1% /liv1

    David


  • 9.  Re: phantom file space on restored file system

    Posted Wed December 17, 2008 07:51 AM

    Originally posted by: tony.evans


    Can you show the output from lsfs -q /filesystem for both the filesystems in question please.


  • 10.  Re: phantom file space on restored file system

    Posted Thu December 18, 2008 07:05 AM

    Originally posted by: DavidHMC


    Below is output from lsfs -q for filesystems which have had this issue:-

    Live filesystem (currently populated):

    % df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 46521488 5907312 89% /liv1
    % lsfs -q /liv1
    Name Nodename Mount Pt VFS Size Options Auto Accounting
    /dev/lvliv1 -- /liv1 jfs2 104857600 rw yes no
    (lv size: 104857600, fs size: 104857600, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, reserved: 0, reserved: 0, DMAPI: no, VIX: no)
    Test filesystem (empty):

    % df -Pk /liv1
    Filesystem 1024-blocks Used Available Capacity Mounted on
    /dev/lvliv1 52428800 496740 51932060 1% /liv1
    % lsfs -q /liv1
    Name Nodename Mount Pt VFS Size Options Auto Accounting
    /dev/lvliv1 -- /liv1 jfs2 104857600 rw yes no
    (lv size: 104857600, fs size: 104857600, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, reserved: 0, reserved: 0, DMAPI: no, VIX: no)

    David