All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Alexander Shenkin <al@shenkin.org>,
	Brad Campbell <brad@fnarfbargle.com>,
	Reindl Harald <h.reindl@thelounge.net>,
	Edward Kuns <eddie.kuns@gmail.com>,
	Mark Knecht <markknecht@gmail.com>
Cc: Wols Lists <antlists@youngman.org.uk>,
	Carsten Aulbert <carsten.aulbert@aei.mpg.de>,
	Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: SMART detects pending sectors; take offline?
Date: Fri, 5 Jan 2018 08:50:20 -0500	[thread overview]
Message-ID: <6b7ed6c2-497a-2b8d-4cd4-d7a8620bba75@turmel.org> (raw)
In-Reply-To: <35f51be7-7dbd-88f8-e743-3976bef51de2@shenkin.org>

Hi Alex,

On 01/05/2018 05:10 AM, Alexander Shenkin wrote:
> On 1/5/2018 5:25 AM, Brad Campbell wrote:

>> I'm going to go and write a letter of apology to my primary school
>> maths teacher now.

> Thanks much, Brad.  fdisk & parted output are below.  I have swap space
> mounted on /dev/sda4, 15,984,640 sectors long, after the partitions used
> for raid.  I'm not sure where exactly the parity data sits... Looks to
> me like this happened in swap space, no?  Currently, swapon reports
> 552,272 kb (= 1,104,544 sectors) in use (i think).  If that's
> contiguous, then the write should have happened after the used space
> (13,297,904 > 1,104,544). But I'm not sure swap is contiguous.  In this
> case, regardless, I suspect I should just reboot, and then run
> checkarray to be safe?

The output of fdisk is invalid on your system, see the warning it
printed.  Use gdisk or parted instead.  Don't use '*'.

> One followup: is parity info stored in a separate area than data info on
> the disk?  If the write *had* fallen within the raid partition area,
> would you indeed be able to tell if it overwrote data vs parity vs both?
>  Google wouldn't tell me...

No. Parity is interleaved with data on all devices, chunk by chunk, on
all default raid5/6 layouts.  In raid4, the last device is all of the
parity.  There are optional layouts for raid5 that do the same, and
variants for raid6 that place various combinations of parity and
syndrome at either end.  See the --layout option in the mdadm man page.

The non-data area of member devices contains at least the superblock,
and optionally a write-intent bitmap and/or a bad-block list.  Most of
the non-data space is reserved for optimizing future --grow operations.

> user@machinename:~$ sudo fdisk -l /dev/sda*
> 
> WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util
> fdisk doesn't support GPT. Use GNU Parted.

All of the partition data following this warning is bogus -- it is the
"protective" MBR record.

Phil

  parent reply	other threads:[~2018-01-05 13:50 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07  7:48 SMART detects pending sectors; take offline? Alexander Shenkin
2017-10-07  8:21 ` Carsten Aulbert
2017-10-07 10:05   ` Alexander Shenkin
2017-10-07 17:29     ` Wols Lists
2017-10-08  9:19       ` Alexander Shenkin
2017-10-08  9:49         ` Wols Lists
2017-10-09 20:16   ` Phil Turmel
2017-10-10  9:00     ` Alexander Shenkin
2017-10-10  9:11       ` Reindl Harald
2017-10-10  9:56         ` Alexander Shenkin
2017-10-10 12:55           ` Phil Turmel
2017-10-11 10:31             ` Alexander Shenkin
2017-10-11 17:10               ` Phil Turmel
2017-10-12  9:50                 ` Alexander Shenkin
2017-10-12 11:01                   ` Wols Lists
2017-10-12 13:04                     ` Phil Turmel
2017-10-12 13:16                       ` Alexander Shenkin
2017-10-12 13:21                         ` Mark Knecht
2017-10-12 15:16                           ` Edward Kuns
2017-10-12 15:52                             ` Edward Kuns
2017-10-15 14:41                               ` Alexander Shenkin
2017-12-18 15:51                               ` Alexander Shenkin
2017-12-18 16:09                                 ` Phil Turmel
2017-12-19 10:35                                   ` Alexander Shenkin
2017-12-19 12:02                                     ` Phil Turmel
2017-12-21 11:28                                       ` Alexander Shenkin
2017-12-21 11:38                                         ` Reindl Harald
2017-12-23  3:14                                           ` Brad Campbell
2018-01-03 12:44                                             ` Alexander Shenkin
2018-01-03 13:26                                               ` Brad Campbell
2018-01-03 13:50                                                 ` Alexander Shenkin
2018-01-03 15:53                                                   ` Phil Turmel
2018-01-03 15:59                                                     ` Alexander Shenkin
2018-01-03 16:02                                                       ` Phil Turmel
2018-01-04 10:37                                                         ` Alexander Shenkin
2018-01-04 12:28                                                           ` Alexander Shenkin
2018-01-04 13:16                                                             ` Brad Campbell
2018-01-04 13:39                                                               ` Alexander Shenkin
2018-01-05  5:20                                                                 ` Brad Campbell
2018-01-05  5:25                                                                   ` Brad Campbell
2018-01-05 10:10                                                                     ` Alexander Shenkin
2018-01-05 10:32                                                                       ` Brad Campbell
2018-01-05 13:50                                                                       ` Phil Turmel [this message]
2018-01-05 14:01                                                                         ` Alexander Shenkin
2018-01-05 15:59                                                                         ` Wols Lists
2017-10-12 15:19                   ` Kai Stian Olstad
2017-10-10 22:23           ` josh
2017-10-11  6:23             ` Alexander Shenkin
2017-10-10  9:21       ` Wols Lists

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=6b7ed6c2-497a-2b8d-4cd4-d7a8620bba75@turmel.org \
    --to=philip@turmel.org \
    --cc=al@shenkin.org \
    --cc=antlists@youngman.org.uk \
    --cc=brad@fnarfbargle.com \
    --cc=carsten.aulbert@aei.mpg.de \
    --cc=eddie.kuns@gmail.com \
    --cc=h.reindl@thelounge.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=markknecht@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.