Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 569654

Summary: boot hangs if scsi read capacity fails on faulty non system drive
Product: Red Hat Enterprise Linux 5 Reporter: Mark Goodwin <mgoodwin>
Component: kernelAssignee: David Milburn <dmilburn>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: cward, jwilson, qcai
Target Milestone: rcKeywords: OtherQA
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 569668 (view as bug list) Environment:
Last Closed: 2011-01-13 20:36:59 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:
Bug Depends On:    
Bug Blocks: 569668    
Attachments:
Description Flags
upstream patch to set default capacity to zero on faulty scsi drive none

Description Mark Goodwin 2010-03-01 23:30:50 UTC
Description of problem:

system failed to boot due to hung partition scan on faulty non-root
scsi drive. An upstream patch has been tested and verified to fix
the issue :

commit 69bdd88ca2670c321fef774e77059516f836c6f2
Author: Hannes Reinecke <hare>
Date:   Fri Sep 1 15:50:23 2006 +0200

    [SCSI] Wrong size information for devices with disabled read access
    
    When accessing a device with disabled read access the capacity is set
    randomly to 1GB. This makes it impossible to userspace tools to detect
    invalid device capacities.
    
    Signed-off-by: Mike Anderson <andmike.com>
    Acked-by: Chris Mason <mason>
    Signed-off-by: Hannes Reinecke <hare>
    Signed-off-by: James Bottomley <James.Bottomley>

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 98bd3aa..638cff4 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1215,7 +1215,7 @@ repeat:
                /* Either no media are present but the drive didn't tell us,
                   or they are present but the read capacity command fails */
                /* sdkp->media_present = 0; -- not always correct */
-               sdkp->capacity = 0x200000; /* 1 GB - random */
+               sdkp->capacity = 0; /* unknown mapped to zero - as usual */
 
                return;
        } else if (the_result && longrc) {


Version-Release number of selected component (if applicable):
RHEL5.5-beta. Also observed on RHEL5.4 and RHEL4. A separate BZ
will be cloned for RHEL4.

How reproducible:
Always, with an appropriately faulty scsi drive. For h/w details,
see the associated IT.

Steps to Reproduce:
1. with faulty drive installed, boot
  
Actual results:
hung boot

Expected results:
no hang. scsi read capacity for the faulty drive should default to
zero rather than 1GB, so the partition scan will not be done and the
boot wont hang.

Comment 1 Mark Goodwin 2010-03-01 23:32:43 UTC
Created attachment 397217 [details]
upstream patch to set default capacity to zero on faulty scsi drive

Comment 5 Chris Ward 2010-05-17 12:24:42 UTC
@Mark, we need to get feedback about third-party test commitments before we can ack this. We can not test this in-house, it appears.

Comment 7 RHEL Program Management 2010-05-20 12:44:39 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 9 Jarod Wilson 2010-07-12 15:44:56 UTC
in kernel-2.6.18-206.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 12 Chris Ward 2010-07-22 09:28:03 UTC

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 13 Mark Goodwin 2010-09-15 11:17:15 UTC
Chris, do you still need info from me? Sorry I missed this.
FJ have successfully tested the patch, as per Comment #11.

Cheers
-- Mark

Comment 15 errata-xmlrpc 2011-01-13 20:36:59 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html