max. size of file | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

max. size of file

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-14-2006
sameerghogre sameerghogre is offline
Registered User
 
Join Date: Jan 2006
Last Activity: 8 April 2010, 7:57 AM EDT
Location: chennai
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old 03-14-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Registered User
 
Join Date: Apr 2002
Last Activity: 3 April 2014, 2:50 PM EDT
Location: On my motorcycle
Posts: 3,092
Thanks: 1
Thanked 29 Times in 9 Posts
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 09:36 AM..
Sponsored Links
    #3  
Old 06-20-2007
suresh_chinwin suresh_chinwin is offline
Registered User
 
Join Date: Jun 2007
Last Activity: 20 June 2007, 5:57 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to read file size and send email only if size > 0. welldone Shell Programming and Scripting 5 04-29-2011 10:03 AM
The scripts not able to make the file to size 0, every times it go back to its original size mridul10_crj Shell Programming and Scripting 0 10-03-2010 05:55 AM
Directory size larger than file system size? sparcman Solaris 6 12-10-2009 09:21 AM
find with file size and show the size rpraharaj84 Shell Programming and Scripting 3 10-06-2009 01:42 PM
command to find out total size of a specific file size (spread over the server) abhinov Solaris 3 08-08-2007 06:48 AM



All times are GMT -4. The time now is 01:52 AM.