From: Michal Soltys <msoltyspl@yandex.pl>
To: Song Liu <song@kernel.org>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Assemblin journaled array fails
Date: Wed, 13 May 2020 12:58:21 +0200 [thread overview]
Message-ID: <b9b6b007-2177-a844-4d80-480393f30476@yandex.pl> (raw)
In-Reply-To: <CAPhsuW4WcqkDXOhcuG33bZtSEZ-V-KYPLm87piBH24eYEB0qVw@mail.gmail.com>
On 5/12/20 3:27 AM, Song Liu wrote:
> On Mon, May 11, 2020 at 4:13 AM Michal Soltys <msoltyspl@yandex.pl> wrote:
>>
>> On 5/10/20 1:57 AM, Michal Soltys wrote:
>>> Anyway, I did some tests with manually snapshotted component devices
>>> (using dm snapshot target to not touch underlying devices).
>>>
>>> The raid manages to force assemble in read-only mode with missing
>>> journal device, so we probably will be able to recover most data
>>> underneath this way (as a last resort).
>>>
>>> The situation I'm in now is likely from uncelan shutdown after all (why
>>> the machine failed to react to ups properly is another subject).
>>>
>>> I'd still want to find out why is - apparently - a journal device giving
>>> issues (contrary to what I'd expect it to do ...), with notable mention of:
>>>
>>> 1) mdadm hangs (unkillable, so I presume in kernel somewhere) and eats 1
>>> cpu when trying to assemble the raid with journal device present; once
>>> it happens I can't do anything with the array (stop, run, etc.) and can
>>> only reboot the server to "fix" that
>>>
>>> 2) mdadm -D shows nonsensical device size after assembly attempt (Used
>>> Dev Size : 18446744073709551615)
>>>
>>> 3) the journal device (which itself is md raid1 consisting of 2 ssds)
>>> assembles, checks (0 mismatch_cnt) fine - and overall looks ok.
>>>
>>>
>>> From other interesting things, I also attempted to assemble the raid
>>> with snapshotted journal. From what I can see it does attempt to do
>>> something, judging from:
>>>
>>> dmsetup status:
>>>
>>> snap_jo2: 0 536870912 snapshot 40/33554432 16
>>> snap_sdi1: 0 7812500000 snapshot 25768/83886080 112
>>> snap_jo1: 0 536870912 snapshot 40/33554432 16
>>> snap_sdg1: 0 7812500000 snapshot 25456/83886080 112
>>> snap_sdj1: 0 7812500000 snapshot 25928/83886080 112
>>> snap_sdh1: 0 7812500000 snapshot 25352/83886080 112
>>>
>>> But it doesn't move from those values (with mdadm doing nothing eating
>>> 100% cpu as mentioned earlier).
>>>
>>>
>>> Any suggestions how to proceed would very be appreciated.
>>
>>
>> I've added Song to the CC. If you have any suggestions how to
>> proceed/debug this (mdadm stuck somewhere in kernel as far as I can see
>> - while attempting to assembly it).
>>
>> For the record, I can assemble the raid successfully w/o journal (using
>> snapshotted component devices as above), and we did recover some stuff
>> this way from some filesystems - but for some other ones I'd like to
>> keep that option as the very last resort.
>
> Sorry for delayed response.
>
> A few questions.
>
> For these two outputs:
> #1
> Name : xs22:r5_big (local to host xs22)
> UUID : d5995d76:67d7fabd:05392f87:25a91a97
> Events : 56283
>
> Number Major Minor RaidDevice State
> - 0 0 0 removed
> - 0 0 1 removed
> - 0 0 2 removed
> - 0 0 3 removed
>
> - 8 145 3 sync /dev/sdj1
> - 8 129 2 sync /dev/sdi1
> - 9 127 - spare /dev/md/xs22:r1_journal_big
> - 8 113 1 sync /dev/sdh1
> - 8 97 0 sync /dev/sdg1
>
> #2
> /dev/md/r1_journal_big:
> Magic : a92b4efc
> Version : 1.1
> Feature Map : 0x200
> Array UUID : d5995d76:67d7fabd:05392f87:25a91a97
> Name : xs22:r5_big (local to host xs22)
> Creation Time : Tue Mar 5 19:28:58 2019
> Raid Level : raid5
> Raid Devices : 4
>
> Avail Dev Size : 536344576 (255.75 GiB 274.61 GB)
> Array Size : 11718355968 (11175.50 GiB 11999.60 GB)
> Used Dev Size : 7812237312 (3725.17 GiB 3999.87 GB)
> Data Offset : 262144 sectors
> Super Offset : 0 sectors
> Unused Space : before=261872 sectors, after=0 sectors
> State : clean
> Device UUID : c3a6f2f6:7dd26b0c:08a31ad7:cc8ed2a9
>
> Update Time : Sat May 9 15:05:22 2020
> Bad Block Log : 512 entries available at offset 264 sectors
> Checksum : c854904f - correct
> Events : 56289
>
> Layout : left-symmetric
> Chunk Size : 512K
>
> Device Role : Journal
> Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
>
>
> Are these captured back to back? I am asking because they showed different
> "Events" number.
Nah, they were captured between reboots. Back to back all event fields show identical value (at 56291 now).
>
> Also, when mdadm -A hangs, could you please capture /proc/$(pidof mdadm)/stack ?
>
The output is empty:
xs22:/☠ ps -eF fww | grep mdadm
root 10332 9362 97 740 1884 25 12:47 pts/1 R+ 6:59 | \_ mdadm -A /dev/md/r5_big /dev/md/r1_journal_big /dev/sdi1 /dev/sdg1 /dev/sdj1 /dev/sdh1
xs22:/☠ cd /proc/10332
xs22:/proc/10332☠ cat stack
xs22:/proc/10332☠
> 18446744073709551615 is 0xffffffffffffffffL, so it is not initialized
> by data from the disk.
> I suspect we hang somewhere before this value is initialized.
>
next prev parent reply other threads:[~2020-05-13 10:58 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 10:54 Assemblin journaled array fails Michal Soltys
2020-05-09 11:32 ` Michal Soltys
2020-05-09 13:15 ` antlists
2020-05-09 13:20 ` Michal Soltys
2020-05-09 13:32 ` Michal Soltys
2020-05-09 23:57 ` Michal Soltys
2020-05-11 11:11 ` Michal Soltys
2020-05-12 1:27 ` Song Liu
2020-05-13 10:58 ` Michal Soltys [this message]
2020-05-13 16:17 ` Song Liu
2020-05-14 11:07 ` Michal Soltys
2020-05-16 0:15 ` Song Liu
[not found] ` <d0340d7b-6b3a-4fd3-e446-5f0967132ef6@yandex.pl>
2020-05-18 23:55 ` Song Liu
2020-05-20 12:08 ` Michal Soltys
2020-05-25 16:23 ` Michal Soltys
2020-05-26 23:37 ` Song Liu
2020-05-27 13:36 ` Michal Soltys
2020-05-28 10:18 ` Michal Soltys
2020-05-28 15:06 ` Song Liu
2020-05-28 15:36 ` Michal Soltys
2020-05-29 12:09 ` Michal Soltys
2020-05-29 21:03 ` Song Liu
2020-05-29 21:57 ` Song Liu
2020-06-03 10:12 ` Michal Soltys
2020-06-03 22:07 ` Song Liu
2020-06-04 13:58 ` Michal Soltys
2020-06-05 12:26 ` Michal Soltys
2020-06-09 9:36 ` Michal Soltys
2020-06-09 18:36 ` Song Liu
2020-06-09 21:51 ` Michal Soltys
2020-06-16 11:11 ` Michal Soltys
2020-06-17 0:48 ` Song Liu
2020-06-17 12:53 ` Michal Soltys
2020-06-17 17:11 ` Song Liu
2020-06-19 11:35 ` Michal Soltys
2020-06-20 0:14 ` Song Liu
2020-06-22 11:12 ` Michal Soltys
2020-06-22 16:37 ` Song Liu
2020-06-23 13:17 ` Michal Soltys
2020-06-23 23:13 ` Song Liu
2020-06-25 16:11 ` Michal Soltys
2020-07-06 8:07 ` Michal Soltys
2020-07-06 22:08 ` Song Liu
2020-07-08 11:29 ` Michal Soltys
2020-07-08 23:51 ` Song Liu
2020-06-26 8:28 ` Guoqing Jiang
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=b9b6b007-2177-a844-4d80-480393f30476@yandex.pl \
--to=msoltyspl@yandex.pl \
--cc=linux-raid@vger.kernel.org \
--cc=song@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 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.