United States-English |
|
|
HP-UX System Administrator's Guide: Routine Management Tasks: HP-UX 11i Version 3 > Chapter 3 Managing SystemsManaging Large Files |
|
HP-UX supports large files (greater than 2 GB), however, when working with large files be aware of these issues: If you want a file system to support large files (greater than 2 GB), then large files must be enabled. HFS file systemsThe default for HFS file systems is nolargefiles. To enable the use of large files, you must explicitly enable this feature. You can create a large-files file system using the mkfs command or the newfs command. VxFS file systemsThe default for VxFS file systems is largefiles. To prevent the use of large files, you must explicitly disable them for VxFS file systems. In case the default changes in a future release, it is a good idea to explicitly set either the largefiles or nolargefiles option when you create a file system. See theexamples in the following sections. The following examples show different ways to create a large-files file system.
The following examples show different ways to create a file system that will not support large files.
You can change a file system back and forth between largefiles and nolargefiles using the HP System Management Homepage (HP SMH) or the fsadm command (shown below). To make the change using the HP System Management Homepage:
To convert an HFS file system from largefiles to nolargefiles, the file system must be in a clean state[4] and must be unmounted. Also, in order for the fsadm command to succeed in the conversion from a largefiles mode to a nolargefiles mode, you must first remove an files that are greater than 2GB in size. The following example shows how to convert a largefiles HFS file system to a nolargefiles HFS file system.
VxFS file systems: Unlike HFS file systems, VxFS file systems can be switched between largefiles and nolargefiles without unmounting (and without requiring an fsck operation to verify file system state). However, as with HFS file systems, you must remove any large files (files with size greater than 2GB) from the file system before a switch between largefiles to nolargefiles will succeed. All of the file system administration commands, as well as all file system user commands, for HFS and VxFS support large files (greater than 2 GB in size). If a command that does not support large files encounters a large file, the command will return an [EOVERFLOW] error and print a message like the following: The fsck(1M) command repairs damaged file systems. Typically, large files should not appear in a no-large-files file system. There are two ways fsck recovers from this situation if a large file does appear. In the first scenario, you use fsck in the interactive mode. fsck finds a large file on a no-large-files file system, marks the file system dirty and stops. You can then correct the situation using the fsadmcommand with the -o largefiles option. The fsck command repairs the file system, which you are then able to mount. This scenario would preserve the large file, if fsck did not find it corrupt in any other way. In the second scenario, using non-interactive mode, fsck purges the large file on a no-large-files file system. fsck assumes the superblock to be accurate based on its accuracy checks since the probability of a superblock being corrupt is insignificant when compared to the instance of a large file manifesting in a no-large-files file system. Consequently, fsck will remove the large file from a file system it believes should not contain large files. The mount command supports large-files file systems and provides you with a method of ensuring that no large-files file systems are mounted on the system. The mount command uses the same two options as the mkfs, newfs, and fsadm commands (largefilesand nolargefiles). mount will not mount a large-files file system if the -o nolargefiles option is specified. Conversely, the mount command will not mount a no-large-files file system if the -o largefiles option is specified. If no option is provided to mount, it will use the state of the file system itself to determine if it is mounted as largefiles or nolargefiles. [4] Use the fsck command to check the state of, and if necessary repair HFS file systems. See the fsck(1M) and fsck_hfs(1M) manpages |
Printable version | ||
|