All of lore.kernel.org
 help / color / mirror / Atom feed
From: "TheGerwazy ." <gerardlesiuk@gmail.com>
To: Phil Turmel <philip@turmel.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Mdadm with data offsets
Date: Tue, 15 Dec 2015 12:30:03 +0100	[thread overview]
Message-ID: <CAH_hVdqMdrPTAz1LcDzZNDMdGKFOpwo32mh0E+mFZtcCBEBqJg@mail.gmail.com> (raw)
In-Reply-To: <566EBC38.7060205@turmel.org>

2015-12-14 13:55 GMT+01:00 Phil Turmel <philip@turmel.org>:
> On 12/14/2015 07:03 AM, TheGerwazy . wrote:
>
>> Hi  Phil
>> Thanks for the message .... but,
>> In the last version of mdadm I get:
>>
>> ./mdadm --create --raid-devices=8 --level=6 --assume-clean /dev/md7
>> /dev/mapper/ovsdb1:1024 /dev/mapper/ovsdc1:4096
>> /dev/mapper/ovsdd1:1024 /dev/mapper/ovsde1:1024
>> /dev/mapper/ovsdf1:1024 /dev/mapper/ovsdg1:1024
>> /dev/mapper/ovsdh1:1024 /dev/mapper/ovsdi1:4096
>> mdadm: cannot open /dev/mapper/ovsdb1:1024: No such file or directory
>
> The final version of that feature requires --data-offset=variable before
> the :offset syntax is recognized on the devices.
>
>> sudo ./mdadm --create --raid-devices=8 --level=6 --assume-clean
>
>> mdadm: array /dev/md7 started.
>
> You're committed now.  I hope it works out for you.
>
>> BTW is it possible to find right data offset without superblock on drive ?
>
> Only if the content of that member device has searchable content in a
> predictable location.  In practice that means finding the offset of the
> first member by locating filesystem magic, or otherwise locating the
> transition from all zeros to randomish data.
>
> Good luck.
>
> Phil
>

"Good Luck" seems to be working ... ;)

I finally recovered files with magic cmd:

sudo ./mdadm --create --raid-device=8 --level=6 --assume-clean
--size=974508544 /dev/md7 /dev/mapper/ovsde2:1024
/dev/mapper/ovsdh1:100352 /dev/mapper/ovsdg1:100352
/dev/mapper/ovsdc1:131072 /dev/mapper/ovsda1:1024
/dev/mapper/ovsdb1:1024 /dev/mapper/ovsdf1:131072
/dev/mapper/ovsdd1:100352


The main problem is the data offsets are not stored elsewhere than in
superblock. I have some drives from debian 6.0.5 and some were changed
in debian 7.5. In 6.0.5 default data offset was at 2048 sector while
int 7.5 it is 262144.

But - when add new drive to existing array and partition (or drive) is
smaller than 262144 plus array data (array device size) when mdadm
calculates something between 2048 and 262144. -> so as above magic
cmd's in my case it was 200704 sector.

I recovered it by doing all steps regarding mdadm in virtual
enviroment and I am surprised by the non standard data offsets.

Thanks for Phil

regards
Gerard

  reply	other threads:[~2015-12-15 11:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  6:18 Mdadm with data offsets TheGerwazy .
2015-12-13 23:50 ` Phil Turmel
2015-12-13 23:56   ` Phil Turmel
2015-12-14 12:03     ` TheGerwazy .
2015-12-14 12:55       ` Phil Turmel
2015-12-15 11:30         ` TheGerwazy . [this message]
2015-12-15 13:44           ` Phil Turmel
2015-12-15 14:11             ` TheGerwazy .

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=CAH_hVdqMdrPTAz1LcDzZNDMdGKFOpwo32mh0E+mFZtcCBEBqJg@mail.gmail.com \
    --to=gerardlesiuk@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=philip@turmel.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.