]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - disk-utils/mkswap.8
Merge branch 'fixes' of https://github.com/yontalcar/util-linux
[thirdparty/util-linux.git] / disk-utils / mkswap.8
index 562078d0c94ea665daab28ad6b91ffca2f18fa17..a6ab8530da7609963a964e7c85ef7e127d071f5d 100644 (file)
@@ -1,7 +1,6 @@
 .\" 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
@@ -129,9 +128,19 @@ e.g.\& using a command like
 .RE
 .fi
 
-Note that a swap file must not contain any holes (so, using
+Note that a swap file must not contain any holes.  Using
 .BR cp (1)
-to create the file is not acceptable).
+to create the file is not acceptable.  Neither is use of
+.BR fallocate (1)
+on file systems that support preallocated files, such as
+.BR XFS " or " ext4 ,
+or on copy-on-write filesystems like
+.BR btrfs .
+It is recommended to use
+.BR dd (1)
+and /dev/zero in these cases.  Please read notes from
+.BR swapon (8)
+before adding a swap file to copy-on-write filesystems.
 
 .SH ENVIRONMENT
 .IP LIBBLKID_DEBUG=all
@@ -142,4 +151,4 @@ enables libblkid debug output.
 .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/.