From: Veljko <veljko3@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Re: Linear device of two arrays
Date: Fri, 14 Jul 2017 15:40:40 +0200 [thread overview]
Message-ID: <1eefd627-1aba-a795-05f0-d2106d3a62a3@gmail.com> (raw)
In-Reply-To: <87o9sn232n.fsf@notabene.neil.brown.name>
On 07/14/2017 03:57 AM, NeilBrown wrote:
>
> Presumably you also have an md3 raid10 which you want to attach to the
> end of md2?
Yes, I just created it. It's resyncing.
> md2 is 5761631232 sectors.
> 2880815616 kilobytes
> 2813296.5 (binary)megabytes.
>
> When you include that into a "linear" you will lose a few K from the
> end.
> It might be sensible to cause the "linear" to use whole stripes from
> the raid10, where a stripe is 1M (2 512K chunks).
> If you did that, you would lose a little over 1M.
> So backup the last 3.5 M of the raid10. This is much more than you need.
>
> ie.
>
> dd if=/dev/md2 of=SOMEWHERE/SAFE bs=1M skip=2813293
I'm little confused. What I'm backuping is last 3.5M of used space,
right? How is that only ~2.7T? df shows 4.8T of used space.
Rest of the instructions are clear and I'll try it as soon as md3 is
synced.
Thanks Neil!
> (dd treats 'M' as 1024*1024, MB is 1000*1000)
>
> If the file this creates is not 3.5M, then something went wrong. Stop
> here.
>
> Just to be safe you might want to backup the first few megabytes. You
> won't need this unless something goes wrong
> dd if=/dev/md2 of=SOMEWHERE/ELSE bs=1M count=10
>
> Now create the linear from /dev/md2 and /dev/md3(?). Be sure to use
> "-e 1.0 --data-offset=0". This creates /dev/md4
>
> Now restore the first backup
>
> dd if=SOMEWHERE/SAFE of=/dev/md4 bs=1M seek=2813293
>
> Be sure to use the same bs= and seek= as you did the first time.
> Be sure it is copying from the back and to the new linear raid.
>
> You should now be done. Check your xfs filesystem, and maybe even mount
> it and use it.
>
> NeilBrown
>
>>
>> # mdadm --detail /dev/md2
>> /dev/md2:
>> Version : 1.2
>> Creation Time : Fri Sep 14 12:40:13 2012
>> Raid Level : raid10
>> Array Size : 5761631232 (5494.72 GiB 5899.91 GB)
>> Used Dev Size : 2880815616 (2747.36 GiB 2949.96 GB)
>> Raid Devices : 4
>> Total Devices : 4
>> Persistence : Superblock is persistent
>>
>> Update Time : Mon Jul 10 12:32:51 2017
>> State : clean
>> Active Devices : 4
>> Working Devices : 4
>> Failed Devices : 0
>> Spare Devices : 0
>>
>> Layout : near=2
>> Chunk Size : 512K
>>
next prev parent reply other threads:[~2017-07-14 13:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 15:34 Linear device of two arrays Veljko
2017-07-05 16:42 ` Roman Mamedov
2017-07-05 18:07 ` Wols Lists
2017-07-07 11:07 ` Nix
2017-07-07 20:26 ` Veljko
2017-07-07 21:20 ` Andreas Klauer
2017-07-07 21:53 ` Roman Mamedov
2017-07-07 22:20 ` Andreas Klauer
2017-07-07 22:33 ` Andreas Klauer
2017-07-07 22:52 ` Stan Hoeppner
2017-07-08 10:26 ` Veljko
2017-07-08 21:24 ` Stan Hoeppner
2017-07-09 22:37 ` NeilBrown
2017-07-10 11:03 ` Veljko
2017-07-12 10:21 ` Veljko
2017-07-14 2:03 ` NeilBrown
2017-07-14 1:57 ` NeilBrown
2017-07-14 2:05 ` NeilBrown
2017-07-14 13:40 ` Veljko [this message]
2017-07-15 0:12 ` NeilBrown
2017-07-17 10:16 ` Veljko
2017-07-18 8:58 ` Veljko
2017-07-20 21:40 ` Veljko
2017-07-20 22:00 ` NeilBrown
2017-07-21 9:15 ` Veljko
2017-07-21 11:37 ` Veljko
2017-07-22 23:03 ` NeilBrown
2017-07-23 10:05 ` Veljko
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=1eefd627-1aba-a795-05f0-d2106d3a62a3@gmail.com \
--to=veljko3@gmail.com \
--cc=linux-raid@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).