lvm cache support lost in zesty

Bug #1678112 reported by Julian Taylor
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

grub fails to work when araid1 lvm volume exists that is cached in zesty.
grub version 2.02~beta3-4ubuntu1
The same configuration worked on yakkety

~$ sudo update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.10.0-14-generic
Found initrd image: /boot/initrd.img-4.10.0-14-generic
Found linux image: /boot/vmlinuz-4.8.0-45-generic
Found initrd image: /boot/initrd.img-4.8.0-45-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
Found Windows 7 on /dev/sdc4
Found Debian GNU/Linux wheezy/sid on /dev/mapper/lvm-debian
Found Ubuntu 15.04 (15.04) on /dev/mapper/lvm-root2
Found Ubuntu 14.04.1 LTS (14.04) on /dev/mapper/lvm-root3

$ sudo lvcreate --type raid1 -L 1G lvm -n testing
  Logical volume "testing" created.
~$ sudo lvcreate --type cache --cachemode writeback -L 10G -n ssdcachetest lvm/testing /dev/sda1
  Using default stripesize 64.00 KiB.
  WARNING: Data redundancy is lost with writeback caching of raid logical volume!
  Logical volume lvm/testing is now cached.

~$ sudo update-grub2
Generating grub configuration file ...
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
error: invalid segment.
grub-probe: error: disk `lvmid/OwVp3J-KH9N-RcXl-Fh3J-ZEiZ-egg4-JRffI3/7Dieap-dj1i-dHiz-eLfa-c7be-IiyB-GaHL26' not found.

removing the cache fixes the issue.

lvmid/OwVp3J-KH9N-RcXl-Fh3J-ZEiZ-egg4-JRffI3/7Dieap-dj1i-dHiz-eLfa-c7be-IiyB-GaHL26 is my boot lvm partition which is a regular uncached linear partition.
  --- Logical volume ---
  LV Path /dev/lvm/boot
  LV Name boot
  VG Name lvm
  LV UUID 7Dieap-dj1i-dHiz-eLfa-c7be-IiyB-GaHL26
  LV Write Access read/write
  LV Creation host, time ubuntu, 2015-09-27 23:22:37 +0200
  LV Status available
  # open 1
  LV Size 1.00 GiB
  Current LE 256
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:2

Julian Taylor (jtaylor)
description: updated
Phillip Susi (psusi)
affects: grub-installer (Ubuntu) → grub2 (Ubuntu)
summary: - grub fails on lvmcached raid1 volume
+ lvm cache support lost in zesty
tags: added: regression-release
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Migas (migaxmoitax) wrote :

This bug is still present in ubuntu 18.04.2

tags: added: bionic
Revision history for this message
Adam Kulagowski (fidor-fidor) wrote :

This bug is still present in ubuntu 19.04

Revision history for this message
Rhys (rhvs) wrote :

Still happening in 20.04.

tags: added: rls-ff-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

grub2 used to support lvm2 cache partitions, in a buggy way, corrupting them on boot/grubenv read or write.

this was disabled.

the next upstream grub2 release has proper support for lvm2 cache partition, thus this may come back whenever 2.06 lands.

it will not be backported.

Please use separate /boot partition for grub without lvm2 caching, if you want to use lvm2 caching for your regular rootfs.

Changed in grub2 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.