From: Johan Groth <johan.groth@linux-grotto.org.uk>
To: Mark Lord <lkml@rtr.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Scsi errors with Megaraid 300-8x
Date: Thu, 24 Aug 2006 16:09:41 +0100 [thread overview]
Message-ID: <44EDC135.4080007@linux-grotto.org.uk> (raw)
In-Reply-To: <44EDBC39.2070207@rtr.ca>
Mark Lord wrote:
> Johan Groth wrote:
>> Justin Piszcz wrote:
>>> Run badblocks in r+w mode on the bad disk and it will force the disk
>>> to re-allocate the bad sector if it can.
>>>
>>> Justin.
>>
>> Is that possible to do in a non-destructive way? I don't want to loose
>> all data and apparently I can't back it up either :(.
>
> Yes, it is perfectly doable, but I don't think anyone has yet bothered
> to release a utility that actually does it.
>
> OPPORTUNITY FOR FAME AND FORTUNE! (okay, maybe just some fame):
> =================================
> Hack the existing smartctl code to read out the failed sector numbers,
> and then issue single-sector read-overwrite to each of those bad sectors.
>
> Very simple code. I'll do it myself eventually, but please beat me to it!
Authors of badblocks already has with the -n option :). When I ran
badblocks on the entire partition it wanted to check over 210 million
blocks and when it finally came to the bad sector parts the controller
lost the drive and the kernel started to spit out scsi errors! Buggy
driver, hardware error? God knows. Unfortunately I don't have a log to
show you as I was in single user mode.
I would like to run badblocks again but only around the damaged part.
Thing is that I know which sector the kernel thinks is bad but badblocks
wants to know which block to start and end at. How do I convert a sector
number to block number. The partition is a standard XFS partition, ie I
haven't made any changes to block sizes when I formatted it.
Got this from xfs_info:
meta-data=/dev/sda7 isize=256 agcount=16, agsize=3433014
blks
= sectsz=512 attr=1
data = bsize=4096 blocks=54928224, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal bsize=4096 blocks=26820, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0
There's another thing I would like know. How do I find out what file a
sector belongs to?
Regards,
Johan
next prev parent reply other threads:[~2006-08-24 15:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-22 14:45 Scsi errors with Megaraid 300-8x Johan Groth
2006-08-23 15:27 ` Mark Lord
2006-08-23 15:42 ` Johan Groth
2006-08-23 15:45 ` Justin Piszcz
2006-08-23 15:48 ` Johan Groth
2006-08-23 15:53 ` Justin Piszcz
2006-08-23 15:57 ` Johan Groth
2006-08-23 15:59 ` Justin Piszcz
2006-08-24 14:48 ` Mark Lord
2006-08-24 15:09 ` Johan Groth [this message]
2006-08-24 16:57 ` Mark Lord
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=44EDC135.4080007@linux-grotto.org.uk \
--to=johan.groth@linux-grotto.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox