diff options
| author | Hugo Buddelmeijer <hugo@buddelmeijer.nl> | 2026-02-17 20:04:06 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-02-22 19:01:34 +0100 |
| commit | f333fb810d0ef5033db217d2bf12c06646558c70 (patch) | |
| tree | f76960ebf7e9345fdb58ebb687617e883953bf48 /doc | |
| parent | ccce417a6cff3e76d8e56dedad639412a02d7624 (diff) | |
doc: Improve raid-device-mapping documentation.
* doc/guix.texi (Mapped Devices): Move examples into the mapping defvars.
Add how to load kernel modules for raid. Add RAID cindex.
Change-Id: If2d3f3c48940d2428b36bdd85d31c8288db35f3b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
Merges: #6512
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index d52be59a1a6..0a6020220c6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -18968,7 +18968,7 @@ RAID devices are obtained by @dfn{assembling} several other devices, such | |||
| 18968 | as hard disks or partitions, into a new one that behaves as one partition. | 18968 | as hard disks or partitions, into a new one that behaves as one partition. |
| 18969 | 18969 | ||
| 18970 | Mapped devices are declared using the @code{mapped-device} form, | 18970 | Mapped devices are declared using the @code{mapped-device} form, |
| 18971 | defined as follows; for examples, see below. | 18971 | defined as follows. |
| 18972 | 18972 | ||
| 18973 | @deftp {Data Type} mapped-device | 18973 | @deftp {Data Type} mapped-device |
| 18974 | Objects of this type represent device mappings that will be made when | 18974 | Objects of this type represent device mappings that will be made when |
| @@ -19064,23 +19064,6 @@ options, along with @option{--allow-discards}: | |||
| 19064 | @end lisp | 19064 | @end lisp |
| 19065 | 19065 | ||
| 19066 | @end table | 19066 | @end table |
| 19067 | @end defvar | ||
| 19068 | |||
| 19069 | @defvar raid-device-mapping | ||
| 19070 | This defines a RAID device, which is assembled using the @code{mdadm} | ||
| 19071 | command from the package with the same name. It requires a Linux kernel | ||
| 19072 | module for the appropriate RAID level to be loaded, such as @code{raid456} | ||
| 19073 | for RAID-4, RAID-5 or RAID-6, or @code{raid10} for RAID-10. | ||
| 19074 | @end defvar | ||
| 19075 | |||
| 19076 | @cindex LVM, logical volume manager | ||
| 19077 | @defvar lvm-device-mapping | ||
| 19078 | This defines one or more logical volumes for the Linux | ||
| 19079 | @uref{https://www.sourceware.org/lvm2/, Logical Volume Manager (LVM)}. | ||
| 19080 | The volume group is activated by the @command{vgchange} command from the | ||
| 19081 | @code{lvm2} package. | ||
| 19082 | @end defvar | ||
| 19083 | |||
| 19084 | @cindex disk encryption | 19067 | @cindex disk encryption |
| 19085 | @cindex LUKS | 19068 | @cindex LUKS |
| 19086 | The following example specifies a mapping from @file{/dev/sda3} to | 19069 | The following example specifies a mapping from @file{/dev/sda3} to |
| @@ -19123,6 +19106,23 @@ swap file is encrypted because the entire device is encrypted. | |||
| 19123 | @xref{Swap Space}, or @xref{Preparing for Installation,,Disk | 19106 | @xref{Swap Space}, or @xref{Preparing for Installation,,Disk |
| 19124 | Partitioning}, for an example. | 19107 | Partitioning}, for an example. |
| 19125 | 19108 | ||
| 19109 | |||
| 19110 | @end defvar | ||
| 19111 | |||
| 19112 | @defvar raid-device-mapping | ||
| 19113 | @cindex RAID | ||
| 19114 | This defines a RAID device, which is assembled using the @code{mdadm} | ||
| 19115 | command from the package with the same name. It requires a Linux kernel | ||
| 19116 | module for the appropriate RAID level to be loaded, such as @code{raid1} for | ||
| 19117 | RAID-1 (mirroring), @code{raid456} for RAID-4, RAID-5 or RAID-6, or | ||
| 19118 | @code{raid10} for RAID-10 (@pxref{Initial RAM Disk}). | ||
| 19119 | |||
| 19120 | For example, RAID-1 (mirroring) support can be added with: | ||
| 19121 | |||
| 19122 | @lisp | ||
| 19123 | (initrd-modules (cons* "raid1" %base-initrd-modules)) | ||
| 19124 | @end lisp | ||
| 19125 | |||
| 19126 | A RAID device formed of the partitions @file{/dev/sda1} and @file{/dev/sdb1} | 19126 | A RAID device formed of the partitions @file{/dev/sda1} and @file{/dev/sdb1} |
| 19127 | may be declared as follows: | 19127 | may be declared as follows: |
| 19128 | 19128 | ||
| @@ -19137,7 +19137,22 @@ The @file{/dev/md0} device can then be used as the @code{device} of a | |||
| 19137 | @code{file-system} declaration (@pxref{File Systems}). | 19137 | @code{file-system} declaration (@pxref{File Systems}). |
| 19138 | Note that the RAID level need not be given; it is chosen during the | 19138 | Note that the RAID level need not be given; it is chosen during the |
| 19139 | initial creation and formatting of the RAID device and is determined | 19139 | initial creation and formatting of the RAID device and is determined |
| 19140 | automatically later. | 19140 | automatically later, assuming the correct Linux modules have been loaded. |
| 19141 | |||
| 19142 | Not having the right kernel modules loaded might result in an error message | ||
| 19143 | like this at boot: | ||
| 19144 | |||
| 19145 | @example | ||
| 19146 | mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument | ||
| 19147 | @end example | ||
| 19148 | @end defvar | ||
| 19149 | |||
| 19150 | @cindex LVM, logical volume manager | ||
| 19151 | @defvar lvm-device-mapping | ||
| 19152 | This defines one or more logical volumes for the Linux | ||
| 19153 | @uref{https://www.sourceware.org/lvm2/, Logical Volume Manager (LVM)}. | ||
| 19154 | The volume group is activated by the @command{vgchange} command from the | ||
| 19155 | @code{lvm2} package. | ||
| 19141 | 19156 | ||
| 19142 | LVM logical volumes ``alpha'' and ``beta'' from volume group ``vg0'' can | 19157 | LVM logical volumes ``alpha'' and ``beta'' from volume group ``vg0'' can |
| 19143 | be declared as follows: | 19158 | be declared as follows: |
| @@ -19152,6 +19167,7 @@ be declared as follows: | |||
| 19152 | Devices @file{/dev/mapper/vg0-alpha} and @file{/dev/mapper/vg0-beta} can | 19167 | Devices @file{/dev/mapper/vg0-alpha} and @file{/dev/mapper/vg0-beta} can |
| 19153 | then be used as the @code{device} of a @code{file-system} declaration | 19168 | then be used as the @code{device} of a @code{file-system} declaration |
| 19154 | (@pxref{File Systems}). | 19169 | (@pxref{File Systems}). |
| 19170 | @end defvar | ||
| 19155 | 19171 | ||
| 19156 | @node Swap Space | 19172 | @node Swap Space |
| 19157 | @section Swap Space | 19173 | @section Swap Space |
| @@ -47267,6 +47283,10 @@ file system, you would write: | |||
| 47267 | (initrd-modules (cons "megaraid_sas" %base-initrd-modules))) | 47283 | (initrd-modules (cons "megaraid_sas" %base-initrd-modules))) |
| 47268 | @end lisp | 47284 | @end lisp |
| 47269 | 47285 | ||
| 47286 | Other useful kernel modules include those necessary for a | ||
| 47287 | @code{raid-device-mapping}, e.g. @code{raid1}, @code{raid456} and | ||
| 47288 | @code{raid10} (@pxref{Mapped Devices}). | ||
| 47289 | |||
| 47270 | @defvar %base-initrd-modules | 47290 | @defvar %base-initrd-modules |
| 47271 | This is the list of kernel modules included in the initrd by default. | 47291 | This is the list of kernel modules included in the initrd by default. |
| 47272 | @end defvar | 47292 | @end defvar |
