swapon.1m (2010 09)

s
swapon(1M) swapon(1M)
40MB of file system paging.
/usr/sbin/swapon -l 5000 -r 10000 -p 2 /paging
/usr/sbin/swapon /paging 0 5000 10000 2
This example enables paging to two block devices and sets the priority of both devices to 0.
/usr/sbin/swapon -p 0 /dev/dsk/c10t0d0 /dev/dsk/c13t0d0
This example enables paging to a block device, using the space after the end of the file system for paging
and letting the priority default to 1.
/usr/sbin/swapon -e /dev/dsk/c4t0d0
This example enables paging to a block device, forcing paging even if a file system exists on the device.
/usr/sbin/swapon -f /dev/dsk/c12t0d0
This example defines the primary paging device for the next boot, using the space after the end of the file
system to the end of the device for paging.
/usr/sbin/swapon -s -e /dev/disk/disk10
This example defines the primary paging device for the next boot, using 8192Kb of the device for paging,
starting 1024Kb from the start of the device.
/usr/sbin/swapon -s -S 1024 -L 8192 /dev/disk/disk10
WARNINGS
On 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
dump corruption. You could use the -U option of vxassist (1M) to do the same.
Once file system blocks have been allocated for paging space, the file system cannot be unmounted unless
the system is rebooted.
If any paging area becomes unavailable while the system is running, for example if a network failure
occurs while paging to a remote system, the system will immediately halt.
The file system block size used by the -l, -m, and
-r options varies between file systems, and is defined
by the system administrator at the time the file system is created. The
dumpfs command can be used to
determine the block size for a particular file system (see dumpfs (1M)).
When using the
-l and -r options, the reserve space specified by the
-r option takes precedence over
the
-l option. Thus, if:
D = Total disk space available to ordinary users
R = Reserve space specified by the
-r option
limit = Paging space limit specified by the -l
option
L = Space currently available to the paging system
F = Space currently occupied by the file system
the following relationships hold:
F + R + limit < D In normal operation
L =0 IfF + R >= D
0<=L <= limit If F + R + limit >= D
FILES
/dev/dsk/ccardttarget ddevice Normal paging devices
/etc/fstab File system table
/var/adm/crash/.savecrash.LCK
List of devices being used by savecrash command
AUTHOR
swapon was developed by HP and the University of California, Berkeley.
SEE ALSO
kctune(1M), savecrash(1M), swapinfo(1M), vxassist(1M), swapctl(2), swapon(2), fstab(4), swchunk(5).
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010