[Bug 842919] New: Installation with /boot on MD RAID1 does not enable redundancy for MD array
https://bugzilla.novell.com/show_bug.cgi?id=842919 https://bugzilla.novell.com/show_bug.cgi?id=842919#c0 Summary: Installation with /boot on MD RAID1 does not enable redundancy for MD array Classification: openSUSE Product: openSUSE Factory Version: 13.1 Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: arvidjaar@gmail.com QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 Problem existed in 12.3 (and probably earlier) as well. During installation manually create Linux RAID partitions and RAID1 for /boot (all other filesystems are on MD RAID1 as well). In summary installer offers bootloader on the first disk. Attempt to change bootloader location does not offer to enable redundancy for MD array either. After installation it can be enabled by going to yast - bootloader and selecting "do not install bootloadeer". Save, go to yast - bootloader again, select grub2 back. Now Enable redundancy for MD array is active and grub2 is installed in MBR of both disks. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c1
Steffen Winterfeldt
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c2
--- Comment #2 from Andrey Borzenkov
Is this grub2-specific, maybe?
I have tested it for grub2 only. Sorry for not being more specific. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c3
--- Comment #3 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c4
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c5
Steffen Winterfeldt
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c6
--- Comment #6 from Andrey Borzenkov
Hi Andrey,
Are you having more than two disks raided ?
No, I have exactly 2 disks. Apparently there are some different corner cases. Attached is y2logs from clean installation using b1. During installation when I go to bootloader from summary screen MD RAID redundancy is indeed checked - but grub2 is installed in MBR only of single disk and when I start yast after installation, redundancy is offered but unchecked! Previous attempt did not even expose redundancy option. May be because one filesystem (root on btrfs) was not on RAID1. What are the rules? Must *all* filesystems/swaps be mirrored to get redundancy offered in bootloader configuration? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c7
--- Comment #7 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c8
--- Comment #8 from Michael Chang
No, I have exactly 2 disks. Apparently there are some different corner cases.
Attached is y2logs from clean installation using b1. During installation when I go to bootloader from summary screen MD RAID redundancy is indeed checked - but grub2 is installed in MBR only of single disk and when I start yast after installation, redundancy is offered but unchecked!
It could be the bogus Boot Loader Location Widget. The status (BootCommon.enable_md_array_redundancy) is initially "null" and will be converted to true|false once you explicit save the settings. If you see the settings and hit "cancel" you will leave it uninitialized and when saving bootloader configurations BootCommon.enable_md_array_redundancy is checked to match true to get boot_md_mbr saved, otherwise it's removed. The fix could be trivial, but it's not clear to me that enable_md_array_redundancy should be default to true or false when md raid1 array detected ..
Previous attempt did not even expose redundancy option. May be because one filesystem (root on btrfs) was not on RAID1. What are the rules? Must *all* filesystems/swaps be mirrored to get redundancy offered in bootloader configuration?
BootStorage.checkMDDevices has the comment "Check if device are build from 2 partitions with same number but from different disks" Above rule may explain my question (comment#4) and maybe like Steffen said this is the setup we want to support ? It looks to me (roughly) that if one of your /boot or / matches the rule 1. configured as md raid 1 2. that raid is built from 2 partitions with same number but from different disks The redundancy *should* be enabled (I use *should* because the checkMDDevices() is buggy to me (in it's handling of return value), because if your "/" matches with rule #1 but not with rule #2, the redundancy won't be enabled ..) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c9
--- Comment #9 from Michael Chang
I tested once more in 12.3 and there it does not even offer RAID redundancy after installation although it is present during installation.
Isn't that what "YOU" fixed in bnc#811830 ? :) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c10
--- Comment #10 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c11
--- Comment #11 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c12
--- Comment #12 from Andrey Borzenkov
Created an attachment (id=561145) --> (http://bugzilla.novell.com/attachment.cgi?id=561145) [details] Patch in DUD
Could you remind how to test it? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c13
--- Comment #13 from Andrey Borzenkov
Is it possible for you to verify this DUD, it simply declares enable_md_array_redundancy as true instead of nil. A quick test on my side seems to work.
Worked for me too on the same configuration as before (grub2 was installed on both HDDs and redundancy remained enabled after installation). I briefly tested installation with single disk and it was correct as well (no redundancy option was offered). I wonder if it can have unwanted side effects, but it does fix this bug, -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c14
--- Comment #14 from Michael Chang
Worked for me too on the same configuration as before (grub2 was installed on both HDDs and redundancy remained enabled after installation). I briefly tested installation with single disk and it was correct as well (no redundancy option was offered).
Thanks a lot for verification. At least we can confirm where the cause is from and we're seeing the same problem.
I wonder if it can have unwanted side effects, but it does fix this bug,
The patch did not look good to me either, my preferred fix is to not change it's initial nul (in BootCommon module) to be more safe on other circumstance, but somehow couldn't have a positive result which frustrated me A LOT as the fix is supposed to work and simple. :( Probably I will invest more time on it after hackweek. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c15
--- Comment #15 from Andrey Borzenkov
Thanks a lot for verification. At least we can confirm where the cause is from and we're seeing the same problem.
Hmm ... after reviewing it I now start to think that actual problem is GUI lying about bootloader location. There is mismatch between how BootCommon.Save and BootloaderGrubOptionsInclude.InitBootLoaderLocationWidget compute whether to enable installation on RAID1. Save: if @enable_md_array_redundancy == true InitBootLoaderLocationWidget: if BootCommon.enable_md_array_redundancy == nil || BootCommon.enable_md_array_redundancy I.e. Save will only enable MD redundancy explicitly, while InitBootLoaderLocationWidget will enable MD redundancy implicitly. This leads to confusion. Second problem is - installation summary provides no indication whether MD redundancy is in effect. So my suggestion would be 1. For 13.1: a) unify handling with this change: --- a/src/include/bootloader/grub/options.rb +++ b/src/include/bootloader/grub/options.rb @@ -577,8 +577,7 @@ module Yast boot_devices = BootStorage.getPartitionList(:boot, "grub") value = "" if BootCommon.VerifyMDArray - if BootCommon.enable_md_array_redundancy == nil || - BootCommon.enable_md_array_redundancy + if BootCommon.enable_md_array_redundancy UI.ChangeWidget(Id("enable_redundancy"), :Value, true) else UI.ChangeWidget(Id("enable_redundancy"), :Value, false) b) mention in release notes that user must explicitly enable MD redundancy? Although this is the case anyway and apparently had always been. 2. For post 13.1 a) add quick link to installation summary: Redundancy for MD arrays (enable/disable) b) if feasible, make installation summary to display all HDDs where bootloader is installed. 3. To consider - make it easier to install on RAID1. Apparently even for experienced users it is not obvious how to create RAID1 installation. Check button "enable RAID1" for automatic proposal? This would then be the right moment to set enable_md_array_redundancy = true. (In reply to comment #1)
Is this grub2-specific, maybe?
No. The main difference is - to switch to GRUB you *must* confirm bootloader widget with OK which will then explicitly set enable_md_array_redundancy = true. So it appears to work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c16
--- Comment #16 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c17
--- Comment #17 from Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=842919
https://bugzilla.novell.com/show_bug.cgi?id=842919#c18
Andrey Borzenkov
http://bugzilla.novell.com/show_bug.cgi?id=842919
Michael Chang
participants (1)
-
bugzilla_noreply@novell.com