* Will mdadm make a backup if it takes two steps to covert raid5 to raid6?
@ 2017-12-13 3:38 Amy Chiang
0 siblings, 0 replies; 3+ messages in thread
From: Amy Chiang @ 2017-12-13 3:38 UTC (permalink / raw)
To: linux-kernel
Hi,
I was trying to grow my raid5 array to raid6 with one more disk. And I
was wondering about when would the backup take place and when would
the backup file is required (or not required).
And I found this thread "Re: Backup file size when migrating from
raid5 to raid6?"
two steps were mentioned in the thread to reduce the time of level changing.
so I followed the steps,
currently there were 3 disks in my array.
$ mdadm --grow /dev/md0 --level=6 --layout=preserve
mdadm: Need 1 spare to avoid degraded array, and only have 0.
Use --force to over-ride this check.
$ mdadm --grow /dev/md0 --level=6 --layout=preserve --force
mdadm: level of /dev/md119 changed to raid6
the array became raid6 and the state is clean, degraded and nothing
more happened, I thought it would create Q in this step, but there
were no writing from iostat.
so I added one disk
$ mdadm --grow /dev/md0 --raid-devices=4 --layout=normalise
State : clean, degraded, reshaping
but from previous post in this thread, I thought the backup file is a
must under this circumstance, and according to the throughput of those
disks (not slow), there seemed no backup was happening.
my question is,
1. "mdadm --grow /dev/md0 --level=6 --layout=preserve" will this
command create Q even though it degrades the array?
2. Is backup happening in second step (reshaping)? if it's happening,
why don't I need a backup file?
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Will mdadm make a backup if it takes two steps to covert raid5 to raid6?
@ 2017-12-13 3:57 Amy Chiang
2017-12-13 13:54 ` Wols Lists
0 siblings, 1 reply; 3+ messages in thread
From: Amy Chiang @ 2017-12-13 3:57 UTC (permalink / raw)
To: linux-raid
Hi,
I was trying to grow my raid5 array to raid6 with one more disk. And I
was wondering about when would the backup take place and when would
the backup file is required (or not required).
And I found this thread "Re: Backup file size when migrating from
raid5 to raid6?"
two steps were mentioned in the thread to reduce the time of level changing.
so I followed the steps,
currently there were 3 disks in my array.
$ mdadm --grow /dev/md0 --level=6 --layout=preserve
mdadm: Need 1 spare to avoid degraded array, and only have 0.
Use --force to over-ride this check.
$ mdadm --grow /dev/md0 --level=6 --layout=preserve --force
mdadm: level of /dev/md119 changed to raid6
the array became raid6 and the state is clean, degraded and nothing
more happened, I thought it would create Q in this step, but there
were no writing from iostat.
so I added one disk
$ mdadm --grow /dev/md0 --raid-devices=4 --layout=normalise
State : clean, degraded, reshaping
but from previous post in this thread, I thought the backup file is a
must under this circumstance, and according to the throughput of those
disks (not slow), there seemed no backup was happening.
my question is,
1. "mdadm --grow /dev/md0 --level=6 --layout=preserve" will this
command create Q even though it degrades the array?
2. Is backup happening in second step (reshaping)? if it's happening,
why don't I need a backup file?
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Will mdadm make a backup if it takes two steps to covert raid5 to raid6?
2017-12-13 3:57 Will mdadm make a backup if it takes two steps to covert raid5 to raid6? Amy Chiang
@ 2017-12-13 13:54 ` Wols Lists
0 siblings, 0 replies; 3+ messages in thread
From: Wols Lists @ 2017-12-13 13:54 UTC (permalink / raw)
To: Amy Chiang, linux-raid
On 13/12/17 03:57, Amy Chiang wrote:
> my question is,
> 1. "mdadm --grow /dev/md0 --level=6 --layout=preserve" will this
> command create Q even though it degrades the array?
> 2. Is backup happening in second step (reshaping)? if it's happening,
> why don't I need a backup file?
mdadm normally does not need a backup file. I don't know what
--layout=preserve is doing, but the reshape always happens as an
independent step, even if everything is specified at once.
If the space is available (and mdadm by default always reserves spare
space if it is given enough - I think a 2GB array will trigger a reserve
allocation) a reshape always starts writing in the reserved space. It
will lock and read stripe 1, and write it to reserved space. It will
then lock and read stripe 2, stripe 3 etc until it runs out of reserved
space. It will then use a window to make the new stripes active, unlock
them, and then reserve the space those stripes used to occupy for the
next bit of the reshape.
So, at all times, the bit of the array being reshaped is locked and has
multiple copies, and there's a window setting telling the management
layer where to find the active bits of the array.
Backup files are prone to cause trouble for novices, and this means they
are not necessary. Great news.
Cheers,
Wol
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-13 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 3:57 Will mdadm make a backup if it takes two steps to covert raid5 to raid6? Amy Chiang
2017-12-13 13:54 ` Wols Lists
-- strict thread matches above, loose matches on Subject: below --
2017-12-13 3:38 Amy Chiang
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.