From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050914 Firefox/1.0.4 (Debian package 1.0.4-2sarge4) Description of problem: s-c-l updates fstab by creating a modified version in /tmp/fstab and _renaming_ (os.rename) it to /etc/fstab. This does not work when /tmp and /etc are on different filesystems. Everything else works (the LV is created, the filesystem is created and mounted on correct mountpoint), but the application hangs after this error. Traceback (most recent call last): File "/usr/share/system-config-lvm/InputController.py", line 645, in on_new_lv if dlg.run() == False: File "/usr/share/system-config-lvm/InputController.py", line 1324, in run if self.apply() == True: File "/usr/share/system-config-lvm/InputController.py", line 2002, in apply Fstab.add(lv_path, mountpoint_new, filesys_new.name) File "/usr/share/system-config-lvm/Fstab.py", line 33, in add os.rename(FSTAB_TMP, FSTAB) OSError: [Errno 18] Invalid cross-device link The same problem occurs if you try to remove an LV, however then the app crashes before being able to do anything (as editing fstab is probably the first thing that happens). Using shutil.move instead of os.rename fixes the problem for me. --- Fstab.py.old 2005-09-13 16:46:05.000000000 +0200 +++ Fstab.py 2006-01-06 02:32:05.000000000 +0100 @@ -1,6 +1,7 @@ import sys import os +import shutil import Filesystem @@ -30,12 +31,12 @@ fstab.write(line) fstab.close() - os.rename(FSTAB_TMP, FSTAB) + shutil.move(FSTAB_TMP, FSTAB) def remove(mnt_point): fstab = __remove(mnt_point) fstab.close() - os.rename(FSTAB_TMP, FSTAB) + shutil.move(FSTAB_TMP, FSTAB) def __remove(mnt_point): fstab = open(FSTAB, 'r') Version-Release number of selected component (if applicable): system-config-lvm-1.0.5-1.0 How reproducible: Always Steps to Reproduce: /etc and /tmp on different filesystems. Create a new LV, and ask s-c-l to mount after reboot (so it updates the fstab). Actual Results: The application crashes, having performed some of the tasks. Additional info:
Fixed in 1.0.17 *** This bug has been marked as a duplicate of 175131 ***