Confusing boot and paritionning issues

Hi all !
I did an online upgrade of 15.3 to 15.4 (checked all the prerequisites first and they were all fine).
The system did not successfully boot afterwards, trying to load an old kernel.
I had “/boot/vmlinuz-5.3.15-59.40-default’ not found”.
Obviously this could not work since the kernel installed was 5.14.21-150400.24.63.
Edit the config while in grub allowed me to boot the system.
I then ran grub2-mkconfig and could see in the output that it did detect and use the latest kernel. But the boot still failed with the same error !
So I ran “yast2 bootloader”, and of course I was told that an unsupported bootloader “grub” had been detected.
As prompted, I chose to accept to use the supported configuration (grub2, I guess).

Then I got another error : “issues foudn while analyzing the storage devices”
And in the error details :
Probing device relationship failed
The volume group /dev/data is incomplete because some physical volumes are missing.
device not found, name:/dev/sdb1

Fine, but…
fdisk -l

Disk /dev/sdb: 3.64 TiB, 3999998672896 bytes, 7812497408 sectors
Disk model: ARC-1680-VOL#001
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sdb1 34 2147488875 2147488842 1T 8e Linux LVM
/dev/sdb2 2147488876 4294977750 2147488875 1T 8e Linux LVM
/dev/sdb3 4294967295 7812486918 3517519624 1.6T 8e Linux LVM

Disk /dev/sda: 139.7 GiB, 149999583232 bytes, 292967936 sectors
Disk model: ARC-1680-VOL#000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000c0e65

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 16065 41945714 41929650 20G 83 Linux
/dev/sda2 41945715 46138679 4192965 2G 82 Linux swap / Solaris
/dev/sda3 46138680 213905474 167766795 80G 83 Linux

Disk /dev/mapper/data-samba: 2.42 TiB, 2659960487936 bytes, 5195235328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

And
pvdisplay

— Physical volume —
PV Name /dev/sdb3
VG Name data
PV Size 1.64 TiB / not usable 2.88 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 429384
Free PE 0
Allocated PE 429384
PV UUID yf61ml-RU03-V53W-XfA0-lhKl-L95r-fF3irE

— Physical volume —
PV Name /dev/sdb1
VG Name data
PV Size 1.00 TiB / not usable 2.54 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 262144
Free PE 57344
Allocated PE 204800
PV UUID NVD4We-Z6IP-nGP5-27qU-fK6G-nnly-Dv3CFz

— Physical volume —
PV Name /dev/sdb2
VG Name data
PV Size 1.00 TiB / not usable 2.55 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 262144
Free PE 262144
Allocated PE 0
PV UUID wVh4Q9-AgPK-AJiK-2au5-ZfGx-qc89-aw6ckr

My lvm volumes are online and running (apparently) fine.
What could be wrong here, and what would be the steps to fix these problems ?

Thanks a lot for your insights on this !

PS : for the moment I “fixed” the boot problem by manually editing the old “grub/menu.lst” file to point to the new kernel.

Sounds like a bug in YaST/libstorage-ng. You should open bug report attaching YaST logs: openSUSE:Report a YaST bug - openSUSE Wiki

Thanks for your answer Andrei.
I dug a bit deeper, and the results are not reassuring.

It looks like some way or another, I totally messed up the disk partitioning.
Indeed, gdisk tells me I have both an MBR (ie not the protective MBR) and a GPT.

gdisk -l /dev/sdb

GPT fdisk (gdisk) version 1.0.8

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present

Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT

Your answer: 2
Using GPT and creating fresh protective MBR.
[…]
Number Start (sector) End (sector) Size Code Name
1 34 2147488875 1024.0 GiB 8E00 primary
2 4294977751 7812497374 1.6 TiB 8E00 primary
3 2147488876 4294977750 1024.0 GiB 8E00 primary

gdisk -l /dev/sdb

GPT fdisk (gdisk) version 1.0.8

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present

Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT

Your answer: 1
[…]
Number Start (sector) End (sector) Size Code Name
1 34 2147488875 1024.0 GiB 8E00 Linux LVM
2 2147488876 4294977750 1024.0 GiB 8E00 Linux LVM
3 4294967295 7812486918 1.6 TiB 8E00 Linux LVM

The MBR does not look really valid, because some partitions overlap (and I would then understand that libstorage-ng does not like this disk).

But parted tells me my disk IS msdos, and therefore that the MBR is used.

