Hide Forgot
+++ This bug was initially created as a clone of Bug #658344 +++ Description of problem: system-config-lvm leaves mount for logical group in fstab after group was completely removed. The devices are removed from /dev/mapper,/dev/disk but the entry for mounting the group is left in /etc/fstab. When the system is rebooted,the system cannot find the device and fails to mount (for obvious reasons) the group. At that point the system prompts to enter the root password to go into recovery mode. Problem is, root is mounted read only so fstab can't be edited. Have to boot from the install media and go into recovery mode to edit fstab and remove the entry in fstab. Then the reboot will work, but it takes a while to come up since when the system goes into recovery mode, selinux is put into permissive mode and the reboot requires a relabel. Ah, the adventures of Linux. Version-Release number of selected component (if applicable): system-config-lvm-1.1.15-1.fc14.noarch How reproducible: Only did this once. Too painful to try again. Besides, the bad drive is already packed and ready to go back for replacement. Actual results: mount information for logical group left in fstab after complete removal of group in system-config-lvm. Expected results: system-config-lvm should clean up the entry in fstab if the group is completely removed. --- Additional comment from mgrac on 2011-07-08 08:35:55 EDT --- @John: thanks for reporting this problem. Surely something what I would like to fix. By "logical group" you meant "volume group", am I right? work-around: as a root you can do "mount -o remount,rw /" and then you can edit /etc/fstab without need for installation media. --- Additional comment from fedora.jrg01 on 2011-07-08 10:33:59 EDT --- Actually I meant a logical volume like: /dev/mapper/vg_host-lv_someVolume /someMountPoint ext4 defaults 1 2 --- Additional comment from mgrac on 2011-07-18 08:26:44 EDT --- Created attachment 513606 [details] Proposed patch @John: ok, I have tested it and in new distros there is different way how to do a symlinks for logical volumes. I have added heuristic that guess /dev/mapper/... and it should be pretty solid. Patch will be in upstream in few days (and new version for fedora too).
Unit test: 1) add new logical volume to fstab 2) change path to /dev/mapper/vg-lv 3) remove logical volume from fstab 4) if line was removed then patch is correct
Patch is in upstream now: http://git.fedorahosted.org/git/?p=system-config-lvm.git;a=commit;h=d97f18f6c012cfd428e9029f0a44b7c181f40d02
The situation as per unit test in Comment #1 seems quite artificial for the manual fstab entry modification, but I still understand this might happen during system upgrades. BEFORE FIX: Following steps of unit test Comment #1 1) created a new Logical volume named "test" using system-config-lvm on a physical extent named "test", with option "Mount when rebooted" selected 2) check that fstab entry exists [root@z1 etc]# cat fstab |grep test /dev/test/test /mnt ext3 defaults 1 2 3) modify this entry to point to /dev/mapper/$1 entry of the same logical unit: [root@z1 etc]# cat fstab |grep test /dev/mapper/test-test /mnt ext3 defaults 1 2 4) delete the logical volume using system-config-lvm 5) see that the entry was not removed from /etc/fstab: [root@z1 etc]# cat fstab |grep test /dev/mapper/test-test /mnt ext3 defaults 1 2 [root@z1 etc]# AFTER FIX: Following steps of unit test Comment #1 1) created a new Logical volume named "test" using system-config-lvm on a physical extent named "test", with option "Mount when rebooted" selected 2) check that fstab entry exists [root@z1 etc]# cat fstab |grep test /dev/test/test /mnt ext3 defaults 1 2 3) modify this entry to point to /dev/mapper/$1 entry of the same logical unit: [root@z1 etc]# cat fstab |grep test /dev/mapper/test-test /mnt ext3 defaults 1 2 4) delete the logical volume using system-config-lvm 5) see that the entry was removed correctly from /etc/fstab: [root@z1 etc]# cat fstab |grep test [root@z1 etc]# Marking VERIFIED for system-config-lvm-1.1.12-9.el6
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: The system-config-lvm utility incorrectly left mount information in the /etc/fstab configuration file for a logical volume that had been completely removed from the system. This could have caused the system to enter single-user mode after rebooting because it was unable to mount a logical volume in /etc/fstab that no longer existed. This update ensures that system-config-lvm correctly removes the fstab entry for any logical volume that is removed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1710.html