免费注册 查看新帖 |

Chinaunix

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

[SCO UNIX] unixware下文件超过1G就报错?(已经解决) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-28 10:35 |只看该作者 |倒序浏览
unixware下文件超过1G怎么办?
$uncompress abc.tar.Z
UX:uncompress: ERROR: abc.tar: File too large
文件解开应该不到2G,这个包是在另外一个unixware的机器上作的,那个机器上就没报错

[ 本帖最后由 SunPeng040709 于 2008-8-4 09:56 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-07-28 11:49 |只看该作者
看看是否文件系统满了

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
3 [报告]
发表于 2008-07-28 12:39 |只看该作者
提示文件太大,不会是空间已满的问题

论坛徽章:
0
4 [报告]
发表于 2008-07-28 13:55 |只看该作者
应该不会,刚装的系统 

论坛徽章:
0
5 [报告]
发表于 2008-07-28 13:59 |只看该作者
# dfspace
/                   :  Disk space: 59909.34 MB of 66861.79 MB available (89.60%)
/stand              :  Disk space:   18.69 MB of   23.90 MB available (78.20%)
/tmp                :  Disk space:    9.98 MB of    9.99 MB available (99.88%)
/var/tmp            :  Disk space:   39.99 MB of   39.99 MB available (100.00%)
/dev/_tcp           :  Disk space:    0.00 MB of    0.00 MB available ( 0.00%)

Total Disk Space: 59978.03 MB of 66935.70 MB available (89.61%).

那个文件在/文件系统下

[ 本帖最后由 SunPeng040709 于 2008-7-28 14:01 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-07-28 14:06 |只看该作者
# uncompress abc.tar.Z
UX:uncompress: ERROR: abc.tar: File too large
# l
total 2839038
-rw-r--r--    1 oracle   dba      1073741823 Jul 28 11:28 abc.tar
-rw-r--r--    1 oracle   dba       378100302 Jul 28 10:25 abc.tar.Z

论坛徽章:
0
7 [报告]
发表于 2008-07-29 15:06 |只看该作者
把根文件系统的大文件支持打开,然后再试试

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
8 [报告]
发表于 2008-07-29 15:51 |只看该作者
UnixWAre and Open unix8下如何配置大文件系统支持

在精华帖看到这篇好帖,可惜是英文,试着翻译成中文,后面的几个参数不熟悉没敢翻译。欢迎高手批评。
UnixWAre and Open unix8下如何配置大文件系统支持(翻译)
How to enable large file support?
如何支持大文件?

Keywords
ou8 800 8.0.0 7.1.0 710 711 7.1.1 unixware7 uw7 large file maximum file length support 2gb 1tb one terabyte gigabyte two enable how to vxfs fsadm ulimit filesize filelength larger uw uware greater than largefile largefiles mkfs openunix openunix8 713 7.1.3
关键字
ou8 800 8.0.0 7.1.0 710 711 7.1.1 unixware7 uw7 large file maximum file length support 2gb 1tb one terabyte gigabyte two enable how to vxfs fsadm ulimit filesize filelength larger uw uware greater than largefile largefiles mkfs openunix openunix8 713 7.1.3 大文件 2G 1T 限制大小

Release
Caldera Open UNIX 8 Release 8.0.0
UnixWare 7 Release 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.1.3
适合版本
Caldera Open UNIX 8 Release 8.0.0
UnixWare 7 Release 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.1.3

Problem
By default, the maximum file length on a UnixWare 7 system is
2 gigabytes, but the maximum possible file length supported by
VXFS filesystems on UnixWare 7 systems is 1 terabyte. How do
I enable this large file support on a VXFS filesystem?
问题
UnixWare 7 系统缺省最大长度是2G,但UnixWare 7 的VXFS文件系统最大可以支持1T。如何才能激活VXFS的大文件支持呢?

NOTE: The maximum supported filesystem size (as opposed to file
size) is 2 terabytes (real filesystem sizes larger than 128
gigabytes have been tested). This support is enabled by default.
注意:最大支持文件系统大小(不是文件大小)是2T(实际测试过128G大小的文件系统)。这项支持是缺省的。

Solution
To enable large files support on the root filesystem:
1. Run fsadm to enable the large file support:

# fsadm -Fvxfs -o largefiles /

2. Run fsadm to confirm that the support has been enabled:

# fsadm /

This should report "largefiles".

3. Increase ULIMIT to unlimited:

# ulimit unlimited

4. Ensure SFSZLIM and HFSZLIM are set to "infinity" (which is
represented by 0x7FFFFFFF) and relink the kernel:

# cd /etc/conf/bin
# ./idtune SFSZLIM 0x7FFFFFFF
# ./idtune HFSZLIM 0x7FFFFFFF
# ./idbuild -B

5. Reboot the system using shutdown(1M).
解决办法:
在根文件系统激活大文件支持:

1. 运行fsadm指令激活大文件支持:
#fsadm –Fvxfs –o largefiles /
2. 运行fsadm指令来确认支持已被激活:
#fsadm /
返回结果应当是“largefiles”
3. 增加ULIMIT参数到没有限制:
#ulimit unlimited
4. 修改参数SFSZLIM和HFSZLIM设置到无限大(设置为0x7FFFFFFF)然后重链内核:
# cd /etc/conf/bin
# ./idtune SFSZLIM 0x7FFFFFFF
# ./idtune HFSZLIM 0x7FFFFFFF
# ./idbuild –B
5. 使用shutdown命令重新启动系统
#shutdown –i6 –g0 –y

You should now be able to create files larger than 2GB on root.

To test for a successful creation of a file greater than 2GB:

# dd if=/dev/zero of=big bs=1024k count=2100
# ls -l big
-rw-r--r-- 1 root sys 2202009600 Oct 4 14:34 big

NOTE: Not all utilities are largefiles aware (and shell redirection does
not support greater than 2GB files). For example, you can't create
a file greater than 2GB by using:

# cat file1 file2 >> file3

if file3 exceeds 2GB.

For a list of commands, utilities and APIs that support largefiles,
see the Intro(2) man page on your UnixWare 7 system.
现在你可以在根目录下支持大于2G的文件了。

测试一下建立一个大于2G的文件:
# dd if=/dev/zero of=big bs=1024k count=2100
# ls -l big
-rw-r--r-- 1 root sys 2202009600 Oct 4 14:34 big

注意:大文件支持不是在所有情况下都是有效的(shell重定向产生的文件不能大于2G)。例如,你无法通过如下指令产生大于2G的文件:

# cat file1 file2 >> file3

file3无法大于2G、

可以通过UnixWare 7系统Intro(2) 的man帮助文档查看大文件支持的命令和API列表.

To ensure that non-root users have ULIMIT=unlimited, change the
ULIMIT parameter in /etc/default/login to unlimited.

NOTE: Running "ulimit" after running the changes above should return the
value:

4194303

为了使非root用户的参数ULIMIT=unlimited,要把/etc/default/login中的ULIMIT参数改为unlimited.

注意:上述动作完成后运行ulimit指令应当返还如下值:

4194303

NOTE: You can also increase the following kernel parameters for large
database use, such as Oracle, as in step 4 above:

注意:你也可以仿照上述第四步通过修改如下核心参数支持大数据库使用(如Oracle)

SDATLIM 0x7FFFFFFF
HDATLIM 0x7FFFFFFF
SSTKLIM 0x7FFFFFFF
HSTKLIM 0x7FFFFFFF
SVMMLIM 0x7FFFFFFF
HVMMLIM 0x7FFFFFFF

NOTE: Increasing SFNOLIM to above 1024 may also cause "netcfg" to take
several minutes to load each component. It is recommended to put
the server into Single User Mode (init 1 or at the boot logo press
space and enter "INITSTATE=S" then press ENTER followed by "go").
注意:把参数SFNOLIM增加到大于1024可能导致”netcfg”命令花费几分钟时间来引导每个组件。建议做这个动作时把系统切换到单用户模式 (用指令init 1或在启动引导界面出现logo时按空格然后回车输入 "INITSTATE=S" ,按回车然后输入"go").

NOTE: You can also increase SCORLIM and HCORLIM but you should be aware that
if you application core dumps then the size of the core file will
equal that of memory.
注意:你可以增加SCORLIM和HCORLIM参数值,但在应用程序core dumps后会产生同样大小的core文件.

NOTE: It is not recommended to set the file size to unlimited on the root filesystem in order to ensure that the root file system does not run of disk space unnecessarily.
注意:为了保证root文件系统不占用不必要的空间,不建议在root文件系统设置文件大小限制为unlimited.

NOTE: If you system has large processes that require more memory than the standard kernel configuration will allow, and therefore you find that they are slow then increasing SSTKLIM/HSTKLIM and SVMMLIM/HVMMLIM will adddress this.

SVMMLIM: (max 0x7FFFFFFF) is the soft limit specifying the maximum
address space that can be mapped to a process (HVMMLIM is the hard
limit).

STKLIM: (max 0x7FFFFFFF) is the the maximum stack size for a process
and the process stack resides within the [SH]VMMLIM address space) -
HSTKLIM is the hard limit.

ie. This is 4GB - 1 byte; 32bit architecture.

Therefore, the maximum amount of RAM that one process can consume is
no more than 4GB.

By default, the entries in /etc/conf/cf.d/mtune are set to:

value Default Min Max
----- ------- --- ---
SVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
HVMMLIM 0x9000000 0x1000000 0x7FFFFFFF
SSTKLIM 0x1000000 0x2000 0x7FFFFFFF
HSTKLIM 0x1000000 0x2000 0x7FFFFFFF

SEE ALSO: fsadm_vxfs(1M) and Intro(2)

Page 29 of the UnixWare 7 Getting Started Guide.

Technical Article 105805, "How can I set up extra filesystems or slices on my boot
disk?"

Technical Article 105408, "UnixWare 2.0.*, How can I tune my system to allow a process to use more memory?"
经过实践发现还需要执行下一步才能实现:
1.激活大文件系统的支持
A.注意:需要umount文件系统,最好在建用户之前做好,否则将破坏该文件系统的所有文件。
B.这是对单个文件系统的操作,例如要激活/usr1的大文件支持,先执行:umount /usr1,卸载该文件系统。
C.然后可以先用命令mkfs –m /dev/dsk/c0b0t0d0s4查看其文件系统参数,在输出的信息中将nolargefiles前的no去掉并以命令行方式运行,如键入命令:
mkfs –F vxfs –o ninode=unlimited,bsize=1024, inosize=256, logsize=1024,
largefiles /dev/dsk/c0b0t0d0s4 4353614
然后再mount上去即可:mount /dev/dsk/c0b0t0d0s4 /usr1

论坛徽章:
0
9 [报告]
发表于 2008-08-04 09:55 |只看该作者
谢谢楼上各位的指点,已经设置好了!

论坛徽章:
0
10 [报告]
发表于 2008-08-04 10:40 |只看该作者
原帖由 SunPeng040709 于 2008-8-4 09:55 发表
谢谢楼上各位的指点,已经设置好了!

是否是开启文件系统的大文件支持之后解决的问题?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP