在Aix 5.3上对大文件进行猫/尾/头操作时,我遇到了麻烦。 当要求将几个1Go文件的猫redirect到另一个文件时:
cat file1 file2 file3 > outputfile
输出文件被限制为2Go(cat:输出错误,结果文件为2147483647字节)
文件系统是jfs2。 我成功通过ftp 10Gofile upload文件系统没有问题。
我在etc / security / limits中找不到任何相关内容:
default: fsize = -1 core = 2097151 cpu = -1 data = 262144 rss = 65536 stack = 65536 nofiles = 20000
ulimit -a
core file size (blocks) unlimited data seg size (kbytes) 245759 file size (blocks) unlimited max memory size (kbytes) unlimited open files 2000 pipe size (512 bytes) 64 stack size (kbytes) 32768 cpu time (seconds) unlimited max user processes 2048 virtual memory (kbytes) 278527
这个问题在另一台AIX 5.3服务器上不会发生,我只是寻找可能是问题根源的不同configuration。
/ etc / security / limits在服务器上没有问题:
default: fsize = -1 core = 2097151 cpu = -1 data = 262144 rss = 65536 stack = 65536 nofiles = 20000
在服务器上ulimit -a没有问题:
core file size (blocks, -c) 1048575 data seg size (kbytes, -d) 131072 file size (blocks, -f) unlimited max memory size (kbytes, -m) 32768 open files (-n) 20000 pipe size (512 bytes, -p) 64 stack size (kbytes, -s) 32768 cpu time (seconds, -t) unlimited max user processes (-u) 262144 virtual memory (kbytes, -v) unlimited
你说过你使用的是ext2,但是这是一个Linux文件系统。 我假设你的意思是JFS2?
JFS2和cat都支持> 2GB的文件,所以我认为最有可能的是ulimit的值 – 你已经放在/ etc / security / limit的内容中,但是如果你运行
ulimit -a
作为执行猫的人?
如果你真的使用JFS,而不是JFS2,那么你需要检查文件系统是否启用大文件,
Enter smit fs. Select Add/Change/Show/Delete File Systems. Choose Journaled File Systems. Select Change/Show Characteristics of a Journaled File System. Choose the file system that you are using. Scroll down until you get to Large File Enabled.
最后,通过以root用户身份运行以下命令,可以检查是否正在运行64位内核,而不是32位内核:
bootinfo -K
这是一个大写的K。 如果它返回32,那么你应该切换到64位。
伊万