diff options
Diffstat (limited to '')
-rw-r--r-- | disk-utils/mkswap.8 | 27 | ||||
-rw-r--r-- | disk-utils/mkswap.8.adoc | 15 |
2 files changed, 35 insertions, 7 deletions
diff --git a/disk-utils/mkswap.8 b/disk-utils/mkswap.8 index 3beeecc..dd53233 100644 --- a/disk-utils/mkswap.8 +++ b/disk-utils/mkswap.8 @@ -2,12 +2,12 @@ .\" Title: mkswap .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 -.\" Date: 2023-12-01 +.\" Date: 2024-03-20 .\" Manual: System Administration -.\" Source: util-linux 2.39.3 +.\" Source: util-linux 2.40 .\" Language: English .\" -.TH "MKSWAP" "8" "2023-12-01" "util\-linux 2.39.3" "System Administration" +.TH "MKSWAP" "8" "2024-03-20" "util\-linux 2.40" "System Administration" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 @@ -31,14 +31,16 @@ mkswap \- set up a Linux swap area .SH "SYNOPSIS" .sp -\fBmkswap\fP [options] \fIdevice\fP [\fIsize\fP] +\fBmkswap\fP [options] \fIdevice\fP [\fIblocks\fP] +.sp +\fBmkswap\fP [options] \-\-size \fIsize\fP \-\-file \fIfile\fP .SH "DESCRIPTION" .sp \fBmkswap\fP sets up a Linux swap area on a device or in a file. .sp The \fIdevice\fP argument will usually be a disk partition (something like \fI/dev/sdb7\fP) but can also be a file. The Linux kernel does not look at partition IDs, but many installation scripts will assume that partitions of hex type 82 (LINUX_SWAP) are meant to be swap partitions. (\fBWarning: Solaris also uses this type. Be careful not to kill your Solaris partitions.\fP) .sp -The \fIsize\fP parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024\-byte blocks. \fBmkswap\fP will use the entire partition or file if it is omitted. Specifying it is unwise \- a typo may destroy your disk.) +The \fIblocks\fP parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024\-byte blocks. \fBmkswap\fP will use the entire partition or file if it is omitted. Specifying it is unwise \- a typo may destroy your disk.) .sp After creating the swap area, you need the \fBswapon\fP(8) command to start using it. Usually swap areas are listed in \fI/etc/fstab\fP so that they can be taken into use at boot time by a \fBswapon \-a\fP command in some boot script. .SH "WARNING" @@ -55,6 +57,11 @@ However, \fBmkswap\fP refuses to erase the first block on a device with a disk l Check the device (if it is a block device) for bad blocks before creating the swap area. If any bad blocks are found, the count is printed. .RE .sp +\fB\-F\fP, \fB\-\-file\fP +.RS 4 +Create a swap file with the appropriate file permissions and populated blocks on disk. +.RE +.sp \fB\-f\fP, \fB\-\-force\fP .RS 4 Go ahead even if the command is stupid. This allows the creation of a swap area larger than the file or partition it resides on. @@ -109,6 +116,16 @@ generate a new time\-based UUID Specify the \fIENDIANNESS\fP to use, valid arguments are \fBnative\fP, \fBlittle\fP or \fBbig\fP. The default is \fBnative\fP. .RE .sp +\fB\-o\fP, \fB\-\-offset\fP \fIoffset\fP +.RS 4 +Specify the \fIoffset\fP to write the swap area to. +.RE +.sp +\fB\-s\fP, \fB\-\-size\fP \fIsize\fP +.RS 4 +Specify the size of the created swap file in bytes and may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB"). If the file exists and is larger than \fIsize\fP, it will be truncated to this size. This option only makes sense when used with \fB\-\-file\fP. +.RE +.sp \fB\-v\fP, \fB\-\-swapversion 1\fP .RS 4 Specify the swap\-space version. (This option is currently pointless, as the old \fB\-v 0\fP option has become obsolete and now only \fB\-v 1\fP is supported. The kernel has not supported v0 swap\-space format since 2.5.22 (June 2002). The new version v1 is supported since 2.1.117 (August 1998).) diff --git a/disk-utils/mkswap.8.adoc b/disk-utils/mkswap.8.adoc index 904467d..1721243 100644 --- a/disk-utils/mkswap.8.adoc +++ b/disk-utils/mkswap.8.adoc @@ -16,7 +16,9 @@ mkswap - set up a Linux swap area == SYNOPSIS -*mkswap* [options] _device_ [_size_] +*mkswap* [options] _device_ [_blocks_] + +*mkswap* [options] --size _size_ --file _file_ == DESCRIPTION @@ -24,7 +26,7 @@ mkswap - set up a Linux swap area The _device_ argument will usually be a disk partition (something like _/dev/sdb7_) but can also be a file. The Linux kernel does not look at partition IDs, but many installation scripts will assume that partitions of hex type 82 (LINUX_SWAP) are meant to be swap partitions. (*Warning: Solaris also uses this type. Be careful not to kill your Solaris partitions.*) -The _size_ parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. *mkswap* will use the entire partition or file if it is omitted. Specifying it is unwise - a typo may destroy your disk.) +The _blocks_ parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. *mkswap* will use the entire partition or file if it is omitted. Specifying it is unwise - a typo may destroy your disk.) After creating the swap area, you need the *swapon*(8) command to start using it. Usually swap areas are listed in _/etc/fstab_ so that they can be taken into use at boot time by a *swapon -a* command in some boot script. @@ -41,6 +43,9 @@ However, *mkswap* refuses to erase the first block on a device with a disk label *-c*, *--check*:: Check the device (if it is a block device) for bad blocks before creating the swap area. If any bad blocks are found, the count is printed. +*-F*, *--file*:: +Create a swap file with the appropriate file permissions and populated blocks on disk. + *-f*, *--force*:: Go ahead even if the command is stupid. This allows the creation of a swap area larger than the file or partition it resides on. + @@ -73,6 +78,12 @@ generate a new time-based UUID *-e*, *--endianness* _ENDIANNESS_:: Specify the _ENDIANNESS_ to use, valid arguments are *native*, *little* or *big*. The default is *native*. +*-o*, *--offset* _offset_:: +Specify the _offset_ to write the swap area to. + +*-s*, *--size* _size_:: +Specify the size of the created swap file in bytes and may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB"). If the file exists and is larger than _size_, it will be truncated to this size. This option only makes sense when used with *--file*. + *-v*, *--swapversion 1*:: Specify the swap-space version. (This option is currently pointless, as the old *-v 0* option has become obsolete and now only *-v 1* is supported. The kernel has not supported v0 swap-space format since 2.5.22 (June 2002). The new version v1 is supported since 2.1.117 (August 1998).) |