HP-UX Reference (11i v2 03/08) - 1M System Administration Commands N-Z (vol 4)

s
swapon(1M) swapon(1M)
After a file system has been enabled for paging, the optional arguments can be modified by subsequent
swapon commands.
Options
swapon recognizes the following options and arguments:
-a Cause all devices marked as swap
and all file systems marked as swapfs in the
file
/etc/fstab to be made available to the paging system. The options field in
/etc/fstab entries is read by swapon, and must contain elements formatted as
follows:
min=min See the -m option for the value of min.
lim=limit See the -l option for the value of limit. (File system paging areas
only.)
res=reserve See the -r option for the value of reserve . (File system paging
areas only.)
pri=priority See the -p option for the value of priority . (File system paging
areas only.)
end See the -e option for the meaning of this option. (Device paging
areas only.)
See fstab (4) for an example entry.
-e Use space after the end of the file system on the block device for paging. An error
message is returned if no file system is found on the device. This option cannot be
used with the -f option. Do not confuse this with paging to a file system. This
option is for use with a disk that has both a file system and dedicated paging space
on it.
-f Force the device to be enabled, which will destroy the file system on it. Use with
extreme caution. Normally, if a file system exists on the device to be enabled,
swapon fails and displays an error message. This option cannot be used with the
-e option.
-l limit limit specifies the maximum space the paging system is allowed to take from the
disk, provided space is available that is not reserved for exclusive use by the file
system. The value of limit is rounded up so that it is a multiple of the paging allo-
cation chunk size, which is set with the kernel tunable parameter swchunk (see
swchunk(5), kctune(1M), and swapinfo(1M)). See WARNINGS. The default value
for limit is 0, indicating there is no limit to the amount of file system space the pag-
ing system can use.
limit can be specified in decimal (no prefix), octal (
0 prefix), or hexadecimal (
0x
prefix). It may be specified in units of kilobytes (k suffix), megabytes (
M suffix), or
file system blocks (no suffix). (A kilobyte is 1024 bytes; a megabyte is 1024 kilo-
bytes; the size of a file system block is determined by the administrator when the
file system is created.)
-m min min indicates the space the paging system will initially take from the file system.
The value of min is rounded up so that it is a multiple of the paging allocation
chunk size, which is set with the kernel tunable parameter swchunk (see
swchunk(5), kctune(1M), and swapinfo (1M)). The default value for min is 0, indi-
cating no paging space is to be allocated initially. min can be specified in the same
forms as limit, above.
-p priority priority indicates the order in which space is taken from the file systems and dev-
ices used for paging. Space is taken from the systems with lower priority numbers
first. Under most circumstances, space is taken from device paging areas before file
system paging areas, regardless of priority. See "Paging Allocation" in
swapinfo(1M) for more information. priority can have a value from 0 to 10 and has
a default value of 1.
-r reserve reserve specifies the space, in addition to the space currently occupied by the file
system, that is reserved for file system use only, making it unavailable to the paging
system. This reserved space is in addition to the minimum free space specified by
the administrator when the file system was created. See WARNINGS. The default
HP-UX 11i Version 2: August 2003 2 Hewlett-Packard Company Section 1M793