From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wKvDB9rtvV7WdAAA0tVLHw (envelope-from ) for ; Fri, 15 May 2020 01:18:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4MGRA9rtvV6SdAAA1q6Kng (envelope-from ) for ; Fri, 15 May 2020 01:18:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6772A9400AF for ; Fri, 15 May 2020 01:18:17 +0000 (UTC) Received: from localhost ([::1]:46304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZOzP-0006Jd-F3 for larch@yhetil.org; Thu, 14 May 2020 21:18:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZOzB-0006JT-Vn for guix-patches@gnu.org; Thu, 14 May 2020 21:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZOzB-0001Cp-Mz for guix-patches@gnu.org; Thu, 14 May 2020 21:18:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZOzB-0005u6-J4 for guix-patches@gnu.org; Thu, 14 May 2020 21:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41143] [PATCH] mapped-devices: Document lvm-mapping-device. References: In-Reply-To: Resent-From: Mikhail Tsykalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 May 2020 01:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41143 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41143@debbugs.gnu.org Received: via spool by 41143-submit@debbugs.gnu.org id=B41143.158950547022674 (code B ref 41143); Fri, 15 May 2020 01:18:01 +0000 Received: (at 41143) by debbugs.gnu.org; 15 May 2020 01:17:50 +0000 Received: from localhost ([127.0.0.1]:35241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZOz0-0005td-FV for submit@debbugs.gnu.org; Thu, 14 May 2020 21:17:50 -0400 Received: from mail-lf1-f53.google.com ([209.85.167.53]:36225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZOyy-0005tN-Kh for 41143@debbugs.gnu.org; Thu, 14 May 2020 21:17:49 -0400 Received: by mail-lf1-f53.google.com with SMTP id c21so419761lfb.3 for <41143@debbugs.gnu.org>; Thu, 14 May 2020 18:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=LiAT28NgmctBNUNKcc60PKR0tKC8ZMLQSPKMJxIAGLw=; b=RWQnEicRMCXBR9K0ZyXqcq/1/d75qMm0kqHO11AyAbvJTr7eN/HxQ1PCPVLGpeUFeJ rl/wctBBm7YuzMBI+dPHFxZcJkZxEY+3ICub0IDDRM10lkRcGUHQWK9YHAbV4ZAE3ZEs vZscGx7tufhYxciNd+pcndoxSuMAPC5Zs0ZM+5Xp0G9pEXKuz1i/aQHnq7DAfUJ6O5r1 hX70Vgw/ZVw148VKviyHgPr1N+Kt6pLUFDoUCHT8QDGYhDoX4FzRd/avEyFuVSUXo7UP 6mOdnXH4p5cv7dwngvoeSqqh+O5qo9NVjJSXaiRFhGcQyrn+TDuxUxTJIu859Uv9C9Tp 5SOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=LiAT28NgmctBNUNKcc60PKR0tKC8ZMLQSPKMJxIAGLw=; b=OkXpSiRv3NYG8Nl9mKdMbnnvxTkXPwN52rD23pZ9RPs6VVo/77M7APctLvYEfQWmrF 8YGiWHmQkt77wmbvDfyxSAcQDi506OecJARIy0VuYrwzQ8dTF77WzihzTgIhbIhx3+Tj CO5flwCyuILSOJp/gBJSu1OsGkteqgm412PVL9FeYm38kHAQZiJx8NCvEvwM40ZEzbv1 yoYtX6pdU8QXEfi6zMDy1pfJwkzDWYzVHq4lf5wAvngxQAaWTMAtntyu+rt7SSCR91f1 /vOywKKvE2euGyk2Id4T+Z6Ldurqx8RHfzxkBselAJJLcXlH78Rw7hVsLCr0ekY4qlZD r6PA== X-Gm-Message-State: AOAM5334dnG3HbABqvE6+SY4c4YihIq5zyr4BQFvLaIWGTvWpx0YcQaJ MP1JMTk/6OJH2Cah5Q7F2Xc4P5BlcRM= X-Google-Smtp-Source: ABdhPJz1eKt/gP7qfAyO5JfIoupPXEo9O5Ei9fx+naVAaPp5hglVsZOvgB/xIiP7gfKN0BFqJYDzSA== X-Received: by 2002:a19:d97:: with SMTP id 145mr580460lfn.193.1589505461919; Thu, 14 May 2020 18:17:41 -0700 (PDT) Received: from [192.168.0.75] ([88.201.200.191]) by smtp.gmail.com with ESMTPSA id f23sm333223ljc.72.2020.05.14.18.17.41 for <41143@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 18:17:41 -0700 (PDT) From: Mikhail Tsykalov Message-ID: Date: Fri, 15 May 2020 04:17:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=RWQnEicR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: tZaBxqeaIL9q ---  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