unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Mikhail Tsykalov <tsymsh@gmail.com>
To: 41143@debbugs.gnu.org
Subject: [bug#41143] [PATCH] mapped-devices: Document lvm-mapping-device.
Date: Fri, 15 May 2020 04:17:40 +0300	[thread overview]
Message-ID: <b68a706e-a554-8dd8-13d1-963de34cb260@gmail.com> (raw)
In-Reply-To: <CAMaATaPqFZTB-j9MyhS4+vrn8sjA25xzu2+DD71nE541yCiRwQ@mail.gmail.com>

---
  doc/guix.texi | 30 ++++++++++++++++++++++++++----
  1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d6fbd85fde..612a9b25e5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11738,7 +11738,6 @@ Guix extends this notion by considering any 
device or set of devices that
  are @dfn{transformed} in some way to create a new device; for instance,
  RAID devices are obtained by @dfn{assembling} several other devices, such
  as hard disks or partitions, into a new one that behaves as one partition.
-Other examples, not yet implemented, are LVM logical volumes.

  Mapped devices are declared using the @code{mapped-device} form,
  defined as follows; for examples, see below.
@@ -11751,15 +11750,20 @@ the system boots up.
  @item source
  This is either a string specifying the name of the block device to be 
mapped,
  such as @code{"/dev/sda3"}, or a list of such strings when several devices
-need to be assembled for creating a new one.
+need to be assembled for creating a new one. In case of LVM this is a
+string specifying name of the volume group to be mapped.

  @item target
-This string specifies the name of the resulting mapped device. For
-kernel mappers such as encrypted devices of type 
@code{luks-device-mapping},
+This is either a string specifying the name of the resulting mapped
+device, or a list of such strings in case there are several, which is
+common while using LVM.
+For kernel mappers such as encrypted devices of type 
@code{luks-device-mapping},
  specifying @code{"my-partition"} leads to the creation of
  the @code{"/dev/mapper/my-partition"} device.
  For RAID devices of type @code{raid-device-mapping}, the full device name
  such as @code{"/dev/md0"} needs to be given.
+LVM logical volumes of type @code{lvm-device-mapping} need to
+be specified as @code{"VGNAME-LVNAME"}.

  @item type
  This must be a @code{mapped-device-kind} object, which specifies how
@@ -11780,6 +11784,11 @@ module for the appropriate RAID level to be 
loaded, such as @code{raid456}
  for RAID-4, RAID-5 or RAID-6, or @code{raid10} for RAID-10.
  @end defvr

+@defvr {Scheme Variable} lvm-device-mapping
+This defines LVM logical volume(s). Volume group is activated by
+@command{vgchange} command from the package @code{lvm2}.
+@end defvr
+
  @cindex disk encryption
  @cindex LUKS
  The following example specifies a mapping from @file{/dev/sda3} to
@@ -11837,6 +11846,19 @@ Note that the RAID level need not be given; it 
is chosen during the
  initial creation and formatting of the RAID device and is determined
  automatically later.

+LVM logical volumes ``alpha'' and ``beta'' from volume group ``vg0'' can
+be declared as follows:
+
+@lisp
+(mapped-device
+  (source "vg0")
+  (target (list "vg0-alpha" "vg0-beta"))
+  (type lvm-device-mapping))
+@end lisp
+
+Devices @file{/dev/mapper/vg0-alpha} and @file{/dev/mapper/vg0-beta} can
+then be used as the @code{device} of a @code{file-system} declaration
+(@pxref{File Systems}).

  @node User Accounts
  @section User Accounts
-- 
2.26.2





  parent reply	other threads:[~2020-05-15  1:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  1:12 [bug#41143] [PATCH 1/2] mapped-devices: Allow target to be list of strings tsmish
2020-05-09  1:22 ` [bug#41143] [PATCH 2/2] mapped-devices: Add 'lvm-device-mapping' tsmish
2020-09-09 20:48   ` Ludovic Courtès
2020-05-14 22:53 ` [bug#41143] Some clarification Mikhail Tsykalov
2020-05-15  1:17 ` Mikhail Tsykalov [this message]
2020-06-06 13:40 ` [bug#41143] [PATCH 1/2] mapped-devices: Allow target to be list of strings Lars-Dominik Braun
2020-06-06 20:16   ` Mikhail Tsykalov
2020-06-07  6:48     ` Lars-Dominik Braun
2020-09-09 20:38 ` Ludovic Courtès
2020-09-24 16:09   ` Mikhail Tsykalov
2020-09-25  9:34     ` Ludovic Courtès
2020-09-25 13:36       ` Mikhail Tsykalov
2020-09-25 16:20         ` Ludovic Courtès
2020-10-01 22:48           ` [bug#41143] [PATCH v2 " Mikhail Tsykalov
2020-10-01 22:49             ` [bug#41143] [PATCH v2 2/2] mapped-devices: Add 'lvm-device-mapping' Mikhail Tsykalov
2020-10-04 10:34               ` Ludovic Courtès
2020-10-04 10:28             ` [bug#41143] [PATCH v2 1/2] mapped-devices: Allow target to be list of strings Ludovic Courtès
2020-11-05  9:48               ` Ludovic Courtès
2020-11-06  9:47                 ` [bug#41143] [PATCH v3 " Mikhail Tsykalov
2020-11-06  9:47                   ` [bug#41143] [PATCH v3 2/2] mapped-devices: Add 'lvm-device-mapping' Mikhail Tsykalov
2020-11-25 23:09                   ` bug#41143: [PATCH v3 1/2] mapped-devices: Allow target to be list of strings Ludovic Courtès
2020-10-01 23:15           ` [bug#41143] [PATCH " Mikhail Tsykalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b68a706e-a554-8dd8-13d1-963de34cb260@gmail.com \
    --to=tsymsh@gmail.com \
    --cc=41143@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).