Bug 1146932 - lvm cachepool on system lv causes system to be unbootable
lvm cachepool on system lv causes system to be unbootable
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Bootloader
Leap 15.1
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Michael Chang
Jiri Srain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-23 00:19 UTC by William Brown
Modified: 2022-04-19 12:28 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Brown 2019-08-23 00:19:00 UTC
If a suse leap 15.1 machine is configured post-install to have a lvm cache pool device on the system lv, grub2 fails to boot with "Error invalid segment".

IE the lvs are:

# lvs
  home         system  rwi-aor--- 104.00g                                                              100.00
  root         system  rwi-aor---  80.00g                                                              100.00
  swap         system  rwi-aor---   8.00g                                                              100.00
  cache        system  rwi-aor---    ....
Comment 3 Michael Chang 2019-09-16 09:06:07 UTC
Hi William,

Would it be possible for you to test the package trying to fix the lvm cache volume issue in grub ?

https://download.opensuse.org/repositories/home:/michael-chang:/lvm_cachepool/openSUSE_Factory/

Thanks.
Comment 4 William Brown 2019-09-23 22:06:21 UTC
I only have the one machine, and I had to reinstall it a few times to get past these issues. As a result it's not possible for me to test this. Sorry, you'll need to setup a reproducer environment :(
Comment 5 Michael Chang 2019-09-24 08:52:09 UTC
(In reply to William Brown from comment #4)
> I only have the one machine, and I had to reinstall it a few times to get
> past these issues. As a result it's not possible for me to test this. Sorry,
> you'll need to setup a reproducer environment :(

Thanks, I already have the test environment, but I am not certain if taking same procedure with yours.

Would you mind to share your procedure for setting up the lvm cache pool? For eg, mine looked like this to the system/root lv, and in case yours is different please let me know.

> #!/bin/sh
> 
> lvcreate -L 4G -n lv_cache system /dev/vdb1
> lvcreate -L 24M -n lv_cache_meta system /dev/vdb1
> lvconvert --type cache-pool --cachemode writethrough --poolmetadata system/lv_cache_meta system/lv_cache
> lvconvert --type cache --cachepool system/lv_cache system/root

Thanks in advance.
Comment 6 William Brown 2019-09-24 23:20:31 UTC
Just the existance of the cachepool even before assembling it with the main data store should cause it to be unbootable. So your steps seem like the same as mine (minus the lvconvert --type cache --cachepool system/lv_cache system/root where I used system/data).

Hope that helps,
Comment 7 Michael Chang 2019-09-25 07:03:47 UTC
(In reply to William Brown from comment #6)
> Just the existance of the cachepool even before assembling it with the main
> data store should cause it to be unbootable. So your steps seem like the
> same as mine (minus the lvconvert --type cache --cachepool system/lv_cache
> system/root where I used system/data).
> 
> Hope that helps,

Thanks, I tried not to assemble the cachepool and still cannot reproduce the problem. And since the patch is working for me to solve the problem of cached lv not being recognized by grub, I will close this after it submitted to factory.
Comment 8 Benjamin Brunner 2022-04-19 12:28:46 UTC
After Leap 15.1 is no longer maintained and there was no progress for some time, I would like to close this bug for now.

If this is still relevant, please reopen the bug and adjust the product accordingly.

Thank you.