aboutsummaryrefslogtreecommitdiff
path: root/doc/guix.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-10-23 11:46:21 +0200
committerLudovic Courtès <ludo@gnu.org>2020-10-30 01:14:21 +0100
commit81c3dd9cad29f2b0999aa1f22b3a7d4c04f1a842 (patch)
tree05c1078aa5be41adb77b53361f0b7245a7a5567a /doc/guix.texi
parent11e19555e5693b420f32ab5cc002764ef906ad16 (diff)
downloadguix-81c3dd9cad29f2b0999aa1f22b3a7d4c04f1a842.tar
guix-81c3dd9cad29f2b0999aa1f22b3a7d4c04f1a842.tar.gz
services: swap: Allow for UUIDs and file system labels.
* gnu/services/base.scm (swap-service-type)[device-lookup, device-name]: New variables. Add 'modules' field to 'shepherd-service'. In 'start' and 'stop', use 'device-lookup' to resolve UUIDs and labels. * doc/guix.texi (operating-system Reference): Adjust accordingly.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r--doc/guix.texi34
1 files changed, 29 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index eddf77c7ab..2319bba2ba 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13075,14 +13075,38 @@ A list of mapped devices. @xref{Mapped Devices}.
@item @code{file-systems}
A list of file systems. @xref{File Systems}.
-@item @code{swap-devices} (default: @code{'()})
@cindex swap devices
-A list of strings identifying devices or files to be used for ``swap
+@cindex swap space
+@item @code{swap-devices} (default: @code{'()})
+A list of UUIDs, file system labels, or strings identifying devices or
+files to be used for ``swap
space'' (@pxref{Memory Concepts,,, libc, The GNU C Library Reference
-Manual}). For example, @code{'("/dev/sda3")} or @code{'("/swapfile")}.
+Manual}). Here are some examples:
+
+@table @code
+@item (list (uuid "4dab5feb-d176-45de-b287-9b0a6e4c01cb"))
+Use the swap partition with the given UUID. You can learn the UUID of a
+Linux swap partition by running @command{swaplabel @var{device}}, where
+@var{device} is the @file{/dev} file name of that partition.
+
+@item (list (file-system-label "swap"))
+Use the partition with label @code{swap}. Again, the
+@command{swaplabel} command allows you to view and change the label of a
+Linux swap partition.
+
+@item (list "/swapfile")
+Use the file @file{/swapfile} as swap space.
+
+@item (list "/dev/sda3" "/dev/sdb2")
+Use the @file{/dev/sda3} and @file{/dev/sdb2} partitions as swap space.
+We recommend referring to swap devices by UUIDs or labels as shown above
+instead.
+@end table
+
It is possible to specify a swap file in a file system on a mapped
-device, provided that the necessary device mapping and file system are
-also specified. @xref{Mapped Devices} and @ref{File Systems}.
+device (under @file{/dev/mapper}), provided that the necessary device
+mapping and file system are also specified. @xref{Mapped Devices} and
+@ref{File Systems}.
@item @code{users} (default: @code{%base-user-accounts})
@itemx @code{groups} (default: @code{%base-groups})