Bug 736638
Summary: | v7 storage test won't work on 4K sector storage device | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Hardware Certification Program | Reporter: | WANG Chao <chaowang> | ||||||
Component: | Test Suite (tests) | Assignee: | Greg Nichols <gnichols> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Guangze Bai <gbai> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.1 | CC: | chaowang, czhang, fge, gbai, rlandry, ruyang, ykun, yshao | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: |
In v7 1.3, v7 storage may fail on 4k-sector device due to the minimum block size is hard-coded as 1024. This issue has been fixed in v7 1.4, now the minimum block size is set dynamically based on the value of /sys/block/<device>/queue/hw_sector_size
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2011-11-08 15:42:57 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In v7 1.3, v7 storage may fail on 4k-sector device due to the minimum block size is hard-coded as 1024. This issue has been fixed in v7 1.4, now the minimum block size is set dynamically based on the value of /sys/block/<device>/queue/hw_sector_size Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1436.html Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1436.html |
Created attachment 522089 [details] patch fix 4k sector device issue Description of problem: v7 storage test won't work on storage device with 4K hardware sector. After code review of /usr/share/tests/storage/storage.py, I found the minimum write/read block size is hard coded with 1024, which caused dt(this test is mainly using dt to test storage) fail.I think the minimum block size should be set dynamically to $(cat /sys/block/sdX/queue/hw_sector_size) Analyse original code: 31 def __init__(self): 32 Test.__init__(self, name="storage") 33 # Min and max blocksizes, in bytes. For each test, we loop through block sizes 34 # starting with minBs and doubling until we hit maxBs. Both should be 35 # powers of 2 in the range [1024-65536]. 36 self.defaultMinBs = 1024 37 self.defaultMaxBs = 65536 38 # Maximum size of the test area, in KB. (defaults to 1GB) 39 self.maxSize = 1048576 40 self.deviceClass = DeviceClass.hard_disk # Check line 36, defaultMinBs is hard coded with 1024 # And here actually set block size 467 # Set device-appropriate blocksizes and other special stuff. 468 if storageDevice[0:4] == "dasd": 469 minBs = 4096 470 maxBs = self.defaultMaxBs 471 else: 472 minBs = self.defaultMinBs 473 maxBs = self.defaultMaxBs # Check line 472, minBs is set to 1024. dt will report error when write/read to # a device with 4k hw_sector.dt option 'bs= ' should be a modulo of 4096bytes. Version-Release number of selected component (if applicable): 1.4 How reproducible: 100% Steps to Reproduce: 1.prepare a 4k sector storage device 2.v7 run -t storage --device sdX Actual results: dt report error Expected results: dt works fine. Additional info: I have written a patch for this issue.