Bug 684178

Summary: lvresize (from lvm tools) ask for confirmation and ignore
Product: [openSUSE] openSUSE 11.3 Reporter: Diego Ercolani <diego.ercolani>
Component: BasesystemAssignee: Dong Mao Zhang <dmzhang>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Diego Ercolani 2011-03-31 15:14:46 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.0) Gecko/20100101 Firefox/4.0

this is lvm2-2.02.67-4.1.1.x86_64 version.

I issued the lvresize command to add 5GB on a mounted ext4 filesystem. As you see from the log included, lvresize ask for confirmation telling that procedure WILL damage the filesystem. I answered "no" and the procedure have been done so.... fortunately no damage but why asking if you do the job?




lvresize -r -L +5G /dev/nonraid/dati-ntop
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/mapper/nonraid-dati--ntop is mounted.  

WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.

Do you really want to continue (y/n)? no

check aborted.
  Extending logical volume dati-ntop to 30.00 GiB
  Logical volume dati-ntop successfully resized
resize2fs 1.41.11 (14-Mar-2010)
Filesystem at /dev/dm-5 is mounted on /var/lib/ntop; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 2
Performing an on-line resize of /dev/dm-5 to 7864320 (4k) blocks.
The filesystem on /dev/dm-5 is now 7864320 blocks long.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 2 Xin Wei Hu 2011-05-13 07:38:55 UTC
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.0) Gecko/20100101
> Firefox/4.0
> 
> this is lvm2-2.02.67-4.1.1.x86_64 version.
> 
> I issued the lvresize command to add 5GB on a mounted ext4 filesystem. As you
> see from the log included, lvresize ask for confirmation telling that procedure
> WILL damage the filesystem. I answered "no" and the procedure have been done
> so.... fortunately no damage but why asking if you do the job?
> 
> 
> 
> 
> lvresize -r -L +5G /dev/nonraid/dati-ntop
> fsck from util-linux-ng 2.17.2
> e2fsck 1.41.11 (14-Mar-2010)
> /dev/mapper/nonraid-dati--ntop is mounted.  
> 
> WARNING!!!  The filesystem is mounted.   If you continue you ***WILL***
> cause ***SEVERE*** filesystem damage.
> 
> Do you really want to continue (y/n)? no
> 
> check aborted.
The warning above is from e2fsck I think.
So nothing related to lvresize ;)

Would you confirm that?
Comment 3 Diego Ercolani 2011-05-13 08:02:45 UTC
Uhm... I don't know without reissuing the command but e2fsresize doesn't complain (as far I know) about resizeing a mounted extfs4.

The question is that I answered "no" and the utility ignored my answer... so why that utility is asking if it doesn't read my asnwer?
Comment 4 Xin Wei Hu 2011-05-13 08:16:51 UTC
(In reply to comment #3)

> The question is that I answered "no" and the utility ignored my answer... so
> why that utility is asking if it doesn't read my asnwer?

lvresize tries to call fsck before actually resizing.
I think it's e2fsck who WARN you at that time.

And your answer was taking care of, because the fsck step was skipped then.

lvresize continued without fsck.
Comment 5 Diego Ercolani 2011-05-13 08:45:36 UTC
Ok I understood, but from the user point of view, this is very confusing because it seem a warning by the lvresize utility that is asking confirmation to actually do the resize procedure.
Comment 6 Diego Ercolani 2011-08-23 13:41:58 UTC
.
Comment 7 Dong Mao Zhang 2014-03-24 09:23:26 UTC
close this old bug.