linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Niccolò Belli" <darkbasic@linuxsystems.it>
To: linux-raid@vger.kernel.org
Subject: Re: raid1 issue after disk failure: both disks of the array are still active
Date: Mon, 17 Sep 2012 01:35:31 +0200	[thread overview]
Message-ID: <50566243.1080907@linuxsystems.it> (raw)
In-Reply-To: <5055F0CF.6000908@linuxsystems.it>

I finally managed to reallocate the sectors!

I tried with sg3-utils but I get:

root@asterisk:~# sg_reassign --address=3912 /dev/sda
REASSIGN BLOCKS not supported

then I read this on the smartmontools mailing list:

<<
Possibly what is happening is that because he is only writing a partial
block, the OS is first trying to read the the original block so that it
can preserve the parts that won't be changing. When this operation fails,
it blocks the write that would trigger reallocation of the bad sector.
Writing using the OS blocksize (typically 4096 on linux systems) properly
aligned should work around that issue.
 >>

so I tried with

dd if=/dev/zero of=/dev/sda bs=4096

and ta-daaa! :D

197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always 
       -       *0*
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age 
Offline      -       1


Current_Pending_Sector are gone!


with a smartctl -t offline /dev/sda I removed the Offline_Uncorrectable too:

197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always 
       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age 
Offline      -       *0*




For the sake of google:

     Reallocated_Event_Count

     This is how many sectors have already been reallocated on the 
drive. We're hoping to get the hard disk to increase this number!

     Current_Pending_Sector

     The number of sectors that the drive thinks are dodgy. Bear in mind 
sometimes drives change their mind about whether a sector is bad or not 
- so this number can go down without a reallocation occuring.

     Offline_Uncorrectable

     This is the number of sectors that the drive has attempted to 
correct itself, but failed. Running the command:

     smartctl -t offline /dev/hda

     should cause the drive to test the sectors and attempt to fix them. 
Not all drives support this though.




Thanks for helping!
Niccolò
-- 
http://www.linuxsystems.it
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-09-16 23:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 10:01 raid1 issue after disk failure: both disks of the array are still active Niccolò Belli
2012-09-13 10:34 ` Robin Hill
2012-09-13 10:46   ` Niccolò Belli
     [not found]     ` <5051BBC3.4050805@websitemanagers.com.au>
2012-09-13 11:29       ` Niccolò Belli
     [not found]     ` <CABYL=TpKD2B0vwTrHH=iFK3PcMWueEsi84ACRbBQkDXuiWG3kw@mail.gmail.com>
2012-09-13 15:32       ` Roberto Spadim
2012-09-13 15:48         ` Niccolò Belli
2012-09-13 15:53           ` Roberto Spadim
2012-09-14  7:54             ` Niccolò Belli
2012-09-13 17:02   ` Chris Murphy
2012-09-13 17:39     ` Roberto Spadim
2012-09-13 20:13       ` Chris Murphy
2012-09-14  7:16     ` Mikael Abrahamsson
2012-09-14  7:45       ` Niccolò Belli
2012-09-14 18:04         ` Chris Murphy
2012-09-14 18:27           ` Robin Hill
2012-09-14 18:53             ` Chris Murphy
2012-09-15 19:05               ` Niccolò Belli
2012-09-15 19:41                 ` Robin Hill
2012-09-15 22:06                   ` Niccolò Belli
2012-09-16 10:18                     ` Robin Hill
2012-09-16 10:42                   ` Niccolò Belli
2012-09-16 15:26                     ` Chris Murphy
2012-09-16 15:31                       ` Niccolò Belli
2012-09-16 23:35                         ` Niccolò Belli [this message]
2012-09-17  0:00                           ` Chris Murphy
2012-09-17  0:03                             ` Niccolò Belli
2012-09-14  8:13       ` NeilBrown

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=50566243.1080907@linuxsystems.it \
    --to=darkbasic@linuxsystems.it \
    --cc=linux-raid@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).