Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1101668 - blockdev: value of StartSec changed after util-linux update
Summary: blockdev: value of StartSec changed after util-linux update
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: s390utils
Version: 20
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2014-05-27 17:45 UTC by Jan Stodola
Modified: 2015-08-07 07:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 20:49:29 UTC
Type: Bug
Embargoed:


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

Description Jan Stodola 2014-05-27 17:45:48 UTC
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
util-linux-2.24-2.fc20.s390x
[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
util-linux-2.24.2-1.fc20.s390x
[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):
util-linux-2.24.2-1.fc20.s390x

How reproducible:
always

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 18:01:16 UTC
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
0.0.3627/dasdc/94:8
  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 19:54:43 UTC
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 11:55:51 UTC
"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
offset:

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
inconsistency.

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 12:14:26 UTC
I have asked on linux-s390 list for more details. 

http://marc.info/?l=linux-s390&m=140127913331109&w=2

Comment 5 Karel Zak 2014-05-29 07:36:00 UTC
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 09:04:24 UTC
switching to s390utils so we have this tracked

Comment 7 Fedora End Of Life 2015-05-29 11:57:33 UTC
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 20:49:29 UTC
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
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.