Re: mdadm: Patch to restrict --size when shrinking unless forced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> 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.
>>>

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux