Bug 1101668 - blockdev: value of StartSec changed after util-linux update
blockdev: value of StartSec changed after util-linux update
Product: Fedora
Classification: Fedora
Component: s390utils (Show other bugs)
Unspecified Linux
high Severity high
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: ZedoraTracker 1250902
  Show dependency treegraph
Reported: 2014-05-27 13:45 EDT by Jan Stodola
Modified: 2015-08-07 03:41 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-06-29 16:49:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
strace blockdev --report /dev/dasdc1 (4.38 KB, text/plain)
2014-05-27 14:01 EDT, Jan Stodola
no flags Details

  None (edit)
Description Jan Stodola 2014-05-27 13:45:48 EDT
Description of problem:
After updating of packages on Fedora 20/s390x and re-installing bootloader, system fails to boot sometimes. Further testing showed that util-linux is the package that causes this failure, namely the blockdev binary, which reports different value for StartSec after update from util-linux-2.24-2.fc20 to util-linux-2.24.2-1.fc20:

[root@rtt7 ~]# rpm -q util-linux
[root@rtt7 ~]# blockdev --report /dev/dasdc1 
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw  1024  4096  4096         24      2461679616   /dev/dasdc1

[root@rtt7 ~]# yum update util-linux

[root@rtt7 ~]# rpm -q util-linux
[root@rtt7 ~]# blockdev --report /dev/dasdc1 
RO    RA   SSZ   BSZ   StartSec            Size   Device
rw  1024  4096  4096        192      2461679616   /dev/dasdc1
[root@rtt7 ~]#

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

How reproducible:

Steps to Reproduce:
1. install Fedora 20 on s390x, use auto-partitioning, which will create /boot on LVM
2. on installed system, update util-linux
3. re-install bootloader:
# zipl
4. reboot

Actual results:
StartSec value has changed, system fails to boot

Expected results:
system boots correctly
Comment 1 Jan Stodola 2014-05-27 14:01:16 EDT
Created attachment 899626 [details]
strace blockdev --report /dev/dasdc1

Log from strace is attached.

Reproduced with kernel-3.11.10-301.fc20.s390x and kernel-3.14.3-200.fc20.s390x

The disk type is DASD:

[root@rtt7 ~]# lsdasd -l 0.0.3627
  status:       active
  type:         ECKD
  blksz:        4096
  size:         2347MB
  blocks:       601020
  use_diag:     0
  readonly:     0
  eer_enabled:  0
  erplog:       0
  uid:          IBM.750000000L2591.0017.27.0000000000000d0a0000000000000000

[root@rtt7 ~]# dmesg | grep dasd
[    0.000000] Kernel command line: rd.lvm.lv=fedora_rtt7/root rd.lvm.lv=fedora_rtt7/swap rd.dasd=0.0.3527 cio_ignore=all,!0.0.0009 rd.dasd=0.0.3727 rd.lvm.lv=fedora_rtt7/boot rd.dasd=0.0.3627 vconsole.font=latarcyrheb-sun16 root=/dev/mapper/fedora_rtt7-root LANG=en_US.UTF-8 BOOT_IMAGE=0
[    0.564846] dasd-eckd 0.0.3727: New DASD 3390/0A (CU 3990/01) with 3339 cylinders, 15 heads, 224 sectors
[    0.565435] dasd-eckd 0.0.3627: New DASD 3390/0A (CU 3990/01) with 3339 cylinders, 15 heads, 224 sectors
[    0.567945] dasd-eckd 0.0.3627: DASD with 4 KB/block, 2404080 KB total size, 48 KB/track, compatible disk layout
[    0.568812] dasd-eckd 0.0.3727: DASD with 4 KB/block, 2404080 KB total size, 48 KB/track, compatible disk layout
[    0.568935] dasd-eckd 0.0.3527: New DASD 3390/0A (CU 3990/01) with 3339 cylinders, 15 heads, 224 sectors
[    0.569530] dasd-eckd 0.0.3527: DASD with 4 KB/block, 2404080 KB total size, 48 KB/track, compatible disk layout
[    0.569666]  dasdc:VOL1/  0X3627: dasdc1
[    0.570342]  dasdb:VOL1/  0X3727: dasdb1
[    0.571338]  dasda:VOL1/  0X3527: dasda1
[root@rtt7 ~]#

Please, let me know what additional information would be helpful.
Comment 2 Dan Horák 2014-05-27 15:54:43 EDT
A note - the output of blockdev is used by the bootloader installer to calculate the position of the boot data on disk.
Comment 3 Karel Zak 2014-05-28 07:55:51 EDT
"blockdev --report <device>" reads the information from
/sys/dev/block/<maj:min>/start now, because the original solution based on
HDIO_GETGEO ioctl was fragile. This bug report is just another proof :-)

Linux reports all offsets in /sys in 512-byte sectors independently on the
block device topology (it means it's in 512 for 4K disks too).

The same it's with HDIO_GETGEO ioctl hd_geometry.start. It's also reported in
512-bytes sectors -- except for dasd disks! 

(dasd HDIO_GETGEO: 24 * 4096 = 98304; sysfs: 192 * 512 = 98304)

See kernel code:

block/ioctl.c: HDIO_GETGEO:

          geo.start = get_start_sect(bdev);
          ret = disk->fops->getgeo(bdev, &geo);

this is generic part of the ioctl, unfortunately dasd driver modifies the start

drivers/s390/block/dasd.c: dasd_getgeo():
         geo->start = get_start_sect(bdev) >> base->block->s2b_shift;

so it reports native sectors. It seems kernel (dasd driver) is pretty
inconsistent here. Unfortunately, your bootloader installer depends on this

IMHO this is kernel issue.

My recommendation is to read /sys/dev/block/<maj:min>/start directly from the 
installer to avoid dependence on blockdev versions and dependence on strange
HDIO_GETGEO behavior.

Note that I really don't want to add exception to blockdev for dasd to 
emulate the strange behaviour.
Comment 4 Karel Zak 2014-05-28 08:14:26 EDT
I have asked on linux-s390 list for more details. 

Comment 5 Karel Zak 2014-05-29 03:36:00 EDT
According to feedback from kernel upstream dasd HDIO_GETGEO is there for backward compatibility with kernel 2.4 :-)
Comment 6 Dan Horák 2014-06-25 05:04:24 EDT
switching to s390utils so we have this tracked
Comment 7 Fedora End Of Life 2015-05-29 07:57:33 EDT
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. 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 '20'.

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 20 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 8 Fedora End Of Life 2015-06-29 16:49:29 EDT
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 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

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.