summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2018-12-12 12:14:39 +0100
committerKarel Zak2018-12-12 12:14:39 +0100
commit4d09682b3cd91cc96d12a38dba922c1d3dc083d5 (patch)
treed5aba3f8294704fad0b21611669c695b37ae0e4e /disk-utils
parentlslogins: make valid_pwd() more robust (diff)
downloadkernel-qcow2-util-linux-4d09682b3cd91cc96d12a38dba922c1d3dc083d5.tar.gz
kernel-qcow2-util-linux-4d09682b3cd91cc96d12a38dba922c1d3dc083d5.tar.xz
kernel-qcow2-util-linux-4d09682b3cd91cc96d12a38dba922c1d3dc083d5.zip
mkswap: use dd(1) in example rather than fallocate(1)
The man page warns against fallocate on some filesystems and recommends dd(1) as the most portable solution. So, let's use dd(1) also in the example used in the same man page. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1203378 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/mkswap.84
1 files changed, 3 insertions, 1 deletions
diff --git a/disk-utils/mkswap.8 b/disk-utils/mkswap.8
index a6ab8530d..27f922171 100644
--- a/disk-utils/mkswap.8
+++ b/disk-utils/mkswap.8
@@ -124,10 +124,12 @@ e.g.\& using a command like
.nf
.RS
-# fallocate \-\-length 8GiB swapfile
+# dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))
.RE
.fi
+to create 8GiB swapfile.
+
Note that a swap file must not contain any holes. Using
.BR cp (1)
to create the file is not acceptable. Neither is use of