All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Robert Nagy <robert.nagy@gmail.com>, linux-scsi@vger.kernel.org
Subject: Re: READ CAPACITY failed on ia64
Date: Thu, 30 Aug 2007 16:48:48 -0400	[thread overview]
Message-ID: <46D72D30.2000903@torque.net> (raw)
In-Reply-To: <20070814120808.GM16277@parisc-linux.org>

Matthew Wilcox wrote:
> On Tue, Aug 14, 2007 at 01:50:05PM +0200, Robert Nagy wrote:
>> In this box I get the following error message:
> 
> If you turn on CONFIG_SCSI_CONSTANTS, you'll get the error message
> decoded for you, but ...
> 
>> sd 0:0:2:0: [sdb] READ CAPACITY failed
>> sd 0:0:2:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
>> sd 0:0:2:0: [sdb] Sense Key : 0x3 [current]
> 
>         "Medium Error",     /* 3: Data error detected on the medium */
> 
>> sd 0:0:2:0: [sdb] ASC=0x31 ASCQ=0x0
> 
>         {0x3100, "Medium format corrupted"},
> 
>> I am currently running 2.6.22 but I've also tried with serveral other
>> (and older) kernels and it still can't get the capacity of the disk.
> 
> Looks like the disc is broken.  Given that a scsiformat doesn't fix it,
> it's probably irretrievable.

When a disk is formatted to a different sector size (say
from 528 bytes to 512) then a MODE SELECT followed by a
FORMAT is required. If the format fails or is interrupted
(say someone powers off the machine) then the disk is said
to be in "medium format corrupted" state.
Any attempt to access the media when the disk is in this
state will yield the reported error.

May I suggest that you try sg_format in sg3_utils.
Using sg_format without the '--format' option may show
you what is happening. For a healthy disk you would see
something like this:

# sg_format /dev/sda
    Linux     scsi_debug        1.82   peripheral_type: disk [0x0]
Mode sense (block descriptor) data, prior to changes:
  Number of blocks=16384 [0x4000]
  Block size=512 [0x200]
Read Capacity (10) results:
   Number of blocks=16384
   Block size=512 bytes
No changes made. To format use '--format'. To resize use '--resize'


You will probably see the same error in response to
the Read Capacity. The block size reported by
the Mode Sense (block descriptor) most likely doesn't
match some or all of your media.

Doug Gilbert


      reply	other threads:[~2007-08-30 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-14 11:50 READ CAPACITY failed on ia64 Robert Nagy
2007-08-14 12:08 ` Matthew Wilcox
2007-08-30 20:48   ` Douglas Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D72D30.2000903@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=robert.nagy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.