Bug 1463615 - lsblk shows same filesystem UUID for /dev/sda and /dev/sda1 for partition table type "sun"
Summary: lsblk shows same filesystem UUID for /dev/sda and /dev/sda1 for partition tab...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2017-06-21 10:28 UTC by Richard W.M. Jones
Modified: 2018-05-29 11:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:42:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2017-06-21 10:28:07 UTC
Description of problem:

Grab this disk image which demonstrates the problem:

  wget http://builder.libguestfs.org/debian-7-sparc64.xz
  unxz debian-7-sparc64.xz

Attach it as a disk to a virtual machine.  An easy way to do this
is with ‘virt-rescue’:

  virt-rescue --ro -a debian-7-sparc64

Run lsblk inside the VM:

  ><rescue> lsblk --fs
  NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
  sda    ext2         7523547d-fe02-4751-8695-4da6744621a9 
  |-sda1 ext2         7523547d-fe02-4751-8695-4da6744621a9 
  |-sda2 ext4         560235fb-9f9e-4130-a9f3-f6e0370c60bd 
  |-sda3                                                   
  `-sda4 swap         a2aa9f9a-b177-41f1-9390-d69f50fcfe29 

The same filesystem UUID is shown for both /dev/sda and /dev/sda1,
but /dev/sda does not contain a filesystem directly.

Note that this is not a regular MBR partition.  It is a weird
SunOS partition table, which I guess may be the root cause of
this problem.

Version-Release number of selected component (if applicable):

util-linux-2.29.1-2.fc26.x86_64

How reproducible:

100% with the above disk.

Steps to Reproduce:
1. See above.

Comment 1 Richard W.M. Jones 2017-06-21 10:29:30 UTC
I should note that the reason that I found this bug is because
‘findfs UUID=7523547d-fe02-4751-8695-4da6744621a9’ returns either
/dev/sda or /dev/sda1 non-deterministically for this guest, which
caused a non-deterministic bug in testing libguestfs.

Comment 2 Karel Zak 2017-06-22 09:22:24 UTC
In this case the first partition on the disk starts at sector 0, it
means partition table is within the first partition.

Device               Start     End Sectors   Size Id Type         Flags
debian-7-sparc64p1       0  192779  192780  94.1M  1 Boot              
debian-7-sparc64p2  192780 7903979 7711200   3.7G 83 Linux native      
debian-7-sparc64p3       0 8385929 8385930     4G  5 Whole disk        
debian-7-sparc64p4 7903980 8385929  481950 235.3M 82 Linux swap        

it's sometimes used for boot disks, or so. For example extN filesystem
or Linux swap support this use-case and keep begin of the device
unmodified (aka "bootbits").

I guess for some systems it's a way how to make disk bootable, but
without support for PT within firmware.

The libblkid should ignore FS on whole-disk device if there is PT.

Comment 3 Karel Zak 2017-06-22 09:29:03 UTC
... but I can imagine use-case when you want to mount the image without care about partition table, just mount the fist partition

 # mount -oro /home/archive/virt-images/debian-7-sparc64 /mnt/test
 # findmnt /mnt/test
 TARGET    SOURCE     FSTYPE OPTIONS
 /mnt/test /dev/loop0 ext2   ro,relatime,block_validity,barrier,user_xattr,acl

in this case we want to see the begin of the device as ext2 rather than SUN PT.

I'll think about it ... :-) Maybe differentiate between whole-disk (/dev/sda) and disk image (regular file) would be good enough.

Comment 4 Fedora End Of Life 2018-05-03 07:55:57 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2018-05-29 11:42:37 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.