Bug 1426341

Summary: rear detects incorrect disk size on Advanced Format disks with a non-512 block size
Product: Red Hat Enterprise Linux 7 Reporter: Kyle Walker <kwalker>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.3CC: gjose, jacksonl, ovasik
Target Milestone: rc   
Target Release: 7.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rear-2.4-7.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-13 12:51:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1420851, 1630904, 1630910, 1660473    

Description Kyle Walker 2017-02-23 17:36:24 UTC
Description of problem:
 When detecting the disk layout for a system with Advanced Format (AF) disks, the size of the disk is incorrect. 

Version-Release number of selected component (if applicable):
 rear-1.17.2-6.el7

How reproducible:
 Easily, with the correct disks

Steps to Reproduce:
1. Install and configure rear for basic use including most/all local storage
2. Verify that one or more disks report a value greater than 512 for /sys/block/<disk>/queue/logical_block_size
3. Create a rescue image
4. Verify in the resulting disklayout.conf that the size of the disk is correct

Actual results:
 The disk will be reported as significantly larger than it actually is

Expected results:
 The disk will be reported as the correct size

Additional info:
 This is due to the use of the "logical_block_size" interface exposed by the kernel via the sysfs filesystem. The value found is used as the multiplier for the "size" interface. However, the "size" interface is always in 512 byte blocks. Regardless of the "logical_block_size".

Comment 5 Pavel Cahyna 2018-08-06 17:23:25 UTC
This is being worked on in bz1610638 (see the linked upstream PR).

Comment 7 Pavel Cahyna 2019-08-13 12:51:19 UTC
Fixed together with bz1610638 in RHBA-2019:2273 (RHEL 7.7).