<div>Hi,all</div>
<div>I have encountered several bugs of system-config-lvm.</div>
<div>The first one is if there is a logical volume entry in /etc/fstab</div>
<div>and another raw device entry for swap</div>
<div>such as</div>
<div>/dev/my_vg1/my_lv1   swap  swap  defaults 0 0</div>
<div>/dev/hda1       swap    swap   defaults   0  0</div>
<div> </div>
<div>then if we use system-config-lvm to remove my_lv1,</div>
<div>Not only the my_lv1 entry,but all other swap entries in /etc/fstab will get removed.</div>
<div> </div>
<div>After some investigation on the system-config-lvm python source file.</div>
<div>It seems that the problem is in the InputController.py file.</div>
<div>When we click the remove button,the program will check if there is any entry of the removed logical volume in /etc/fstab.</div>
<div>If any entry exist in /etc/fstab, it will remove this line from /etc/fstab so that when the system reboot it won't mount this logical volume(since it has been removed).</div>
<div> </div>
<div>This procedure is OK.However,the program will delete the corresponding entry in the following way:</div>
<div>1.check what is the mount point of this logical volume.(in our case it is swap)</div>
<div>2.search /etc/fstab file,delete all the entries with the same mount point.This won't result in any trouble if the logical volume is mounted on /mnt/mylv1 .but if the mount point is swap ,it will delete all swap entries in /etc/fstab file.</div>

<div> </div>
<div>I have created a patch to solve this problem,which modify the removing procedure if the mount point is swap.</div>
<div> </div>
<div>There is several other bugs with system-config-lvm but the root cause should be the same.</div>
<div> </div>
<div>this problem exist in enterprise linux 5 and enterprise linux 5 U1. </div>
<div>Is this a fixed bug?Any advice is appreciated!</div>
<div> </div>
<div>Thanks</div>