The Solaris operating environment now supports files larger than approximately 2 Gbytes. New interfaces are provided to operate on large files for developers who want to do asynchronous I/O to large files.
The large files project supports files that are larger than or equal to 2 Gbytes. Large file semantics are supported on UFS, NFS, and CacheFS file systems. Applications are able to create and access files up to
One Tbyte on UFS mounted file systems
The limit of the NFS server for NFS and CacheFS mounted file systems.
Existing file I/O interfaces have been modified to detect an error when they are used with a large file. New data types (most with suffixes of 64 or 64_t) and new interfaces (most with suffixes of 64) are provided to operate on large files.
A new mount option is available to disable the large-file support on UFS file systems. This gives the system administrator a way to ensure that older applications that are not able to safely handle large files will continue to work.
The default mount option is largefiles. The largefiles option means that a file system mounted with this option allows creation of files larger than or equal to 2 Gbytes.
A file system mounted with this option does not have to contain files larger than 2 Gbytes.
Once a file system has been mounted with the largefiles option, if a large file has been created in that file system, it cannot be remounted with the nolargefiles option until the fsck command is run to confirm the absence of large files.
An existing application running on Solaris 2.x software should be checked for the following points:
To make the application large-file compatible (for example, "large-file safe in Solaris 2.6"), examine the application's source code to ensure that use of existing interfaces is appropriate and ensure the correct error-handling characteristics when a large file is encountered.
For your application to work with large files (for example, "large-file aware"), you must examine and modify your source code. Examples of areas to modify include:
Output and in-memory formatting strings such as %ld to %lld
Any variable used for temporary storage of sizes or offset information must be correctly sized to avoid truncation.
Function parameters and return values should be checked and corrected if necessary.
For more information, see NFS Administration Guide and System Administration Guide.
The Solaris operating environment provides a new set of interfaces for developers who want to do asynchronous I/O to large files. The following interfaces accept 64-bit AIO:
aio_read64
aio_write64
lio_listio64
aio_suspend64
aio_error64
aio_return64
The following interfaces exist, but are not supported:
aio_fsync64
aio_cancel64
These interfaces also work with KAIO. KAIO is the optimized path for doing I/O to raw files. When using the interfaces with KAIO to raw files, there is a significant performance improvement.
The Solaris operating environment supports another set of AIO interfaces that pre-dates POSIX. These interfaces have also been updated for large file support:
aioread64
aiowrite64