← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~mwhudson/curtin:raid-min-levels into curtin:master

 

Hi Ryan,

> The main reason why curtin wraps and validates various configurations is that
> it's used inside of other frontend installers which have user-facing UIs
> in which not all users will grok what exactly is going wrong.
> 
> The other goal is to catch as many errors in configuration without actually
> having to boot and run this. MAAS, for example, uses curtin in bare-metal
> deployments where some of the hardware may take quite some time (many
> minutes) to power-cycle, boot, start the install only to find out it
> failed due to misconfiguration.
> 
> With the configuration language and our storage schema MAAS and Subiquity
> can validate the configuration before starting an install.
OK, understood.

> > Still, I would propose to handle this in a subsequent PR to not intermix a
> > "bugfix" with new feature. 
> That's fine; it can be implemented separately.
Is it OK to merge this small fix, then?

> This is a good point. Yes you're correct it would create the degraded array.
> If curtin is going to allow someone to create a two-disk RAID5 which can use
> --grow; why wouldn't we support a 3-disk raid5 created degraded so user can
> add a hotspare later to recover it?
Of course I do not want to hold someone back doing strange things,
but here it should be clearly documented that this potentially leads to RAIDs without redundancy.

> > > And the RAID10 array with specific layout could be
> > >
> > > - type: raid
> > >   level: 10
> > >   raid_devices: 2
> > >   devices:
> > >     - /dev/sda
> > >     - /dev/sdb
> > >   layout: f2
> > Same here, raid_devices would be unnecessary unless you want to support it.
> 
> raid_devices is required if we are to allow independent control over the
> value of --raid-devices and telling mdadm how many drives to expect.
One downside of this raid_devices entry would be that it is easy to create non-rudundant RAIDs by accident when copying installation templates.
Even though I would be fine with this, you could also make this more explicit/visible by introducing the "missing" keyword, e.g.:
- type: raid
  level: 5
  raid_devices: 3
  devices:
    - /dev/sda
    - /dev/sdb
would be:
- type: raid
  level: 5
  devices:
    - /dev/sda
    - /dev/sdb
    - missing

BR
-- 
https://code.launchpad.net/~mwhudson/curtin/+git/curtin/+merge/400931
Your team curtin developers is requested to review the proposed merge of ~mwhudson/curtin:raid-min-levels into curtin:master.


References