On Mon, May 04, 2020 at 12:19:43PM +0200, Chris Hofstaedtler <z...@debian.org> 
wrote:
> > partitions on the same disk it is unlikely to be caused by something weird
> > in the partition tables. That, or the algorithm is completely hosed, as it
> > shouldn't depend on the partition at all, only on the disk.
> 
> Well, I tried recreating your setup on a loop blockdev, and it works
> for me:

Studying the manpage, I tried LSBLK_DEBUG, and I think it gives a good hint:

http://data.plan9.de/lsblkbug.txt

   539: lsblk:      DEV: [0x555555596de0]: add 'sda3' to scols
   539: lsblk:      DEV: [0x555555596de0]:  refer data[0]="/dev/sda3"
   539: lsblk:      DEV: [0x555555596de0]:  refer data[1]="sda3"
   539: lsblk:      DEV: [0x555555596de0]:  refer data[2]="  8:3  "
   539: lsblk:      DEV: [0x555555596de0]:  refer data[3]="part"
   539: lsblk:      DEV: [0x555555596de0]: /dev/sda3: properties requested
   539: lsblk:      DEV: [0x555555596de0]: sda3: found udev properties
   539: lsblk:      DEV: [0x555555596de0]:  from udev
   539: lsblk:      DEV: [0x555555596de0]:  refer data[4]="dos"

I don't know how to exactly interpret this, but it seems this info comes from
udev. And indeed:

   udevadm info /dev/sda3
   [...]
   E: ID_PART_TABLE_UUID=81be6e1d-066c-45eb-a13d-53fc8e4730bd
   E: ID_PART_TABLE_TYPE=dos

So maybe this is a bug in udev (otoh, udev might use blkid, I have no clue
:).

[... later ...]

poking around in systemd sources, it does use blkid, although it is not clear
to me whether it uses libblkid or rolls it's own, but util-linux's blkid also
says PTTYPE="dos".

Deleting /run/blkid/blkid.tab and running blkid with doesn't show anything
obvious to me (http://data.plan9.de/blkidbug.txt), except that it wrongly
detetcs pttype as dos:

3900: libblkid: LOWPROBE: Resetting partitions values
3900: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1]
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid: LOWPROBE:       magic sboff=510, kboff=0
3900: libblkid: LOWPROBE: dos: ---> call probefunc()
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=512)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid: LOWPROBE:       magic sboff=0, kboff=0
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=512)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=512)
3900: libblkid: LOWPROBE: returning TYPE value
3900: libblkid: LOWPROBE: dos: <--- (rc = 0)
3900: libblkid: LOWPROBE: assigning PTTYPE [partitions]
3900: libblkid: LOWPROBE: <-- leaving probing loop (type=dos) [PARTS idx=3]
3900: libblkid: LOWPROBE: parts: start probing for partition entry
3900: libblkid:    DEVNO: found devno 0x0800 as /dev/sda
3900: libblkid: LOWPROBE: allocate a wholedisk probe
3900: libblkid: LOWPROBE: allocate a new probe
3900: libblkid: LOWPROBE: zeroize wiper
3900: libblkid: LOWPROBE: ready for low-probing, offset=0, size=2000398934016
3900: libblkid: LOWPROBE: whole-disk: YES, regfile: NO
3900: libblkid: LOWPROBE: partlist reset
3900: libblkid: LOWPROBE: parts: initialized partitions list (size=0)
3900: libblkid: LOWPROBE: --> starting probing loop [PARTS idx=-1]
3900: libblkid: LOWPROBE:       read: off=0 len=1024
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=1024)
3900: libblkid: LOWPROBE:       magic sboff=510, kboff=0
3900: libblkid: LOWPROBE: dos: ---> call probefunc()
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=512)
3900: libblkid: LOWPROBE: probably GPT -- ignore
3900: libblkid: LOWPROBE: dos: <--- (rc = 1)
3900: libblkid: LOWPROBE: gpt: ---> call probefunc()
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=0 len=512)
3900: libblkid: LOWPROBE:  #1 valid PMBR partition
3900: libblkid: LOWPROBE:  checking for GPT header at 1
3900: libblkid:   BUFFER:       reuse: off=0 len=1024 (for off=512 len=512)
3900: libblkid: LOWPROBE:       read: off=1024 len=16384
3900: libblkid: LOWPROBE: parts: create a new partition table (type=gpt, 
offset=512)
3900: libblkid: LOWPROBE: parts: add partition (start=2048, size=524288)
3900: libblkid: LOWPROBE: parts: add partition (start=526336, size=3565158400)
3900: libblkid: LOWPROBE: parts: add partition (start=3565684736, 
size=341344399)
3900: libblkid: LOWPROBE: gpt: <--- (rc = 0)
3900: libblkid: LOWPROBE: <-- leaving probing loop (type=gpt) [PARTS idx=4]
3900: libblkid: LOWPROBE: partitions probe done [rc=0]
3900: libblkid: LOWPROBE: returning partitions binary data
3900: libblkid: LOWPROBE: trying to convert devno 0x803 to partition
3900: libblkid: LOWPROBE: searching by offset/size
3900: libblkid: LOWPROBE: assigning PART_ENTRY_SCHEME [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_NAME [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_UUID [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_TYPE [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_NUMBER [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_OFFSET [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_SIZE [partitions]
3900: libblkid: LOWPROBE: assigning PART_ENTRY_DISK [partitions]
3900: libblkid: LOWPROBE: parts: end probing for partition entry [success]
3900: libblkid: LOWPROBE: partitions probe done [rc=0]
3900: libblkid: LOWPROBE: end probe
3900: libblkid: LOWPROBE: zeroize wiper
3900: libblkid: LOWPROBE: returning LABEL value
3900: libblkid:      TAG: [0x55555557ab40]: alloc
3900: libblkid:      TAG: [0x55555557ab40]: setting (LABEL) 'SSDCER'
3900: libblkid:      TAG: [0x55555557aba0]: alloc
3900: libblkid:      TAG: [0x55555557aba0]: creating new cache tag head LABEL
3900: libblkid: LOWPROBE: returning UUID value
3900: libblkid:      TAG: [0x55555557ac20]: alloc
3900: libblkid:      TAG: [0x55555557ac20]: setting (UUID) '25E09C2A0B0B294A'
3900: libblkid:      TAG: [0x55555557ac80]: alloc
3900: libblkid:      TAG: [0x55555557ac80]: creating new cache tag head UUID
3900: libblkid: LOWPROBE: returning TYPE value
3900: libblkid:      TAG: [0x55555557ad00]: alloc
3900: libblkid:      TAG: [0x55555557ad00]: setting (TYPE) 'ntfs'
3900: libblkid:      TAG: [0x55555557ad60]: alloc
3900: libblkid:      TAG: [0x55555557ad60]: creating new cache tag head TYPE
3900: libblkid: LOWPROBE: returning PTTYPE value
3900: libblkid:      TAG: [0x55555557ade0]: alloc
3900: libblkid:      TAG: [0x55555557ade0]: setting (PTTYPE) 'dos'
3900: libblkid:      TAG: [0x55555557ae40]: alloc
3900: libblkid:      TAG: [0x55555557ae40]: creating new cache tag head PTTYPE

This is all I can provide for the moment.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schm...@schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

Reply via email to