Chinaunix首页 | 论坛 | 博客
  • 博客访问: 566113
  • 博文数量: 375
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 15
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-20 10:21
文章分类

全部博文(375)

文章存档

2015年(1)

2014年(374)

分类:

2014-09-03 11:45:11

ulimit命令可以用来限制文件的大小,取消file size限制, ulimit -f unlimited 即可.

ulimit -a查看当前shell的一些设置状态.

通常文件系统默认支持大文件.不须做修改,mount命令可以查看文件系统挂接的选项.

有nolargefile标志的表示限制大文件.

 

 

 

 

Document Audience:

PUBLIC

Document ID:

76856

Title:

Filesystem Size Limitations in Solaris[TM]

Update Date:

Fri Mar 04 00:00:00 MST 2005

Products:

 Operating Environments,  Solaris

Technical Areas:

 Filesystem



Keyword(s):limitations, ufs, limits, filesystem, file system

Description

 

This document will describe the limitations of the filesystem for the Solaris [TM] Operating Environment. The effect of OpenBoot[TM] PROM (OBP) revisions on filesystem size limitations is also discussed.

Document Body

 

Definitions

·         1MByte (megabyte) 2^20 bytes (1,048,576 bytes)

·         1GByte (gigabyte) 2^30 bytes (1,073,741,824 bytes)

·         1TByte (terabyte) 2^40 bytes (1,099,511,627,776 bytes)

In general if this document refers to a limitation of (for instance) 2GB, “2GB ?C 1 byte” (1,073,741,823 bytes) is meant. To save space this has been abbreviated to “2GB”.

The symbol “~” is used to denote “approximately”

Maximum size of a single file and a filesystem

This part also applies to Solaris x86 (but there might be some issues with disk drives larger than 30GB. This is due to hardware limitations with some PC motherboard/disk configurations.

OS Release

Single file

File system

Solaris 2.5.1

2 GB

1 TB

Solaris 2.6 - 9 12/02 (U3)

~1012 GB

1 TB

Solaris 9 08/03 (U4) and later

~1023 GB

16 TB

·         A single file in Solaris 2.6 through Solaris 9 (U3) is limited to about 1012 Gb

because the file must fit inside a filesystem.

The filesystem is nominally 1 Tb, but in fact, one must create enough overhead in such a large filesystem that the largest single file ends up being about 1012 Gb. (part of this is a bug, but even if bug-free, a single file can't be 1 Tb).

Overhead includes among other things items such as superblock backups and inode tables.

The example given here is using the value of nbpi=1024k (1MByte).

If nbpi is set to a lower number, more file system space will be allocated to inode tables and less will be available to store data.

With nbpi=8k, the maximum single file size would be smaller than 1012Gb.

Also, this  file cannot use any of the minfree area set up on the filesystem (which is setup for “root only” use).

On a 1TByte filesystem minfree is set to 1% which translates to about 10Gb.

·         A safe assumption here would be that the limit on the size of a single file is the size of the filesystem,minus 1% to 2% overhead.

·         In Solaris 2.6, the swap and tmpfs file systems are still limited to 2 GByte.  This is not the total amount of swap, it is a limit per swap slice or per swap file. A swap slice or file may  be defined as larger than 2GByte, but any space above 2GByte in that slice or file will not be accessible and the size of the slice or file will be reported by the swap  command as 2GByte.  There can be multiple swap slices or files totaling more than 2GByte.  Also, any later release of Solaris running 32 bit kernel has the above limit.  Later releases of Solaris  running a 64 bit kernel do not have that limit. See the “USAGE” paragraph in the Solaris 8 swap(1M) manual page for the new limits.

·         Solaris 9 Update 4 has introduced a Multiterabyte ufs.  The maximum individual file size is still the same as before (~1Tb ), because increasing it would  require redical on-disk format changes.  But the total filesystem size can now be up to 16TB.  The -T option is specified to the newfs command to create such a filesystem.  See the newfs(1M) manpage for additional information.  There is also a limit of 1 million files per TB (for instance. a 4TByte UFS filesystem would have a 4 million files limit).  This is done to keep fsck times reasonable (even when logging is enabled).

·         Multiterabyte ufs functionality can also be added to earlier releases of Solaris 9 by installing the  UFS patch 113454-09 or later.  See the Special Install Instructions in the patch README for a list of additional patches required to get the full Multiterabyte functionality.

·         The maximum single file size in a Multiterabyte filesystem which is greater than 1TByte is 1TByte minus 500MByte or 1023.5Gb (As a rule of thumb this should be taken as 1023Gbyte).

·         A Multiterabyte UFS filesystem is not bootable (This means the root filesystem cannot be a Multiterabyte filesystem)

·         Multiterabyte UFS is not supported on Solaris x86 and is not mountable in any version of 32bit Solaris kernel

Limitations in combination with the OBP.

The root file system has limits in Solaris[TM] 2.x that are not imposed on any other filesystems.  This limiting factor is a combination of two things, the OS release and the OBP (Open Boot Prom) level.

To establish the OS release, examine the file /etc/release

To establish the OBP level, use the command prtconf -V (capital “V”).

Here is a list of the various possible configurations.

OBP level

OS Release

Max root filesystem size

OBP 3.1beta1 or newer

Solaris 2.5.1

Kernel Patch 103640-08 or newer

No limit

OBP 3.1beta1 or newer

Solaris 2.6

No limit

OBP 3.0 or earlier

Solaris 2.5.1

Kernel Patch 103640-07 or earlier

2GB

OBP 3.0 or earlier

Solaris 2.6 on an Ultra (sun4u)

4GB

“No limit” means that the root filesystem size is not specifically limited; the usual filesystem size limit for that OS release still applies.

Having too large a root filesystem does not cause a panic.  It will cause the system to fail to boot.  

This is not configurable/tunable.  To use a root filesystem larger than the limits detailed above you need a newer boot PROM and either Solaris 2.6 or Solaris 2.5.1 with the latest level of 103640 (-08 or newer).

 

阅读(533) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~