From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] lvcreate: support --force option
Date: Mon, 26 Oct 2015 14:42:24 +0100 [thread overview]
Message-ID: <562E2DC0.1020002@redhat.com> (raw)
In-Reply-To: <562E6BD6020000E10001F71D@relay2.provo.novell.com>
Dne 26.10.2015 v 11:07 Lidong Zhong napsal(a):
> Hi Zdenek,
>
>>>> On 10/12/2015 at 05:02 PM, in message <561B7728.5010804@redhat.com>, Zdenek
> Kabelac <zkabelac@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@redhat.com>, Zdenek
>>> Kabelac <zkabelac@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.
>
Hi
Here is explanation.
'zero' is unconditional and does not detect any signature - so it has nothing
to prompt about - it zeroes first 4K as that's what user asked for.
New 'wipesignature' first detects signature and asks if you want to wipe.
That's the API (and it's very similar to e.g. mkfs)
If lvm2 knows its overwriting something it prompts - that's the rule.
If you are going to take a 'risk' for no prompting - use '--yes'
lvm2 is possibly missing couple prompts - so you could possibly open BZ for
the case we convert/overwrite something without prompting first.
But existing prompts will remain as they are as they are correct.
Regards
Zdenek
next prev parent reply other threads:[~2015-10-26 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 10:39 [PATCH] lvcreate: support --force option Lidong Zhong
2015-10-10 13:17 ` Zdenek Kabelac
2015-10-12 2:26 ` Lidong Zhong
2015-10-12 9:02 ` Zdenek Kabelac
2015-10-26 10:07 ` Lidong Zhong
2015-10-26 13:42 ` Zdenek Kabelac [this message]
2015-10-27 2:29 ` Lidong Zhong
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=562E2DC0.1020002@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.