UFS Maximum File Size (2GB) restriction in Sun Solaris


In Sun Solaris, UFS file system default maximum file size is 2GB which restricts the maximum size of any file will be restricted to 2GB. This can cause problems with applications like Databases. Solaris 10 by default however sets the Maximum file Size to unlimited on the UFS File System.

To check the limits (if any) set on the File System try

solarisserver# ulimit -a | grep file
file(blocks) unlimited
nofiles(descriptors) 256

The ulimit utility sets or reports the file-size writing limit imposed on files written by the shell and its child processes (files of any size may be read). The CSH equivalent for this command is “limit/unlimit”. Do a “man limit” for more info.

or use mount command and check if any file system is mounted with “nolargefiles” option.

solarisserver# mount | grep files
/ on /dev/dsk/c0d0s0 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1980000 on Sat Mar 22 15:32:29 2008
/export/home on /dev/dsk/c0d0s7 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=1980007 on Sat Mar 22 15:32:41 2008

In my case, there is no limit on the maximum file size in the mounted file system.

To overcome the maximum file size limit on the file system by setting or increasing the maximum filesize.

To set the maximum file size in UFS file system, try the following options

Set unlimited maximum filesize using ulimit

solarisserver# ulimit unlimited

Edit the /etc/default/login file

Edit the /etc/default/login file using your favorite editor and uncomment the line “ULIMIT” and set the value to “0” as follows:

ULIMIT=0

Remount the File System with “nolargefiles” option

solarisserver# mount -F ufs -o remount,larefiles /dev/dsk/c0t0d0s7 /export/home

Edit /etc/vfstab

To preserve the setting at system boot, edit the /etc/vfstab and add “largefiles” under the option tab for the file system as follows. The next time the system reboots, the largefiles option is set.

/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7 /export/home ufs 2 yes largefiles

This should fix the Maximum file size issue in UFS File System in Sun Solaris.

2 thoughts on “UFS Maximum File Size (2GB) restriction in Sun Solaris”

  1. I did the ulimit -a | grep file and file(blocks) said unlimited and the nofiles(descriptors) said 256. I checked the vfstab file and the partitions had largefiles in them. We also read on various sites on the net that Solaris UFS had a limitation of 1TB. We tried getting our SunFire V480’s (running Solaris 9) to see a SAN partition that was greater than 1TB but we could not get it to work. The one thing that I did notice was that /etc/default/login ulimit=0 line was commented. Would this be our problem. Our problem is that we have many Terrabites available to us and we want our Solaris box to see more than 1TB. Can we do this?

  2. Pingback: Solaris 8 ufsdump

Leave a Comment

Your email address will not be published. Required fields are marked *