The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Error checking a file from previous file size stuck1 Shell Programming and Scripting 2 12-06-2007 08:39 AM
compare file size from a output file from a script moustik Shell Programming and Scripting 7 11-07-2007 10:17 AM
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 06:48 AM
Strange difference in file size when copying LARGE file.. 0ktalmagik Filesystems, Disks and Memory 1 06-03-2006 07:34 PM
how to test for file existence using file size? forevercalz Shell Programming and Scripting 3 10-26-2005 10:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-14-2006
sameerghogre sameerghogre is offline
Registered User
  
 

Join Date: Jan 2006
Location: chennai
Posts: 2
max. size of file

I wants to ask that what is the max size of file that we can create in the unix file system.
  #2 (permalink)  
Old 03-14-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Information found at Sunsolve:

Quote:
Definitions

*

1 Mbyte (megabyte) 2^20 bytes (1,048,576 bytes)
*

1 Gbyte (gigabyte) 2^30 bytes (1,073,741,824 bytes)
*

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

In general if this document refers to a limitation of (for instance) 2 Gbyte, “2 Gbyte – 1 byte” (1,073,741,823 bytes) is meant. To improve readability, this has been abbreviated to “2 Gbyte”.

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

Maximum size of a single file and a filesystem

This also applies to Solaris x86, but there may be some issues with disk drives larger than 30 Gbyte. This is due to hardware limitations with some PC motherboard/disk configurations.
Code:

OS Release                                 Single file         File system

Solaris 2.5.1                                 2 Gbyte          1 Tbyte

Solaris 2.6 - 9 12/02 (U3)                   ~1012 Gbyte        1 Tbyte

Solaris 9 08/03(U4)- Solaris 10 FCS       ~1023 Gbyte          16 Tbyte
*A single file in Solaris 2.6 through Solaris 9 (U3) is limited to approximately 1012 Gbyte because the file must fit inside the 1 Tbyte filesystem.

The filesystem is nominally 1 Tbyte, but in fact, due to the overhead in such a large filesystem, the largest single file ends up being about 1012 Gbyte. (part of this is a bug, but even if bug-free, a single file can't be 1 Tbyte due to the filesystem overhead).

The overhead in the filesystem includes amongst other things, items such as superblock backups and inode tables.

The example given here is using 1024 Kbyte (1 Mbyte) for the number of bytes per inode (nbpi) within the UFS filesystem.

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

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

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

On a 1 Tbyte filesystem minfree is set to 1% which translates to about 10 Gbyte.

*

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 filesystems 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 2 Gbyte, but any space above 2 Gbyte 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 2 Gbyte. There can be multiple swap slices or files totaling more than 2 Gbyte. Any later release of Solaris running 32 bit kernel has the same limitation. Later releases of Solaris running a 64 bit kernel do not have this limitation. See the “USAGE” paragraph in the Solaris 8 swap(1M) manual page for the new limits.

*

Solaris 9 Update 4 introduced multiterabyte UFS. The maximum individual file size is still the same as before (~1 Tbyte ), as increasing it would require radical on-disk format changes. The total filesystem size can now be up to 16 Tbyte. 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 Tbyte, for instance. A 4 Tbyte 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 1 Tbyte is 1 Tbyte minus 500 Mbyte or 1023.5 Gbyte As a rule of thumb this should be taken as 1023 Gbyte.

*

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

*

A multiterabyte UFS filesystem is not mountable in any version of 32bit Solaris kernel

Limitations in combination with the OBP.

Excluding the multiterabyte root filesystem limitation detailed above, the root filesystem 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 /etc/release file

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

Here is a list of the various possible configurations.
Code:
OBP level                         OS Release            Max root filesystem size

OBP 3.1beta1 or newer  Solaris 2.5.1 Kernel Patch 103640      No limit
                                 Kernel Patch 103640 (08) or newer	

OBP 3.1beta1 or newer  Solaris 2.6                                No limit

OBP 3.0 or earlier          Solaris 2.5.1                        2Gbyte
                         Kernel Patch 103640 (07) or older.
	
OBP 3.0 or earlier   Solaris 2.6 on an Ultra (sun4u)             4Gbyte
“No limit” means that the root filesystem size is not specifically limited; the usual filesystem size limits for that OS release still apply.

A root filesystem that is too large will not cause a panic, but instead will stop the machine from booting at all.

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.

Solaris 10 & ZFS

Limitations of a single file and filesystem.

These limitations will change when ZFS is integrated into Solaris 10.

Some more info about this can be found on the following website:

http://www.sun.com/software/solaris/ds/zfs.jsp

Last edited by RTM; 03-14-2006 at 10:36 AM..
  #3 (permalink)  
Old 06-20-2007
suresh_chinwin suresh_chinwin is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 1
max file size in unix

The max file size in unix is determined by the ulimit option. The ulimit stands for user limit which specifies the largest file that can be created by the user.

$ulimit

2097152

means that the max size of a file that can be created is 2097152 bytes or 2048 KB.

We can also reset the ulimit value

$ulimit=1 specifies that the user limit is now 512 bytes(1 refers to 512 block) and is only active for this session.

A normal user can decrease the ulimit value but only the superuser(root) has the permissions to increase this value.

Hope this clears your doubt. Thank you.

Suresh.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:24 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0