]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/mkswap.8
swapon: rewrite section about swapfiles
[thirdparty/util-linux.git] / disk-utils / mkswap.8
index b4bb7d677a9ccef1d9f2b7d96f05a775007e47d5..e9bd9ccfa4b88ab055a3d6bf111ae32fc2833a15 100644 (file)
@@ -1,14 +1,13 @@
 .\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
 .\"
 .\" May be distributed under the GNU General Public License
-.\" Rewritten for 2.1.117, aeb, 981010.
 .\"
 .TH MKSWAP 8 "March 2009" "util-linux" "System Administration"
 .SH NAME
 mkswap \- set up a Linux swap area
 .SH SYNOPSIS
 .B mkswap
-.RI [ options ]
+[options]
 .I device
 .RI [ size ]
 .SH DESCRIPTION
@@ -125,21 +124,25 @@ 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
 
-Note that a swap file must not contain any holes (so, using
-.BR cp (1)
-to create the file is not acceptable).
+to create 8GiB swapfile.
+
+Please read notes from
+.BR swapon (8)
+about
+.B the swap file use restrictions
+(holes, preallocation and copy-on-write issues).
 
 .SH ENVIRONMENT
-.IP LIBBLKID_DEBUG=0xffff
-enables debug output.
+.IP LIBBLKID_DEBUG=all
+enables libblkid debug output.
 
 .SH "SEE ALSO"
 .BR fdisk (8),
 .BR swapon (8)
 .SH AVAILABILITY
 The mkswap command is part of the util-linux package and is available from
-ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
+https://www.kernel.org/pub/linux/utils/util-linux/.