All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: John Stoffel <john@stoffel.org>, NeilBrown <neilb@suse.com>
Cc: Eli Ben-Shoshan <eli@benshoshan.com>,
	Jes.Sorensen@gmail.com, linux-raid@vger.kernel.org
Subject: Re: mdadm: Patch to restrict --size when shrinking unless forced
Date: Sat, 7 Oct 2017 23:06:53 +0100	[thread overview]
Message-ID: <59D94FFD.9060404@youngman.org.uk> (raw)
In-Reply-To: <F48A217B-C892-4EA7-8451-6056BE92AD02@stoffel.org>

On 05/10/17 02:26, John Stoffel wrote:
> It's trivial to revert if you know the starting size!  And I would argue that the --size option is misnamed, since is is a per-component resize.  
> 
> In any case, would it be better to print a message which said something like: array md## devices resized from <orig> to <new size>
> 
I think a message like "You are setting array space available to less
than array space used. Use --force if you really want to do this".

> When the user does this?  But again, I think the --force option is good to have when reducing the size of component devices, sine I would hope the message gives people a pause and hopefully makes them think.
> 
I'm with Neil in that you should never have to use force if you're doing
something sensible. As soon as mdadm says "you need to use --force" it
should be a warning that something is amiss. So only require it if the
array needs the space that you're reducing away. If you're using 6TB
with 3 x 3TB drives, then reducing component size to 2.1TB shouldn't
trigger a warning ...

> So I really don't think we're holding people back, we're educating them with this warning.  
> 
Good idea - I just think that the message as you've phrased it isn't
that educative, sorry.

Looking at your current message, it sounds like you're comparing current
array usage with future array size so that's right - you just need a
warning that sends a clear "you are about to shoot yourself in the foot"
message, not just a "use --force to suppress this warning".

Cheers,
Wol

> Sent from my iPhone
> 
>> On Oct 4, 2017, at 5:50 PM, NeilBrown <neilb@suse.com> wrote:
>>
>>> On Wed, Oct 04 2017, John Stoffel wrote:
>>>
>>> Since Eli had such a horrible experience where he shrunk the
>>> individual component raid device size, instead of growing the overall
>>> raid by adding a device, I came up with this hacky patch to warn you
>>> when you are about to shoot yourself in the foot.
>>>


  reply	other threads:[~2017-10-07 22:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 18:00 mdadm: Patch to restrict --size when shrinking unless forced John Stoffel
2017-10-04 18:11 ` Jes Sorensen
2017-10-04 19:15   ` John Stoffel
2017-10-04 19:23     ` Jes Sorensen
2017-10-04 19:33       ` John Stoffel
2017-10-04 21:50 ` NeilBrown
2017-10-05  1:26   ` John Stoffel
2017-10-07 22:06     ` Wols Lists [this message]
2017-10-07 22:17       ` John Stoffel
2017-10-07 22:37         ` Wols Lists
2017-10-07 22:46           ` John Stoffel
2017-10-08 20:57   ` John Stoffel
2017-10-08 22:52     ` NeilBrown
2017-10-09  1:18       ` John Stoffel
2017-10-09  1:36         ` NeilBrown
2017-10-09  1:22       ` John Stoffel
2017-10-09  4:10         ` NeilBrown
2017-10-09 20:04           ` Phil Turmel
2017-10-10  0:07             ` Wakko Warner
2017-10-10 13:12               ` Phil Turmel
2017-10-10 20:52               ` NeilBrown
2017-10-10 20:55                 ` Wakko Warner
2017-10-10  2:01             ` John Stoffel
2017-10-10 20:09             ` Jes Sorensen
2017-10-10 20:54               ` Wols Lists
2017-10-10 21:07                 ` Jes Sorensen
2017-10-10 20:48             ` NeilBrown
2017-10-10 20:58               ` Phil Turmel

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=59D94FFD.9060404@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=Jes.Sorensen@gmail.com \
    --cc=eli@benshoshan.com \
    --cc=john@stoffel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.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 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.