Thread (17 messages) 17 messages, 3 authors, 2014-03-01

Re: [md PATCH 01/10] md: allow a reshape operation to be reversed.

From: Roman Mamedov <hidden>
Date: 2012-10-01 09:11:28

On Tue, 03 Apr 2012 15:53:01 +1000
NeilBrown [off-list ref] wrote:
Currently a reshape operation always progresses from the start
of the array to the end unless the number of devices is being
reduced, in which case it progressed in the opposite direction.

To reverse a partial reshape which changes the number of devices
you can stop the array and re-assemble with the raid-disks numbers
reversed and it will undo.

However for a reshape that does not change the number of devices
it is not possible to reverse the reshape in the middle - you have to
wait until it completes.

So add a 'reshape_direction' attribute with is either 'forwards' or
'backwards' and can be explicitly set when delta_disks is zero.

This will become more important when we allow the data_offset to
change in a reshape.  Then the explicit statement of what direction is
being used will be more useful.

This can be enabled in raid5 trivially as it already supports
reverse reshape and just needs to use a different trigger to request it.
Hello,

Is it possible to use this to cancel a RAID5 reshape that is reducing the
number of devices?

I understand that reshape goes backwards by design in this case, so I need to
switch it to "forwards".

I stopped the reshaping array and then started it with "mdadm --assemble
--freeze-reshape" and listing the backup file and all the devices on the command line.

But even then:

# echo forwards > /sys/block/md0/md/reshape_direction 
-bash: echo: write error: Device or resource busy

-- 
With respect,
Roman

~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Stallman had a printer,
with code he could not see.
So he began to tinker,
and set the software free."

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help