AIX

AIX

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


#Power
 View Only
Expand all | Collapse all

folder limitation

  • 1.  folder limitation

    Posted Tue April 24, 2007 06:32 AM

    Originally posted by: SystemAdmin


    hi guys,

    sorry im just a newbie to aix. but hope to learn from it more.

    anyway my question is this: is there a limitation on how many files or folders must a folder contain in aix 5.2.

    the scenario is like this:

    i have create a journalled file system named : /usr/WebSphere
    obviously i installed there WPS5.1 with ilwwcm enabled

    inside that file system is the image folder by default used by ilwwcm in storing all image files used in portal

    however it seems that the image folder reach its limitation. it now currently contains 32k+ folder with each folders containing a single image file.

    when i try to create a folder inside image folder an error message appears. but when i try to delete an existing folder then try to re-create it it works fine. i could still create the folder.

    could anyone help me, this is a production server and currently all uploading of images for the site is temporarily stop due to this...
    #AIX-Forum


  • 2.  Re: folder limitation

    Posted Tue April 24, 2007 07:14 AM

    Originally posted by: SystemAdmin


    The only limitations here are the total amount of space in the filesystem and the number of inodes in the file system. Only the latter directly impacts the number of files and directories you can create. An inode is the filesystem meta-data representing a file or directory. You get a fixed number of these when a filesystem is created as controlled by a parameter called NBPI (number of bytes per inode). You can track whether you're running out of these by looking at the column headed "%Iused" in the output of a df command.

    It would help in asking questions like this if you posted the error message you're getting rather than just saying there was one and leaving us to guess.

    Regards,
    Jim Lane
    #AIX-Forum


  • 3.  Re: folder limitation

    Posted Wed May 09, 2007 02:13 AM
      |   view attached

    Originally posted by: SystemAdmin


    hi Jim,

    sorry for the very late reply. i got tabled up with training and stuff.

    however, i tried a work-a-round for this problem. i create a new enhanced journaled file system (jfs2) named, /usr/image.

    Then afterwards, transfered all the folders(w/ files) from the previous /usr/WebSphere/AppServer/installedApps/portal/wcm.ear/ilwwcm.war/resources/image folder to the newly mounted files system.

    Then i renamed the previous image folder to imagexx so that i could create a symbolic link of image also to point to /usr/image.


    lrwxrwxrwx 1 root staff 10 May 09 13:52 image -> /usr/image

    but unfortunately still got the same error, when i try to create folder under the new file system /usr/image.


    1. mkdir testing
    mkdir: 0653-358 Cannot create testing.
    testing: There are too many links to a file.


    i attached the snapshot of the result of the df command for reference...


    #AIX-Forum


  • 4.  Re: folder limitation

    Posted Sat May 12, 2007 07:16 PM

    Originally posted by: iulianr


    Hi Vinz,

    Unfortunately it "works as designed". Your problem is the number of links per directory. The limit is defined in /usr/include/sys/limits.h. There is a limit of 32767 links per directory. The entry is LINK_MAX ---> SHRT_MAX=32767. So, you cannot create more than 32765 subdirectories in that directory.
    #AIX-Forum


  • 5.  Re: folder limitation

    Posted Thu May 24, 2007 07:39 AM

    Originally posted by: SystemAdmin


    oh my god!

    if that's the case what would be my work-around for this!
    could anyone please help me!
    #AIX-Forum


  • 6.  Re: folder limitation

    Posted Thu May 24, 2007 06:06 PM

    Originally posted by: iulianr


    you can use symbolic links to point to the directory located in another parent directory.
    #AIX-Forum


  • 7.  Re: folder limitation

    Posted Fri May 25, 2007 07:12 AM

    Originally posted by: SystemAdmin


    i already done this work-around but its not a work-around in this case!
    #AIX-Forum


  • 8.  Re: folder limitation

    Posted Fri May 25, 2007 03:44 AM
      |   view attached

    Originally posted by: janhen


    Hi,

    I have similar problem on AIX 5.2 GM7, jfs2 FS!
    A sub-dir has 92324 directories and 211869 files, I can't create a new
    dir.

    As you see, I'm far away from Vinz numbers!

    I checked the /usr/include/sys/limits.h file and I have the 32767 limitations.

    See pic
    #AIX-Forum


  • 9.  Re: folder limitation

    Posted Fri May 25, 2007 06:20 AM

    Originally posted by: iulianr


    And I supose that you have the similar problem as Vinz. You are not far away from Vinz numbers. Can you post the output of the
    ls -ld /nus/transfert/read-sonaca
    command and check the number of hard links this directory ? You will understand were is your problem afterwards.
    #AIX-Forum


  • 10.  Re: folder limitation

    Posted Fri May 25, 2007 02:03 PM

    Originally posted by: SystemAdmin


    Can you try the following ?

    umount /filesystem

    chfs -a VIX=yes /filesystem

    mount /filesystem

    And see if that fixes the issue. Can't break the limitation of 32,767; but this might fix the issue you are having.

    Thanks,

    Lamar
    #AIX-Forum


  • 11.  Re: folder limitation

    Posted Sat May 26, 2007 06:52 AM

    Originally posted by: SystemAdmin


    sorry but could this also apply to my prob???
    #AIX-Forum


  • 12.  Re: folder limitation

    Posted Tue May 29, 2007 09:35 AM

    Originally posted by: janhen


    I use a test FS and create 36559 subdir on one dir.

    ls -ld on this dir gives:
    drwxr-xr-x32767 root system 1912832 29 May 15:23 .

    unmount FS, chfs -a VIX=yes FS, mount FS same result cannot create subdir.

    lsfs -q FS gives this output:
    Name Nodename Mount Pt VFS Size Options Auto Accounting
    /dev/CATIAV5 -- /usr/DassaultSystemes jfs2 18350080 rw yes no
    (lv size: 18350080, fs size: 18350080, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: no)

    VIX: no!?
    #AIX-Forum


  • 13.  Re: folder limitation

    Posted Tue May 29, 2007 06:00 AM

    Originally posted by: janhen


    Ok I see the limitation to 32767 on this dir.

    What about the VIX=yes option on chfs command? What does this means?
    #AIX-Forum


  • 14.  Re: folder limitation

    Posted Tue May 29, 2007 10:33 AM

    Originally posted by: SystemAdmin



    From:

    http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds1/chfs.htm

    We had an issue with a filesystem with lots of small files and we had to enable VIX to prevent inode limitations:

    -a vix={yes|no}
    Specifies whether the file system can allocate inode extents smaller than the default of 16K if there are no contiguous 16K extents free in the file system. After a file system is enabled for small free extents, it cannot be accessed on earlier versions of AIX and the marking cannot be removed.
    yes
    File system can allocate variable length inode extents.
    no
    File system must use default size of 16 KB for inode extents. This has no effect if the file system already contains variable length inode extents.

    Lamar
    #AIX-Forum


  • 15.  Re: folder limitation

    Posted Wed May 30, 2007 03:39 AM

    Originally posted by: janhen


    vix option not solve the problem for me.

    Think I need to find another way to store the data.

    Thanks for your help.
    #AIX-Forum


  • 16.  Re: folder limitation

    Posted Tue June 19, 2007 03:16 AM

    Originally posted by: SystemAdmin


    sorry for the late reply...

    i already performed the VIX option but to no avail.
    i still cannot create a new folder the the root folder.
    #AIX-Forum