From: "Patrik Dahlström" <risca@powerlamerz.org>
To: Andreas Klauer <Andreas.Klauer@metamorpher.de>,
Brad Campbell <lists2009@fnarfbargle.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Recover array after I panicked
Date: Sun, 23 Apr 2017 17:24:59 +0200 [thread overview]
Message-ID: <e57038fa-4b27-7d0c-d6c1-e583fecd503f@powerlamerz.org> (raw)
In-Reply-To: <f353b7fc-a63a-5503-5cda-6a62698f69ae@powerlamerz.org>
On 04/23/2017 05:11 PM, Patrik Dahlström wrote:
>
>
> On 04/23/2017 04:48 PM, Andreas Klauer wrote:
>> On Sun, Apr 23, 2017 at 10:06:15PM +0800, Brad Campbell wrote:
>>> Nobody seems to have mentioned the reshape issue.
>>
>> Good point.
>>
>> If it was mid-reshape you need two sets of overlays,
>> create two RAIDs (one for each configuration), and
>> then find the point where it converges.
>>
>>> If my reading of the code is correct (and my memory
>>> is any good), simply adding a disk to a raid5 on a
>>> recent enough kernel should make the resync go backwards.
>>
>> Doesn't it cut the offset by half and grow forwards...?
>>
>> With growing a disk that should give you a segment where
>> data is identical for both 5-disk and 6-disk RAID-5.
>> And that's where you join them using dmsetup linear.
>>
>> Before:
>>
>> /dev/loop0:
>> Magic : a92b4efc
>> Version : 1.2
>> Feature Map : 0x1
>> Array UUID : 4611f41b:0464e815:8b6f9cfe:b29c56fd
>> Name : EIS:42 (local to host EIS)
>> Creation Time : Sun Apr 23 16:44:59 2017
>> Raid Level : raid5
>> Raid Devices : 5
>>
>> Avail Dev Size : 11720783024 (5588.90 GiB 6001.04 GB)
>> Array Size : 23441565696 (22355.62 GiB 24004.16 GB)
>> Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
>> Data Offset : 262144 sectors
>> Super Offset : 8 sectors
>> Unused Space : before=262064 sectors, after=176 sectors
>> State : clean
>> Device UUID : acd8d9fd:7b7cf9a0:f63369d1:907ffa66
>>
>> Internal Bitmap : 8 sectors from superblock
>> Update Time : Sun Apr 23 16:44:59 2017
>> Bad Block Log : 512 entries available at offset 32 sectors
>> Checksum : f89bdc5 - correct
>> Events : 2
>>
>> Layout : left-symmetric
>> Chunk Size : 512K
>>
>> Device Role : Active device 0
>> Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
>>
>> After/During grow:
>>
>> /dev/loop0:
>> Magic : a92b4efc
>> Version : 1.2
>> Feature Map : 0x45
>> Array UUID : 4611f41b:0464e815:8b6f9cfe:b29c56fd
>> Name : EIS:42 (local to host EIS)
>> Creation Time : Sun Apr 23 16:44:59 2017
>> Raid Level : raid5
>> Raid Devices : 6
>>
>> Avail Dev Size : 11720783024 (5588.90 GiB 6001.04 GB)
>> Array Size : 29301957120 (27944.52 GiB 30005.20 GB)
>> Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
>> Data Offset : 262144 sectors
>> | New Offset : 257024 sectors
>> Super Offset : 8 sectors
>> State : clean
>> Device UUID : acd8d9fd:7b7cf9a0:f63369d1:907ffa66
>>
>> Internal Bitmap : 8 sectors from superblock
>> | Reshape pos'n : 1472000 (1437.50 MiB 1507.33 MB)
>> | Delta Devices : 1 (5->6)
>>
>> Update Time : Sun Apr 23 16:45:38 2017
>> Bad Block Log : 512 entries available at offset 32 sectors
>> Checksum : fbd9a55 - correct
>> Events : 30
>>
>> Layout : left-symmetric
>> Chunk Size : 512K
>>
>> Device Role : Active device 0
>> Array State : AAAAAA ('A' == active, '.' == missing, 'R' == replacing)
>>
>> Basically you have to know the New Offset
>> (search first 128M of your drives for filesystem headers, that should be it)
> Let's see if I understand you correctly:
>
> * I try to find 0x53EF (ext4 magic) within the first 128M of
> /dev/sd[abcde]. Not after? This will be an indication of my "New
> Offset". I need to adjust the offset a bit since the ext4 magic is
> located at 0x438 offset.
>
Okay, I located what appears to be a ext4 file system header at
0x7B80000 in both /dev/sda and /dev/sdf. I used this command:
dd if=/dev/sda bs=524288 count=256 | ./ext2scan
where ext2scan comes from https://goo.gl/2TnZSR
>> and then guess the Reshape pos'n by comparing raw data at offset X
>> (find non-zero data at identical offsets for both raid sets)
>
> * I create a 5 and a 6 drive raid set and try to find an offset where
> they both carry the same raw data. With some overlays, I should be able
> to create both these raids at the same time, correct?
I'm still working on this one. Should I start looking at ~15% of the raid?
What is the next step after this?
>
>>
>> Regards
>> Andreas Klauer
>>
next prev parent reply other threads:[~2017-04-23 15:24 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 9:47 Recover array after I panicked Patrik Dahlström
2017-04-23 10:16 ` Andreas Klauer
2017-04-23 10:23 ` Patrik Dahlström
2017-04-23 10:46 ` Andreas Klauer
2017-04-23 11:12 ` Patrik Dahlström
2017-04-23 11:36 ` Wols Lists
2017-04-23 11:47 ` Patrik Dahlström
2017-04-23 11:53 ` Reindl Harald
2017-04-23 11:58 ` Roman Mamedov
2017-04-23 12:11 ` Wols Lists
2017-04-23 12:15 ` Patrik Dahlström
2017-04-24 21:04 ` Phil Turmel
2017-04-24 21:56 ` Patrik Dahlström
2017-04-24 23:35 ` Phil Turmel
2017-04-23 13:16 ` Andreas Klauer
2017-04-23 13:49 ` Patrik Dahlström
2017-04-23 14:36 ` Andreas Klauer
2017-04-23 14:45 ` Patrik Dahlström
2017-04-23 12:32 ` Patrik Dahlström
2017-04-23 12:45 ` Andreas Klauer
2017-04-23 12:57 ` Patrik Dahlström
2017-04-23 14:06 ` Brad Campbell
2017-04-23 14:09 ` Patrik Dahlström
2017-04-23 14:20 ` Patrik Dahlström
2017-04-23 14:25 ` Brad Campbell
2017-04-23 14:48 ` Andreas Klauer
2017-04-23 15:11 ` Patrik Dahlström
2017-04-23 15:24 ` Patrik Dahlström [this message]
2017-04-23 15:42 ` Andreas Klauer
2017-04-23 16:29 ` Patrik Dahlström
2017-04-23 19:21 ` Patrik Dahlström
2017-04-24 2:09 ` Brad Campbell
2017-04-24 7:34 ` Patrik Dahlström
2017-04-24 11:04 ` Andreas Klauer
2017-04-24 12:13 ` Patrik Dahlström
2017-04-24 12:37 ` Andreas Klauer
2017-04-24 12:54 ` Patrik Dahlström
2017-04-24 13:39 ` Andreas Klauer
2017-04-24 14:05 ` Patrik Dahlström
2017-04-24 14:21 ` Andreas Klauer
2017-04-24 16:00 ` Patrik Dahlström
2017-04-24 23:00 ` Patrik Dahlström
2017-04-25 0:16 ` Andreas Klauer
2017-04-25 8:44 ` Patrik Dahlström
2017-04-25 9:01 ` Andreas Klauer
2017-04-25 10:40 ` Patrik Dahlström
2017-04-25 10:51 ` Patrik Dahlström
2017-04-25 11:08 ` Andreas Klauer
2017-04-25 11:37 ` Patrik Dahlström
2017-04-25 12:41 ` Andreas Klauer
2017-04-25 18:22 ` Wols Lists
2017-04-27 19:57 ` Patrik Dahlström
2017-04-27 23:12 ` Andreas Klauer
2017-04-28 7:11 ` Patrik Dahlström
2017-04-28 9:52 ` Andreas Klauer
2017-04-28 10:31 ` Patrik Dahlström
2017-04-28 11:39 ` Andreas Klauer
2017-04-28 22:46 ` Patrik Dahlström
2017-04-29 9:56 ` Andreas Klauer
2017-05-02 13:08 ` Patrik Dahlström
2017-05-02 13:11 ` Brad Campbell
2017-05-02 15:49 ` Anthony Youngman
2017-04-25 23:01 ` Patrik Dahlström
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=e57038fa-4b27-7d0c-d6c1-e583fecd503f@powerlamerz.org \
--to=risca@powerlamerz.org \
--cc=Andreas.Klauer@metamorpher.de \
--cc=linux-raid@vger.kernel.org \
--cc=lists2009@fnarfbargle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox