All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] LVM UUID grub-probe fix and documentation update
@ 2013-09-22 16:21 Andrey Borzenkov
  2013-09-22 16:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2013-09-22 16:21 UTC (permalink / raw)
  To: grub-devel

1. Update documentation to mention it. Also fix docs (lv => lvm).
2. Fix grub-probe -t abstraction not returning anything for LVM - as it now
   prefers LVM UUID based devices, also check for correct name.


Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>

---
 docs/grub.texi    | 8 +++++---
 util/grub-probe.c | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/docs/grub.texi b/docs/grub.texi
index 894b97f..574f602 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -2484,7 +2484,7 @@ by a digit, like @samp{fd0}, or @samp{cd}.
 AHCI, PATA (ata), crypto, USB use the name of driver followed by a number.
 Memdisk and host are limited to one disk and so it's refered just by driver
 name.
-RAID (md), ofdisk (ieee1275 and nand), LVM (lv), LDM and arcdisk (arc) use
+RAID (md), ofdisk (ieee1275 and nand), LVM (lvm), LDM and arcdisk (arc) use
 intrinsic name of disk prefixed by driver name. Additionally just ``nand''
 refers to the disk aliased as ``nand''.
 Conflicts are solved by suffixing a number if necessarry.
@@ -2493,7 +2493,8 @@ Loopback uses whatever name specified to @command{loopback} command.
 Hostdisk uses names specified in device.map as long as it's of the form
 [fhc]d[0-9]* or hostdisk/<OS DEVICE>.
 For crypto and RAID (md) additionally you can use the syntax
-<driver name>uuid/<uuid>.
+<driver name>uuid/<uuid>.  For LVM additionally you can use the syntax
+lvmid/<volume-group-uuid>/<volume-uuid>.
 
 @example
 (fd0)
@@ -2505,7 +2506,8 @@ For crypto and RAID (md) additionally you can use the syntax
 (usb0)
 (cryptouuid/123456789abcdef0123456789abcdef0)
 (mduuid/123456789abcdef0123456789abcdef0)
-(lv/system-root)
+(lvm/system-root)
+(lvmid/F1ikgD-2RES-306G-il9M-7iwa-4NKW-EbV1NV/eLGuCQ-L4Ka-XUgR-sjtJ-ffch-bajr-fCNfz5)
 (md/myraid)
 (md/0)
 (ieee1275/disk2)
diff --git a/util/grub-probe.c b/util/grub-probe.c
index a46f0b1..0978e0a 100644
--- a/util/grub-probe.c
+++ b/util/grub-probe.c
@@ -292,7 +292,8 @@ probe_abstraction (grub_disk_t disk)
     }
 
   if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID
-      && grub_memcmp (disk->name, "lvm/", sizeof ("lvm/") - 1) == 0)
+      && (grub_memcmp (disk->name, "lvm/", sizeof ("lvm/") - 1) == 0 ||
+	  grub_memcmp (disk->name, "lvmid/", sizeof ("lvmid/") - 1) == 0))
     printf ("lvm ");
 
   if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID
-- 
tg: (4ae2625..) u/lvm-uuid (depends on: master)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] LVM UUID grub-probe fix and documentation update
  2013-09-22 16:21 [PATCH] LVM UUID grub-probe fix and documentation update Andrey Borzenkov
@ 2013-09-22 16:56 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-09-22 16:56 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 2600 bytes --]

Go ahead.
On 22.09.2013 18:21, Andrey Borzenkov wrote:
> 1. Update documentation to mention it. Also fix docs (lv => lvm).
> 2. Fix grub-probe -t abstraction not returning anything for LVM - as it now
>    prefers LVM UUID based devices, also check for correct name.
> 
> 
> Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
> 
> ---
>  docs/grub.texi    | 8 +++++---
>  util/grub-probe.c | 3 ++-
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/grub.texi b/docs/grub.texi
> index 894b97f..574f602 100644
> --- a/docs/grub.texi
> +++ b/docs/grub.texi
> @@ -2484,7 +2484,7 @@ by a digit, like @samp{fd0}, or @samp{cd}.
>  AHCI, PATA (ata), crypto, USB use the name of driver followed by a number.
>  Memdisk and host are limited to one disk and so it's refered just by driver
>  name.
> -RAID (md), ofdisk (ieee1275 and nand), LVM (lv), LDM and arcdisk (arc) use
> +RAID (md), ofdisk (ieee1275 and nand), LVM (lvm), LDM and arcdisk (arc) use
>  intrinsic name of disk prefixed by driver name. Additionally just ``nand''
>  refers to the disk aliased as ``nand''.
>  Conflicts are solved by suffixing a number if necessarry.
> @@ -2493,7 +2493,8 @@ Loopback uses whatever name specified to @command{loopback} command.
>  Hostdisk uses names specified in device.map as long as it's of the form
>  [fhc]d[0-9]* or hostdisk/<OS DEVICE>.
>  For crypto and RAID (md) additionally you can use the syntax
> -<driver name>uuid/<uuid>.
> +<driver name>uuid/<uuid>.  For LVM additionally you can use the syntax
> +lvmid/<volume-group-uuid>/<volume-uuid>.
>  
>  @example
>  (fd0)
> @@ -2505,7 +2506,8 @@ For crypto and RAID (md) additionally you can use the syntax
>  (usb0)
>  (cryptouuid/123456789abcdef0123456789abcdef0)
>  (mduuid/123456789abcdef0123456789abcdef0)
> -(lv/system-root)
> +(lvm/system-root)
> +(lvmid/F1ikgD-2RES-306G-il9M-7iwa-4NKW-EbV1NV/eLGuCQ-L4Ka-XUgR-sjtJ-ffch-bajr-fCNfz5)
>  (md/myraid)
>  (md/0)
>  (ieee1275/disk2)
> diff --git a/util/grub-probe.c b/util/grub-probe.c
> index a46f0b1..0978e0a 100644
> --- a/util/grub-probe.c
> +++ b/util/grub-probe.c
> @@ -292,7 +292,8 @@ probe_abstraction (grub_disk_t disk)
>      }
>  
>    if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID
> -      && grub_memcmp (disk->name, "lvm/", sizeof ("lvm/") - 1) == 0)
> +      && (grub_memcmp (disk->name, "lvm/", sizeof ("lvm/") - 1) == 0 ||
> +	  grub_memcmp (disk->name, "lvmid/", sizeof ("lvmid/") - 1) == 0))
>      printf ("lvm ");
>  
>    if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-22 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22 16:21 [PATCH] LVM UUID grub-probe fix and documentation update Andrey Borzenkov
2013-09-22 16:56 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.