Bug 672948

Summary: Unable to persist mount point using system-config-lvm
Product: Red Hat Enterprise Linux 5 Reporter: Anderson Kaiser <akaiser>
Component: system-config-lvmAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: agk, akaiser, bbrock, cluster-maint, dwysocha, mbroz, mmello, prockai, rdassen
Target Milestone: rc   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-lvm-1.1.5-9.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 618207 Environment:
Last Closed: 2011-07-21 09:03:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 590060    

Description Anderson Kaiser 2011-01-26 19:10:28 UTC
Description of problem:

When using the system-config-lvm to create a new LV and make it persistent to a reboot the script hangs and do not create the fstab entry.

Traceback (most recent call last):
  File "/usr/share/system-config-lvm/InputController.py", line 655, in on_new_lv
    if dlg.run() == False:
  File "/usr/share/system-config-lvm/InputController.py", line 1339, in run
    if self.apply() == True:
  File "/usr/share/system-config-lvm/InputController.py", line 2029, in apply
    Fstab.add(None, lv_path, mountpoint_new, filesys_new.fsname)
  File "/usr/share/system-config-lvm/Fstab.py", line 27, in add
    fstab = __remove_and_replace(dev_path_old, line)
  File "/usr/share/system-config-lvm/Fstab.py", line 43, in __remove_and_replace
    paths = get_all_paths(mnt_device)
  File "/usr/share/system-config-lvm/Fstab.py", line 114, in get_all_paths
    follow_links_to_target(dev_path, paths)
  File "/usr/share/system-config-lvm/utilities.py", line 6, in follow_links_to_target
    o, s = execWithCaptureStatus('/bin/readlink', ['/bin/readlink', '-e', path])
  File "/usr/share/system-config-lvm/execute.py", line 15, in execWithCaptureStatus
    res = execWithCaptureErrorStatus(bin, args)
  File "/usr/share/system-config-lvm/execute.py", line 22, in execWithCaptureErrorStatus
    command = command + ' ' + arg
TypeError: cannot concatenate 'str' and 'NoneType' objects

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux 5.6
system-config-lvm-1.1.5-8.el5

How reproducible:

100%

Steps to Reproduce:

- Insert a new device in the system.
- Open system-config-lvm
- In the "Uninitialized Entities" select the new device added and click in the "Initialize Entity"
- Answer Yes when it request you to create a new partition.

- Select the "Partition 1" in the "Unallocated Volumes" and "Create new Volume Group"
- Insert "Volume Group Name": VolTest and left the other informations in the default.

- In "Volume Groups" select VolTest then VolTest 'Logical View'.
- Create New Logical Volume
	- LV name: lv-test
	- LV size: 1 Gigabytes
	- Filesystem: Ext3
	- Check 'Mount' and 'Mount when rebooted'
	- Mount point: /test
		The specified mount point, /test, does not exist. Do you wish to create it?
		Answer 'Yes'

  
Actual results:

system-config-lvm shows a traceback

Expected results:

system-config-lvm works as expected creating a fstab entry

Comment 2 Marcelo Moreira de Mello 2011-01-26 19:17:14 UTC
Hello, 

Applied backport
 
Fix upstream commit 164f9e13f59e845aa00724032e3b5cc0bd0eda87

http://git.fedorahosted.org/git/?p=system-config-lvm.git;a=commit;h=164f9e13f59e845aa00724032e3b5cc0bd0eda87

Comment 4 Anderson Kaiser 2011-01-26 19:35:14 UTC
Package was tested in our labs and it worked as expected.

Comment 7 Anderson Kaiser 2011-01-28 19:19:13 UTC
With the backport the tool is able to change the /etc/fstab.

But it still not changing the 'Properties for Logical Volume' that still showing the following:
 Mount Point: Unmounted

The 'Mount Point when Rebooted' now shows correctly the mount point.

The 'system-config-lvm' do not identify the status of the device and not umount the device before apply the change. Still with the following message:

'Logical volume is not mounted but is in use. Please close all applications
using this device (eg iscsi)'

Comment 8 Marek Grac 2011-02-04 16:25:57 UTC
@Anderson:

Problem with 'not mounted' is very likely a duplicate of #672475 (simple patch inside of bz). If it persist please open a new bug.

Comment 9 Marek Grac 2011-02-04 16:58:49 UTC
Patch mention in comment#2 was used.

Comment 10 Anderson Kaiser 2011-02-07 13:42:03 UTC
Hi Marek,

The problem with the mount point in fstab was fixed. But it still not changing the status in the system-config-lvm tool. And the tool still not changing the LV.

You still have to umount it to change the size of the LV.

The 'Properties for Logical Volume show the following:
	Mount Point: Unmounted
	Mount Point when Rebooted: None

When I try to resize the volume it show the following message:
	Logical volume is not mounted but is in use. Please close all applications using this device (eg iscsi)

The problem with the fstab was fixed, but the tool are unable to see this change and still show the device as umounted and do not see the mount point.

Thanks
Anderson Kaiser

Comment 16 errata-xmlrpc 2011-07-21 09:03:01 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1036.html