All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: RAID: Allow implicit stripe (and parity) when creating RAID LVs
Date: Tue, 11 Feb 2014 11:25:07 +0100	[thread overview]
Message-ID: <52F9FA83.3060300@redhat.com> (raw)
In-Reply-To: <1392074848.17667.3.camel@f16>

Dne 11.2.2014 00:27, Jonathan Brassow napsal(a):
> There are typically 2 functions for the more advanced segment types that
> deal with parameters in lvcreate.c: _get_*_params() and _check_*_params().
> (Not all segment types name their functions according to this scheme.)
> The former function is responsible for reading parameters before the VG
> has been read.  The latter is for sanity checking and possibly setting
> parameters after the VG has been read.
>
> This patch adds a _check_raid_parameters() function that will determine
> if the user has specified 'stripe' or 'mirror' parameters.  If not, the
> proper number is computed from the list of PVs the user has supplied or
> the number that are available in the VG.  Now that _check_raid_parameters()
> is available, we move the check for proper number of stripes from
> _get_* to _check_*.
>
> This gives the user the ability to create RAID LVs as follows:
> # 5-device RAID5, 4-data, 1-parity (i.e. implicit '-i 4')
> ~> lvcreate --type raid5 -L 100G -n lv vg /dev/sd[abcde]1
>
> # 5-device RAID6, 3-data, 2-parity (i.e. implicit '-i 3')
> ~> lvcreate --type raid6 -L 100G -n lv vg /dev/sd[abcde]1
>
> # If 5 PVs in VG, 5-device RAID5
> ~> lvcreate --type raid5 -L 100G -n lv vg
>

I guess you can't change the stable command line API - since you would break
all existing scripts.

What you could probably do is to add new  command line option like i.e.:

--bestfit

or something similar with this meaning.

Zdenek



      reply	other threads:[~2014-02-11 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 23:27 RAID: Allow implicit stripe (and parity) when creating RAID LVs Jonathan Brassow
2014-02-11 10:25 ` Zdenek Kabelac [this message]

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=52F9FA83.3060300@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.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.