[lvm-devel] [PATCH] lvcreate: support --force option

Lidong Zhong lzhong at suse.com
Mon Oct 26 10:07:18 UTC 2015


Hi Zdenek,

>>> On 10/12/2015 at 05:02 PM, in message <561B7728.5010804 at redhat.com>, Zdenek
Kabelac <zkabelac at redhat.com> wrote: 
> Dne 12.10.2015 v 04:26 Lidong Zhong napsal(a): 
> > Hi Zdenek, 
> > 
> > Thanks for your reply. 
> > 
> >>>> On 10/10/2015 at 09:17 PM, in message <56190FE5.1030900 at redhat.com>, Zdenek 
> > Kabelac <zkabelac at redhat.com> wrote: 
> >> Dne 10.10.2015 v 12:39 Lidong Zhong napsal(a): 
> >>> The option is supported in the logic of lvcreate but is omitted in 
> >>> commands.h. 
> >>> 
> >> 
> >> Nope - it's not intended to be unsupported so far. 
> >> 
> >> We do support --yes  to overcome prompts. 
> >> 
> >> Normally --force is meant to be used on paths to proceed with 
> >> i.e. lvremove, lvconvert 
> >> 
> >> Do you have any case in mind where '--force' with lvcreate would have make  
> any 
> >> 
> >> sense ? 
> > 
> > Not really. I met this problem when I was using lvcreate with the  
> --wipesignature option. 

If we set the --wipesignature to y while creating an lv, there will be a prompt for confirming 
in current code. Doesn't it make more sense that there shouldn't be the prompt? since we
definitely want to remove the signature by setting this option.
Some options such as "--zero=y" don't give prompt, why it is different? 
Please give your opinion.

Regards,
Lidong

> > --yes works for me. But I also found that --force should also work when I read  
> the source. 
> > However, it reports -f/--force is an invalid option for lvcreate. 
>  
> Yep - and so far it should stay that way -  --force has special meaning for  
> being quite unsafe operation. 
>  
> > 
> >> IMHO creating something with --force looks to me like crazy idea to start  
> with 
> >> 
> >> - but maybe there is some use-case I'm missing ? 
> >> 
> > 
> > Currently there is no introduction to --yes in the manpage of lvcreate. How  
> about adding it to 
> > the manpage? 
>  
> Every lvm man page references 'man lvm' as the source of description for all  
>  
> 'commonly' accepted options (like --yes). 
>  
> One day we may switch to 'generated' man pages - where very man page would  
> have all options described - but I guess this 'day' is still pretty far away  
> ;) 
>  
> Regards 
>  
> Zdenek 
>  
>  
> -- 
> lvm-devel mailing list 
> lvm-devel at redhat.com 
> https://www.redhat.com/mailman/listinfo/lvm-devel 
>  
>  






More information about the lvm-devel mailing list