[PATCH] Tell lvcreate not to ask us any questions and do its job. (#1057066)
Anne Mulhern
amulhern at redhat.com
Thu Jan 23 22:42:49 UTC 2014
----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Thursday, January 23, 2014 5:27:26 PM
> Subject: Re: [PATCH] Tell lvcreate not to ask us any questions and do its job. (#1057066)
>
> On Thu, 2014-01-23 at 17:10 -0500, Anne Mulhern wrote:
> >
> >
> >
> > ----- Original Message -----
> > > From: "David Lehman" <dlehman at redhat.com>
> > > To: anaconda-patches at lists.fedorahosted.org
> > > Sent: Thursday, January 23, 2014 4:12:04 PM
> > > Subject: [PATCH] Tell lvcreate not to ask us any questions and do its
> > > job. (#1057066)
> > >
> > > Specifically, new functionality prompts the user whether or not they
> > > would like to wipe detected metadata when creating a new lv. This
> > > tells it to go ahead instead of asking.
> > >
> > > This is a global setting for lvcreate, but I think we really do want
> > > to create the new lv in any case, regardless of what lvm might think
> > > we should stop and talk about first.
> > > ---
> > > blivet/devicelibs/lvm.py | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
> > > index 6f4bab2..342b70a 100644
> > > --- a/blivet/devicelibs/lvm.py
> > > +++ b/blivet/devicelibs/lvm.py
> > > @@ -409,7 +409,7 @@ def lvorigin(vg_name, lv_name):
> > > def lvcreate(vg_name, lv_name, size, pvs=[]):
> > > args = ["lvcreate"] + \
> > > ["-L", "%dm" % size.convertTo(spec="mib")] + \
> > > - ["-n", lv_name] + \
> > > + ["-y", "-n", lv_name] + \
> > > _getConfigArgs() + \
> > > [vg_name] + pvs
> > >
> > > --
> > > 1.8.5.3
> > >
> > > _______________________________________________
> > > anaconda-patches mailing list
> > > anaconda-patches at lists.fedorahosted.org
> > > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> > >
> >
> > One tiny thing: Possibly the -y should go on a separate line, otherwise
> > ['-y', '-n'] briefly ends up looking like maybe.
>
> I was a bit irritated at the number of line breaks there already, but it
> would be clearer on its own.
>
> >
> > One major thing: How do you ensure that you're running the newer version of
> > lvcreate which requires this flag, so you don't get
> > a parsing error w/ older versions?
>
> I believe the "yes" argument is accepted by all lvm2 commands.
>
The version of lvcreate I have on my desktop (LVM version: 2.02.98(2) (2012-10-15))
does not seem to like -y at all.
- mulhern
> >
> > - mulhern
> > _______________________________________________
> > anaconda-patches mailing list
> > anaconda-patches at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list