parted -l

[…]
Error: Can’t have overlapping partitions.
Ignore/Cancel? i
Model: Areca ARC-1680-VOL#001 (scsi)
Disk /dev/sdb: 4000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 17.4kB 1100GB 1100GB primary lvm, type=8e
2 1100GB 2199GB 1100GB primary lvm, type=8e
3 2199GB 4000GB 1801GB primary lvm, type=8e

testdisk, on the other hand, tells me that it detected the disk as EFI GPT.

Disk /dev/sdb - 3999 GB / 3725 GiB - Areca ARC-1680-VOL#001

Please select the partition table type, press Enter when done.
[Intel ] Intel/PC partition
>[EFI GPT] EFI GPT partition map (Mac i386, some x86_64…)
[Humax ] Humax partition table
[Mac ] Apple partition map (legacy)
[None ] Non partitioned media
[Sun ] Sun Solaris partition
[XBox ] XBox partition
[Return ] Return to disk selection

Hint: EFI GPT partition table type has been detected.
Note: Do NOT select ‘None’ for media with only a single partition. It’s very
rare for a disk to be ‘Non-partitioned’.

So, how can I tell wether my system is using the MBR or the GPT for this disk ?

If it’s MBR, I’d like to fix it and remove the GPT.
If it’s GPT I’d like to remove the MBR.

I’m quite confident that once this is fixed, yast won’t complain anymore, don’t you think ?

Reboot and provide dmesg output (upload to https://susepaste.org).

openSUSE Paste

Since my drive is 4TB, am I right to assume that MBR should simply not work ?

Hmm … I somehow thought kernel would print detected partition table. It should be GPT, but you can verify using

udevadm info -p /block/sdb

and check ID_PART_TABLE_TYPE property.

Also you could use

grep . /sys/block/sd*/sd*/{partition,start,size}

and match partition start/size with gdisk output.

san01:/sys/block/sdb/sdb2 # grep . /sys/block/sd*/sd*/{partition,start,size}
/sys/block/sda/sda1/partition:1
/sys/block/sda/sda2/partition:2
/sys/block/sda/sda3/partition:3
/sys/block/sdb/sdb1/partition:1
/sys/block/sdb/sdb2/partition:2
/sys/block/sdb/sdb3/partition:3
/sys/block/sda/sda1/start:16065
/sys/block/sda/sda2/start:41945715
/sys/block/sda/sda3/start:46138680
/sys/block/sdb/sdb1/start:34
/sys/block/sdb/sdb2/start:2147488876
/sys/block/sdb/sdb3/start:4294967295
/sys/block/sda/sda1/size:41929650
/sys/block/sda/sda2/size:4192965
/sys/block/sda/sda3/size:167766795
/sys/block/sdb/sdb1/size:2147488842
/sys/block/sdb/sdb2/size:2147488875
/sys/block/sdb/sdb3/size:3517519624

and

san01:/sys/block/sdb/sdb2 # udevadm info -p /block/sdb | grep ID_PART_TABLE_TYPE
E: ID_PART_TABLE_TYPE=dos

These numbers do match fidsk’s output.
Looks like the disk is using MBR.

That’s not good because GPT looked fine while MBR had overlapping partitions.

My next move would be to backup the MBR with sfdisk (already done actually), and use gdisk to activate GPT with the correct layout and replace the MBR with the protective one.
Waht do you think ?

Looking more closely, kernel requires protective MBR by default. This can be overridden (with gpt kernel parameter) but kernel still requires valid alternative table. So both GPT must be valid even with gpt parameter.

Sorry, I’m not sure I understand.
There must be a protective MBR on a GPT disk, fine.
But my actual MBR is not a protective one, it’s a real MBR. Like we see in gdisk’s output which says “MBR Only”, and which should read “Protective” in case of a GPT disk.

So actually I have a disk in a hybrid MBR/GPT state that should never exist, IMO.
And since it’s larger than 2TB, I don’t even understand how it can work in its current setup (ie. apparently MBR).

MBR boot will only see first 2 TB of drive.

And yet, this disk has 3 partitions filling the entire 4TB disk, all of them hosting a LVM PV, and the underlying LV is working OK… so far !!!
But I really don’t want to stay with this problem much longer. I’m looking for an exernal HD to backup this up but the ones I tried where not recognized.

I think I’ll give gpt migration a try. Fingers crossed.