All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH v3 01/18] fsadm: Add new commands create, list, add and remove
Date: Wed, 05 Oct 2011 11:06:10 +0200	[thread overview]
Message-ID: <4E8C1E02.9090308@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1110050932530.4423@dhcp-27-109.brq.redhat.com>

Dne 5.10.2011 10:02, Lukas Czerner napsal(a):
> On Tue, 4 Oct 2011, Zdenek Kabelac wrote:
>
>> Dne 4.10.2011 14:13, Lukas Czerner napsal(a):
>>> On Tue, 4 Oct 2011, Zdenek Kabelac wrote:
>>>


>>>> Well user is always the master - if he is brave to go without it, let him
>>>> do
>>>> what he wants (i.e. destroy his fs).
>>>
>>> You're missing the point, resize2fs requires that the file system is
>>> checked with e2fsck -f prior the resize, if on of the conditions happen
>>>
>>> 1. file system was not cleanly umounted
>>> 2. file system contain errors, or is invalid
>>> 3. it was not checked since the last time it was mounted
>>>
>>> It is just to make sure that the file system is consistent and we will
>>> not make everything worse by messing with metadata further.
>>>
>>
>> If the user wants to risk  resize2fs without fsck - it's his decision (and
>> current -f with fsadm allows it) - and since we are not like gnome3 - we allow
>> users to kill their systems in number of ways already, so no reason to
>> eliminate this one.
>
> Well, this is just wrong in so many ways. Running fsck.ext4 -f to force
> the full check is not the same as skipping the fsck before resize in the
> tool which is suppose to do-it-all. We have to pick the safe way here.
>

Tool is not meant to be used only in a 'safe' way - tool is supposed to fully 
usable even various force scenarios - i.e. when fsck support options '-y' we 
should be able to use - even if some extX developers think it's very 
dangerous option and should never ever be used - it's there and it has its 
use. (I've used it already many times, and nothing unexpectedly bad happened).

What we could do here better is to draw some state diagram and eventually add 
few more options - but we will not strip down the usefulness of fsadm only for 
clean filesystem and leave the user  to run  fsck -y on its - as we can do 
that for him.


>>
>> i.e. mkfs, mount, umount, resize LV, resize2fs -f   works without fsck and
>> makes errorless result - so we support.
>
> Also it makes me think that you do not really see what is in the code.
> There is nothing about about 'force', fsck is done anyway (in the old
> code - your code) in the case that
>
> [ "$NEWBLOCKCOUNT" -lt "$BLOCKCOUNT" -o "$EXTOFF" -eq 1 ]
>
> and
>
> if test -n "$MOUNTED"
>
> so please, read before you write.

man lvresize  --nofsck


> Also your arguments are out of the line. There are different levels of
> granularity of force, and if user force things he does not expect things
> will be done in wrong way. That said, when I use force I do not want to
> be asked about stupid questions, but I certaily do not want fsck before
> resize2fs to be skipped.

We already allow that - since there are situation you may need to use it.

> You just have to understand that we are using multiple tools in fsadm
> and just passing force to all of them would be incredibly stupid, even
> if you properly document it.

Certainly personal opinion.

As already said - provide state diagram and suggest more options
(in lvm we use  -ff for some situations -  so maybe more levels of force)

But we need to support what we already can do with fsadm tool.

If the user puts --force anywhere on the command line - he surely needs to 
expect, that some things may cause damage.

> his 'force' and what consequences will that have. We just HAVE to pick
> the most logical and most safe way of doing things. But your way of

There is no 'safe' way with --force - that's the purpose of force.
However there could be multiple force levels.

Zdenek



  reply	other threads:[~2011-10-05  9:06 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 13:42 [RFC][PATCH v3 00/16] fsadm update Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 01/18] fsadm: Add new commands create, list, add and remove Lukas Czerner
2011-10-04  9:41   ` Zdenek Kabelac
2011-10-04 12:13     ` Lukas Czerner
2011-10-04 17:09       ` Zdenek Kabelac
2011-10-05  8:02         ` Lukas Czerner
2011-10-05  9:06           ` Zdenek Kabelac [this message]
2011-10-05  9:46             ` Lukas Czerner
2011-10-05 10:27               ` Alasdair G Kergon
2011-10-05 11:21                 ` Lukas Czerner
2011-10-05 11:26                   ` Lukas Czerner
2011-10-05 11:28                   ` Ric Wheeler
2011-10-05 11:49                   ` Alasdair G Kergon
2011-10-05 12:15                     ` Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 02/18] fsadm: Make all internal math in kilobytes Lukas Czerner
2011-09-27 15:41   ` Zdenek Kabelac
2011-10-03 16:13     ` Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 03/18] fsadm: Add simple configuration file Lukas Czerner
2011-09-27 15:39   ` Zdenek Kabelac
2011-10-03 16:44     ` Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 04/18] fsadm: Use DEFAULT_DEVICE_POOL when creating volume group Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 05/18] fsadm: Add LVOL_PREFIX configuration option Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 06/18] fsadm: Fsck extN before resize only if it is not mounted Lukas Czerner
2011-10-04  8:09   ` Zdenek Kabelac
2011-09-27 13:42 ` [PATCH v3 07/18] fsadm: Only use readlink if link is provided Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 08/18] fsadm: Remove unnecessary modification of PATH variable Lukas Czerner
2011-10-04  8:12   ` Zdenek Kabelac
2011-10-04  8:17     ` Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 09/18] fsadm: Allow to specify lv in vg/lv format Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 10/18] fsadm: Umount ext2 file system prior resize Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 11/18] fsadm: Add help for new commands and update man page Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 12/18] lvresize: Specify --resize-fs-only when going to use fsadm resize Lukas Czerner
2011-09-27 15:44   ` Zdenek Kabelac
2011-10-03 16:20     ` Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 13/18] fsadm: remove -y (YES) option Lukas Czerner
2011-09-27 15:38   ` Zdenek Kabelac
2011-10-03 16:39     ` Lukas Czerner
2011-10-03 18:18       ` Zdenek Kabelac
2011-10-04  6:29         ` Lukas Czerner
2011-10-04  8:07           ` Zdenek Kabelac
2011-09-27 13:42 ` [PATCH v3 14/18] test: add helper to compute aligned lv size Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 15/18] test: Add test for fsadm add command Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 16/18] test: Add test for fsadm create command Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 17/18] test: Add test for fsadm resize command Lukas Czerner
2011-09-27 13:42 ` [PATCH v3 18/18] test: Add test for fsadm remove command Lukas Czerner
2011-09-27 13:50 ` [RFC][PATCH v3 00/16] fsadm update Lukas Czerner

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=4E8C1E02.9090308@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.