linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Ram Ramesh <rramesh2400@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: How to use --freeze-reshape  and is it safe?
Date: Thu, 14 Aug 2014 15:56:33 +1000	[thread overview]
Message-ID: <20140814155633.567baece@notabene.brown> (raw)
In-Reply-To: <53EC4B63.90703@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

On Thu, 14 Aug 2014 00:38:43 -0500 Ram Ramesh <rramesh2400@gmail.com> wrote:

> I was browsing through mdadm man pages to check out --layout options 
> when converting 3disk-raid5 to 4disk-raid6 and encountered 
> --freeze-reshape switch/arg. I did a quick google and could not get much 
> info. Can a user issue this to suspend reshape for a short while? 

As --freeze-reshape is only meaningful in combination with --assemble,
this question doesn't really make sense.

If you are using a sufficiently new kernel and mdadm so that "data_offset" is
adjusted during reshapes so that no 'backup' is needed, then you can
suspend a reshape for a period of time by:

  echo frozen > /sys/block/mdXXX/md/sync_action

This is perfectly safe.  When you want to unfreeze, write 'idle'
to 'sync_action'.  md will notice that a reshape is pending and will restart
where it was up to.


> Specifically
> 
>  1. Is the use (or frequent use) of this switch safe? recommended?
>  2. Can the array be mounted when this switch is used?
>  3. What is correct syntax for the usage?
>  4. Can I use this to manage the reshape load on an array? May be to let
>     the disk cool off after a busy hours of seeking to reshape?
>  5. Can I use it as a safe method for shutting down  the machine?
>  6. Is there a tutorial/faq/manual that explains in detail the use of
>     other mdadm esoteric switches? (like --layout I was searching)

Is it really that esoteric?
If you want to reshape an array, you run "mdadm --grow" and list all the
changes you want to make.  Set a new level, a new number of devices, a new
layout, a new chunk size, whatever.  mdadm will do it if it can and give an
error if it cannot.
If you want to test it out first then that is extremely sensible.  Make some
loop devices and experiment.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2014-08-14  5:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14  5:38 How to use --freeze-reshape and is it safe? Ram Ramesh
2014-08-14  5:56 ` NeilBrown [this message]
2014-08-14  6:25   ` Ram Ramesh
2014-08-14  7:30     ` NeilBrown
2014-08-14 15:59       ` Ram Ramesh
2014-08-14 13:51   ` Ethan Wilson

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=20140814155633.567baece@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=rramesh2400@gmail.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;
as well as URLs for NNTP newsgroup(s).