Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When updating from Fedora Core 1 to Fedora Core 2, I received a failure because of a previous logical volume management version 1 (LVM1) installation that used a hyphen in the logical volume name for the root partition. Version-Release number of selected component (if applicable): anaconda on the FC2-i386-disc1.iso CD How reproducible: My previous logical volume names were "lv-ROOT", "lv-SWAP", "lv-home", "lv-tmp", "lv-usr", and "lv-var". The volume group was called "vg0". I presume that any logical volume root partition with a hyphen in the name will reproduce the problem. I am unsure if hyphens in the non-root partition names will also cause problems. Actual results: ######################################## Traceback (most recent call last): File "/usr/lib/anaconda/gui.py", line 1048, in handleRenderCallback self.currentWindow.renderCallback() File "/usr/lib/anaconda/iw/progress_gui.py", line 242, in renderCallback self.intf.icw.nextClicked() File "/usr/lib/anaconda/gui.py", line 763, in nextClicked self.dispatch.gotoNext() File "/usr/lib/anaconda/dispatch.py", line 169, in gotoNext self.moveStep() File "/usr/lib/anaconda/dispatch.py", line 237, in moveStep rc = apply(func, self.bindArgs(args)) File "/usr/lib/anaconda/packages.py", line 521, in doMigrateFilesystems thefsset.makeLVMNodes(instPath, trylvm1 = 1) File "/usr/lib/anaconda/fsset.py", line 1500, in makeLVMNodes iutil.copyDeviceNode(dmdev, instPath + dmdev) File "/usr/lib/anaconda/iutil.py", line 403, in copyDeviceNode filestat = os.lstat(src) OSError: [Errno 2] No such file or directory: '/dev/mapper/vg0-lv-ROOT' Local variables in innermost frame: dest: /mnt/sysimage/dev/mapper/vg0-lv-ROOT src: /dev/mapper/vg0-lv-ROOT ######################################## Expected results: I expected a correct update of LVM1 without the device mapper to LVM2 with the device mapper. Additional info: The "copyDeviceNode" function eventually calls LVM2 activation code, the source code of which can be found in the "dev_manager.c" file of "LVM2/lib/activate" in the LVM2 source tree. When making the device mapper node entries, if any hyphens are found in the logical volume names, then those are "quoted" by replacing each with two hyphens. The "/dev/mapper/vg0-lv-ROOT" entry would be created as "/dev/mapper/vg0-lv--ROOT". One hyphen would be expected by the calling script, not two. As a work-around, I used the "lvrename" command to change the hyphens into underscores (e. g., "lv-ROOT" to "lv_ROOT"), then changed "/etc/fstab", the GRUB boot line, and the initial ramdisk image to correspond. When trying with underscores instead of hyphens, I encountered no problems. Since LVM2 activation code regards hyphens in logical volume names as special, I recommend using anaconda to replace those hyphens as I did.
I've experienced the same problem, although for me it was because my volume group names contain hyphens (/dev/vg-main). I get the same traceback trying to open /dev/mapper/vg-main-root. From the shell I can see that /dev/mapper/vg--main-root exists.
Unfortunately, solving this problem is rather complicated as you explained. It's not just a simple matter of changing the name of the logical volume - the bootloader configs need to be updated, the fstab needs changing, and so forth. What's unfortunate is that the dash gained some special significance, making moving to the newer version more difficult.
*** Bug 489428 has been marked as a duplicate of this bug. ***