免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5592 | 回复: 10
打印 上一主题 下一主题

一个目录下已经创建了3万多个自目录,无法再创建目录(急!) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-02-27 18:03 |只看该作者 |倒序浏览
一个目录下已经创建了3万多个自目录,无法再创建目录(急!)\r\n\r\n# pwd\r\n/picdatanfs/databak/testapp/ClaimUploadImages/continent/2006/2/DAA\r\n# mkdir a\r\nmkdir: 0653-358 Cannot create a.\r\na: There are too many links to a file.\r\n# pwd\r\n/picdatanfs/databak/testapp/ClaimUploadImages/continent/2006/2/DAA\r\n# ls -l |wc\r\n   32766  294887 2621212\r\n# df -k\r\nFilesystem    1024-blocks      Free %Used    Iused %Iused Mounted on\r\n/dev/hd4           524288    452844   14%     3226     2% /\r\n/dev/hd2          4194304   1794336   58%    41847     4% /usr\r\n/dev/hd9var       1048576    952812   10%      401     1% /var\r\n/dev/hd3          2097152    821532   61%     1521     1% /tmp\r\n/dev/hd1          6291456   3436552   46%    83246     6% /home\r\n/proc                   -         -    -         -     -  /proc\r\n/dev/hd10opt      2097152   2009388    5%      593     1% /opt\r\n/dev/oralv        8388608   3616828   57%    74144     4% /oracle\r\n/dev/weblv        4194304   2561508   39%    33022     4% /home/weblogic\r\n/dev/piclvnfs   104857600  11870296   89%  2056652    43% /picdatanfs\r\n/dev/stdarch     25165824  13742232   46%       68     1% /stdarch\r\n#\r\n\r\n文件系统是JFS2的\r\n# instfix -i |grep ML\r\n    Not all filesets for 5.2.0.0_AIX_ML were found.\r\n    Not all filesets for 5200-01_AIX_ML were found.\r\n    Not all filesets for 5200-02_AIX_ML were found.\r\n    All filesets for 5200-03_AIX_ML were found.\r\n    Not all filesets for 5200-04_AIX_ML were found.\r\n    Not all filesets for 5200-05_AIX_ML were found.

论坛徽章:
0
2 [报告]
发表于 2006-02-27 18:42 |只看该作者
是否单个目录下创建的目录个数有2^15限制?\r\n能否修改这个限制?

论坛徽章:
0
3 [报告]
发表于 2006-02-28 00:16 |只看该作者
这个限制是在/usr/include/sys/limits.h里定义的:\r\n\r\nthe LINK_MAX value is set to 32767\r\n\r\n#define LINK_MAX        SHRT_MAX\r\n../..\r\n#define SHRT_MAX        (32767)\r\n\r\n\r\n所以一个目录不能够拥有超过32767个 子目录. \r\n\r\n以下是英文解析:\r\nThis is due to the fact that \"..\" in each subdirectory is a hard-link back to\r\nthe parent directory and the link count is implemented with a signed 16\r\nbit quantity. Hence the error, EMLINK. Regular files are ok since they\r\ndo not require this link. You could work around this limitation by using\r\nsymbolic <links> to directories\r\n\r\n/usr/include/sys/limits.h as the LINK_MAX value set to 32767\r\n\r\n#define LINK_MAX        SHRT_MAX\r\n../..\r\n#define SHRT_MAX        (32767)\r\n\r\n\r\n这个限制是hard-coded, 没办法改。\r\n\r\n只能是其他的办法,譬如创建一个symbolic link 。

论坛徽章:
0
4 [报告]
发表于 2006-02-28 10:03 |只看该作者
多谢!\r\n\r\n听说sun下面可以修改内核,难道AIX下就不能实现?郁闷。

论坛徽章:
0
5 [报告]
发表于 2006-02-28 14:12 |只看该作者
搞编程的应该对32767 这个值比较敏感,这是个c的限制\r\n各种无符号类型量所占的内存空间字节数与相应的有符号类型量相同。但由于省去了符号位,故不能表示负数。 下表列出了Turbo C中各类整型量所分配的内存字节数及数的表示范围。\r\n\r\n类型说明符    数的范围     分配字节数\r\nint       -32768~32767     ■■ \r\nshort int    -32768~32767     ■■\r\nsigned int    -32768~32767     ■■\r\nunsigned int   0~65535        ■■\r\nlong int  -2147483648~2147483647  ■■■■\r\nunsigned long  0~4294967295     ■■■■

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
6 [报告]
发表于 2006-02-28 17:07 |只看该作者
仰望 楼上的···············

论坛徽章:
0
7 [报告]
发表于 2006-05-16 14:36 |只看该作者

问题解决了吗?我也有相同问题,还不知道如何处理。烦请告知。谢谢!

问题解决了吗?我也有相同问题,还不知道如何处理。烦请告知。谢谢!

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-11-09 06:20:00
8 [报告]
发表于 2006-05-16 15:04 |只看该作者
那意思是没办法改了,看来不能多于72766呀.

论坛徽章:
0
9 [报告]
发表于 2006-05-16 20:55 |只看该作者
PFPF,\r\n\r\nHOW TO SOLVE IT?

论坛徽章:
0
10 [报告]
发表于 2006-08-31 10:21 |只看该作者
同问,symbolic link 怎么解决?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP