Bug 584985

Summary: Modification of volume size fails
Product: [Fedora] Fedora Reporter: Raphael Groner <projects.rg>
Component: system-config-lvmAssignee: Marek Grac <mgrac>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: agk, dwmw2, dwysocha, itamar, juha.heljoranta, mbroz, mclasen, mgrac, prockai
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-lvm-1.1.13-1.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 586555 586556 (view as bug list) Environment:
Last Closed: 2010-05-09 20:09:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 586555, 586556, 603770    
Attachments:
Description Flags
/etc/fstab
none
Screen shot of error "in use but not mounted"
none
Content of /etc/mtab and /proc/mounts
none
Debug patch none

Description Raphael Groner 2010-04-22 20:18:27 UTC
Description of problem:
I try to change size of a lvm volume with system-config-lvm and wondering if the option in settings dialog is therefore.


Version-Release number of selected component (if applicable):
system-config-lvm-1.1.12-2.fc13.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Click on button "edit settings" of a lvm volume (for example "backup")
2. Change size of the volume (for example 10G -> 20G)
3. Click on OK
  
Actual results:
Nothing happens in the dialog, but in console you can see the traceback.

Expected results:
New size was applied and volume is remounted.

Additional info:
Traceback (most recent call last):
  File "/usr/share/system-config-lvm/InputController.py", line 1061, in on_edit_lv
    if dlg.run() == False:
  File "/usr/share/system-config-lvm/InputController.py", line 1351, in run
    if self.apply() == True:
  File "/usr/share/system-config-lvm/InputController.py", line 2150, in apply
    self.command_handler.mount(lv_path, tmp_mountpoint)
TypeError: mount() takes exactly 4 arguments (3 given)


Output of lvdisplay:

  --- Logical volume ---
  LV Name                /dev/vol/backup
  VG Name                vol
  LV UUID                X3VXrt-Unov-cVvN-hk1C-1cW9-SEDI-nRK4f5
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                10,00 GiB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
  --- Logical volume ---
  LV Name                /dev/vol/vm
  VG Name                vol
  LV UUID                3kYzVd-WdKM-Klx1-t7TQ-fpmA-v2se-jyrrZm
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                100,00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2
   
  --- Logical volume ---
  LV Name                /dev/vg_spritty/lv_root
  VG Name                vg_spritty
  LV UUID                UN3Y9d-GvY2-eMqx-v6on-2qUG-YZzz-AqRjMq
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50,00 GiB
  Current LE             1600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Name                /dev/vg_spritty/lv_home
  VG Name                vg_spritty
  LV UUID                JCPUGD-8waM-ybtn-JW8M-GEgK-MmWu-FQ3Bxt
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                176,78 GiB
  Current LE             5657
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:3
   
  --- Logical volume ---
  LV Name                /dev/vg_spritty/lv_swap
  VG Name                vg_spritty
  LV UUID                uRJ2gA-fq2t-30wJ-xyz2-4sxn-2aCC-gjhZhx
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                5,59 GiB
  Current LE             179
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

Comment 1 Raphael Groner 2010-04-22 20:23:16 UTC
Created attachment 408438 [details]
/etc/fstab

Comment 2 Fedora Update System 2010-04-27 21:12:48 UTC
system-config-lvm-1.1.13-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/system-config-lvm-1.1.13-1.fc13

Comment 3 Fedora Update System 2010-04-27 21:13:02 UTC
system-config-lvm-1.1.13-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/system-config-lvm-1.1.13-1.fc12

Comment 4 Marek Grac 2010-04-27 21:24:39 UTC
Thanks for reporting bug, I hope it is fixed now

Comment 5 Raphael Groner 2010-04-29 12:23:19 UTC
Created attachment 410088 [details]
Screen shot of error "in use but not mounted"

Sorry, but it does not work for me.

The GUI shows both volumes (backup and vm) as unmounted although they are mounted.

When I try to change the size (initial problem task), an error message says that the volume is not mounted but used ...

I tried with the checkbox "mounted" both options as enabled and disabled, it is not checked initially. "Mount on boot" is checked.

Comment 6 Marek Grac 2010-04-30 15:07:27 UTC
@Raphael:

Can you send me '/etc/mtab' and '/proc/mounts' from a situation when it does not work? We parse results from these two files and it is possible that there is something different.

Comment 7 Fedora Update System 2010-04-30 23:40:07 UTC
system-config-lvm-1.1.13-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Raphael Groner 2010-05-01 09:52:17 UTC
Created attachment 410655 [details]
Content of /etc/mtab and /proc/mounts

Comment 9 Raphael Groner 2010-05-01 10:02:50 UTC
(In reply to comment #7)
I reinstalled the package from updates-testing repository and I get the same error as described in comment #5.

(In reply to comment #6)
Marek, please look at the attachment 410655 [details] for /etc/mtab and /proc/mounts.

Comment 10 Fedora Update System 2010-05-03 16:04:30 UTC
system-config-lvm-1.1.13-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Marek Grac 2010-05-05 18:24:58 UTC
Created attachment 411705 [details]
Debug patch

@Raphael:

please try to apply this patch and send me an output. I'm not able to reproduce your bug but if I guess correctly than problem should be close to this function.

Comment 12 Raphael Groner 2010-05-05 19:31:50 UTC
(In reply to comment #11)
Here comes the output of system-config-lvm to console. 
If the problem is still not reproducable for you, please close this bug. In that case, I will guess a local problem only due to my configuration or something like that ...

paths: ['/dev/vol/backup']
NONE EARLY
paths: ['/dev/vol/vm']
NONE EARLY
paths: ['/dev/vg_spritty/lv_root']
NONE EARLY
paths: ['/dev/vg_spritty/lv_swap']
NONE EARLY
paths: ['/dev/vg_spritty/lv_home']
NONE EARLY
paths: ['/dev/sda1']
LINErootfs / rootfs rw 0 0
LINE/proc /proc proc rw,relatime 0 0
LINE/sys /sys sysfs rw,seclabel,relatime 0 0
LINEudev /dev devtmpfs rw,seclabel,relatime,size=1891664k,nr_inodes=472916,mode=755 0 0
LINEdevpts /dev/pts devpts rw,seclabel,relatime,gid=5,mode=620,ptmxmode=000 0 0
LINEtmpfs /dev/shm tmpfs rw,seclabel,relatime 0 0
LINE/dev/mapper/vg_spritty-lv_root / ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0
LINEnone /selinux selinuxfs rw,relatime 0 0
LINE/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
LINE/dev/sda1 /boot ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0
FOUND: /boot
paths: ['/dev/vol/backup']
NONE EARLY

Comment 13 Raphael Groner 2010-05-05 19:55:41 UTC
(In reply to comment #12)
Okay, maybe I have to add the information that I use two LVM volume groups, one in /dev/sda1 for /dev/vg_spritty/* and the other in /dev/sdb1 for /dev/vol/* . What is interesting is that your function finds the as /boot mounted partition in /dev/sda1 that it is no volume of LVM at all.
Possibly, because there is /dev/sda1 found for modification requested to /dev/vol/backup in /dev/sdb1, this mismatch can not be handled correctly? I guess then system-config-lvm can deal with only one single volume group. But vice versa, trying to modify for example /dev/vg_spritty/home shows similiar results (not mounted ...).
In that case, it would seem to be more like a feature request then. Feel free to close this bug ;)

In any case, it will be possible for me to manage the volumes with the lv* commands in console.

Comment 14 Marek Grac 2010-05-05 21:05:36 UTC
@Raphael:

It usually works correctly with several volume groups. But your output is actually pretty usefull. I know exactly that problem is in function follow_links_to_target(path, paths=[]). As this function is pretty readable then problem can be in
 * you don't have /bin/ls (not usual) :)
 * ls -l /dev/sda -> will not end with date in format '2010-05-05' but it will contains '5 May 2010' (or sth else according to locale). Can you test this second option? There was similar problem before.
You can try also: 
   ls -l --time-style=long-iso /dev/sda

Comment 15 Raphael Groner 2010-05-06 16:08:37 UTC
(In reply to comment #14)
[raphael@spritty ~]$ ls -l /dev/sda
brw-rw----. 1 root disk 8, 0  6. Mai 17:12 /dev/sda
[raphael@spritty ~]$ ls -l --time-style=long-iso /dev/sda
brw-rw----. 1 root disk 8, 0 2010-05-06 17:12 /dev/sda

Comment 16 Marek Grac 2010-05-06 18:18:52 UTC
@Raphael:

thanks, I will post patch & create a new build in Friday

Comment 17 Marek Grac 2010-05-07 10:53:10 UTC
Hmm, it will be something slightly different :( 'ls' have to fail 

Can you try:
ls -l /dev/vol/backup; echo $?
ls -l /dev/vg_spritty/lv_root; echo $?

If you use SELinux can you try to turn it off?

Comment 18 Raphael Groner 2010-05-09 20:09:33 UTC
It seems to become more like a guessing game. So I am closing the bug with a reference to comment #12 and the hint that it is hardly reproducable.

Comment 19 Marek Grac 2010-06-01 16:52:45 UTC
Raphael please take a look at #597593 -> same problem patch attached

Comment 20 Raphael Groner 2010-06-23 14:44:16 UTC
(In reply to comment #19)
Sorry, I have no development system here. Can't test it any more and used the CLI tools.