diff options
author | Sami Kerola | 2015-06-07 22:51:51 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-29 12:06:00 +0200 |
commit | 55034ed00e94657109eb0405b65086f1d3e91423 (patch) | |
tree | e79eabf95a2af16005f83d2104f0b6a5c54650e1 | |
parent | zramctl: add link to kernel documentation (diff) | |
download | kernel-qcow2-util-linux-55034ed00e94657109eb0405b65086f1d3e91423.tar.gz kernel-qcow2-util-linux-55034ed00e94657109eb0405b65086f1d3e91423.tar.xz kernel-qcow2-util-linux-55034ed00e94657109eb0405b65086f1d3e91423.zip |
docs: unify mkswap(8) with swapon(8) about holes warning
Reviewed-by: Dave Rutherford <dave@evilpettingzoo.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | disk-utils/mkswap.8 | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/disk-utils/mkswap.8 b/disk-utils/mkswap.8 index 0a0b715dd..3655357bd 100644 --- a/disk-utils/mkswap.8 +++ b/disk-utils/mkswap.8 @@ -128,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 |