HP-UX Reference (11i v1 00/12) - 1M System Administration Commands N-Z (vol 4)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1m/naaagt.1m
________________________________________________________________
___ ___
s
swapon(1M) swapon(1M)
dev Device paging areas.
fs File system paging areas.
local Paging areas defined on the local system.
remote Paging areas defined on remote systems.
-u Unlock block device files which are being used by the savecore command. Nor-
mally, swapon will not enable paging on a device if it is being used by savecore to
retrieve system dump information. The list of devices in use is maintained in the file
/etc/savecore.LCK. This option forces the device to be enabled, which may
overwrite any system dump information contained on the device. This option should
be used with extreme caution.
RETURN VALUE
swapon returns one of the following values:
0 Successful completion.
>0 An error condition occurred.
EXAMPLES
The first two examples enable paging to the file system containing the /paging directory. The maximum
number of file system blocks available to the paging system is set to 5000, the number of file system blocks
reserved for file system use only is set to 10000, and the priority is set to 2. The number of file system
blocks initially taken by the paging system defaults to 0 in the first example, and is set to 0 in the second
example. On a file system with the default 8kB block size, these examples allocate approximately 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
WARNINGS
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 unavailablewhile 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 availableto 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
Section 1M846 3 HP-UX Release 11i: December 2000
___
___