diff options
author | Karel Zak | 2014-10-20 10:59:08 +0200 |
---|---|---|
committer | Karel Zak | 2014-10-20 10:59:08 +0200 |
commit | e07fdac476cb1c52962ec82a1b12c6afc111bd08 (patch) | |
tree | c1c52beeaa8f193221a3c3a3907f60394d703efe /sys-utils/swapon.8 | |
parent | mount: don't ignore mtab for --bind -o remount (diff) | |
download | kernel-qcow2-util-linux-e07fdac476cb1c52962ec82a1b12c6afc111bd08.tar.gz kernel-qcow2-util-linux-e07fdac476cb1c52962ec82a1b12c6afc111bd08.tar.xz kernel-qcow2-util-linux-e07fdac476cb1c52962ec82a1b12c6afc111bd08.zip |
swapon: add -o <list> for compatibility with mount
The new option allows to specify swap options by fstab compatible
string. The concept is the same as for mount(8).
swapon -o pri=1,discard=pages,nofail /dev/sda2
The advantage is that tools (like systmed) that parses fstab can call
swapon without translation from fstab options to swapon(8) command
line options.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/swapon.8')
-rw-r--r-- | sys-utils/swapon.8 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys-utils/swapon.8 b/sys-utils/swapon.8 index 34118fbf4..e88e2f1b2 100644 --- a/sys-utils/swapon.8 +++ b/sys-utils/swapon.8 @@ -130,6 +130,18 @@ Use the partition that has the specified .I /proc/partitions is needed.) .TP +.BR \-o , " \-\-options " \fIopts\fP +Specify swap options by fstab compatible comma separated string. For example: +.RS +.RS +.sp +.B "swapon -o pri=1,discard=pages,nofail /dev/sda2" +.sp +.RE +The \fIopts\fP string is evaluated as the last and overrides all another +options. +.RE +.TP .BR \-p , " \-\-priority " \fIpriority\fP Specify the priority of the swap device. .I priority @@ -149,10 +161,8 @@ Display swap usage summary by device. Equivalent to "cat /proc/swaps". Not available before Linux 2.1.25. This output format is DEPRECATED in favour of \fB\-\-show\fR that provides better control on output data. .TP -.BR \-\-show " [\fIcolumn\fR, ...]" -Display definable device table similar to -.B \-\-summary -output. See +.BR " \-\-show" [ =\fIcolumn\fR] +Display definable table of swap areas. See .B \-\-help output for a list of available columns. .TP |