This is for xfs bootloader installation issues.
Related: rhbz#117968 --- pyanaconda/storage/formats/fs.py | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/formats/fs.py b/pyanaconda/storage/formats/fs.py index 5b1b814..83bfdc1 100644 --- a/pyanaconda/storage/formats/fs.py +++ b/pyanaconda/storage/formats/fs.py @@ -865,6 +865,9 @@ class FS(DeviceFormat): return False return self._mountpoint is not None
+ def sync(self, root="/"): + pass + def writeKS(self, f): f.write("%s --fstype=%s" % (self.mountpoint, self.type))
@@ -1263,6 +1266,29 @@ class XFS(FS): argv.extend([label, self.device]) return argv
+ def sync(self, root='/'): + """ Ensure that data we've written is at least in the journal. + + This is a little odd because xfs_freeze will only be + available under the install root. + """ + if not self.status or not self._mountpoint.startswith(root): + return + + try: + iutil.execWithRedirect("xfs_freeze", ["-f", self.mountpoint], + stdout="/dev/tty5", stderr="/dev/tty5", + root=root) + except (RuntimeError, OSError) as e: + log.error("failed to run xfs_freeze: %s" % e) + + try: + iutil.execWithRedirect("xfs_freeze", ["-u", self.mountpoint], + stdout="/dev/tty5", stderr="/dev/tty5", + root=root) + except (RuntimeError, OSError) as e: + log.error("failed to run xfs_freeze: %s" % e) + register_device_format(XFS)
Related: rhbz#117968 --- pyanaconda/bootloader.py | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c99620a..4c182e5 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -770,9 +770,7 @@ class BootLoader(object):
self.write_config(install_root=install_root) sync() - sync() - sync() - sync() + self.stage2_device.format.sync(root=install_root) self.install(install_root=install_root)
def update(self, install_root=""):
anaconda-devel@lists.fedoraproject.org