From: Andrey Zhunev <a-j@a-j.ru>
To: "Carlos E. R." <robin.listas@telefonica.net>
Cc: xfs list <linux-xfs@vger.kernel.org>
Subject: Re: Need help to recover root filesystem after a power supply issue
Date: Thu, 11 Jul 2019 10:10:12 +0300 [thread overview]
Message-ID: <438631176.20190711101012@a-j.ru> (raw)
In-Reply-To: <cebdb77b-e175-06a8-a78d-525f86d10457@telefonica.net>
Thursday, July 11, 2019, 5:47:36 AM, you wrote:
> On 11/07/2019 01.43, Andrey Zhunev wrote:
>>
>> Ok, the ddrescue finished copying whatever it was able to recover.
>> There were many unreadable sectors near the end of the drive.
>> In total, there were over 170 pending sectors reported by SMART.
>>
>> I then ran the following commands:
>>
>> # smartctl -l scterc,900,100 /dev/sda
>> # echo 180 > /sys/block/sda/device/timeout
>>
>> But this didn't help at all. The unreadable sectors still remained
>> unreadable.
>>
>> So I wiped them with hdparm:
>> # hdparm --yes-i-know-what-i-am-doing --write-sector <sector_number> /dev/sda
> This has always eluded me. How did you know the sector numbers?
When you use ddrescue (or any other tool) to try and read the data
and there is a read error, an error message is added to your kernel
log. You can find the sector number there:
Jul 10 11:56:01 mgmt kernel: blk_update_request: I/O error, dev sda, sector 157804112
You can then try to re-read that specific sector with:
# hdparm --read-sector 157804112
If that one still gives an error - then you're sure you can wipe it.
> At this point, I typically take the brutal approach of overwriting the
> entire partition (or disk) with zeroes using dd, which works as a
> destructive write test ;-)
> Previous to that, I attempt to create an image with ddrescue, of course.
>>
>> I then re-read all these sectors, and they were all read correctly.
>>
>> The number of pending sectors reported by SMART dropped down to 7.
>> Interestingly, there are still NO reallocated sectors reported.
> I suspect that the figure SMART reports only starts to rise after some
> unknown amount of sectors have been remapped, so when the numbers
> actually appear there, it is serious.
Hmmm, this is an interesting thought!
Everybody lies... :)
---
Best regards,
Andrey
next prev parent reply other threads:[~2019-07-11 7:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 9:47 Need help to recover root filesystem after a power supply issue Andrey Zhunev
2019-07-10 14:30 ` Chris Murphy
2019-07-10 15:28 ` Andrey Zhunev
2019-07-10 15:45 ` Chris Murphy
2019-07-10 16:07 ` Andrey Zhunev
2019-07-10 16:46 ` Chris Murphy
2019-07-10 16:47 ` Chris Murphy
2019-07-10 17:16 ` Andrey Zhunev
2019-07-10 18:03 ` Chris Murphy
2019-07-10 18:35 ` Carlos E. R.
2019-07-10 19:30 ` Chris Murphy
2019-07-10 23:43 ` Andrey Zhunev
2019-07-11 2:47 ` Carlos E. R.
2019-07-11 7:10 ` Andrey Zhunev [this message]
2019-07-11 10:23 ` Carlos E. R.
2019-07-10 16:51 ` Chris Murphy
-- strict thread matches above, loose matches on Subject: below --
2019-07-10 9:56 Andrey Zhunev
2019-07-10 13:26 ` Eric Sandeen
2019-07-10 13:58 ` Andrey Zhunev
2019-07-10 14:23 ` Eric Sandeen
2019-07-10 15:02 ` Andrey Zhunev
2019-07-10 15:23 ` Eric Sandeen
2019-07-10 18:21 ` Carlos E. R.
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=438631176.20190711101012@a-j.ru \
--to=a-j@a-j.ru \
--cc=linux-xfs@vger.kernel.org \
--cc=robin.listas@telefonica.net \
/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