|
|
HP-UX Reference > Sswapon(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEswapon() — add swap space for interleaved paging/swapping DESCRIPTIONThe swapon() system call makes a block device or a directory named path available to the system for paging and swapping. priority indicates the order in which the swap space from the device or file system is used. Space is taken from the lower-priority systems first. swapon() can be used only by users who have appropriate privileges. If path names a block device fileswapon() makes it available to the system at the specified priority for allocation for paging and swapping. In this form, swapon() takes only two arguments: the path to the block device file, and the priority. The device associated with path can be a device already known to the system, defined at system configuration time, or it can be a previously unspecified device. If the device was already defined at system configuration time and also has a start and/or size defined for that swap device, these values are used. Otherwise, if a filesystem exists on the device, swap is added following the filesystem, or if no filesystem exists, the complete device is used for swap. See the appropriate system administrator's manual for information on how the size of the swap area is calculated. If path names a directoryswapon() makes the blocks on the file system rooted at path available for paging and swapping. The min, limit, and reserve arguments are passed and used only if the path argument names a directory. min indicates the number of file system blocks to take from the file system when swapon() is called. limit indicates the maximum number of file system blocks the swap system is allowed to take from the file system. reserve indicates the number of file system blocks that are saved for file system use only. ERRORSIf swapon() fails, errno is set to one of the following values.
WARNINGSOn systems running VxVM 3.5, the swap volumes to be configured for system crash dumps should be created with the usage type as swap during the creation of the swap volume. Not doing so will cause a dump corruption. You could use the -U option of vxassist(1M) to do the same. No means is available to stop swapping to a device. The system allocates no less than the amount specified in min. However, to make the most efficient use of space, more than the amount requested might be taken from the file system. The actual amount taken will not exceed the number of file system blocks indicated in reserve. Swapping to a file system is usually slower than swapping to a device. Once file system blocks have been allocated for swap space, the file system can not be unmounted unless the system is rebooted. |
|