xfs-support

Bug #1802068 reported by wangjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
New
Undecided
wangjun

Bug Description

when I make "volume_fstype=xfs",the "resize_fs" will throw exception in "e2fsck" and "resize2fs"

Revision history for this message
wangjun (wang.jun) wrote :

    def resize_fs(self, mount_point):
        """Resize the filesystem on the specified device."""
        self._check_device_exists()
        # Some OS's will mount a file systems after it's attached if
        # an entry is put in the fstab file (like Trove does).
        # Thus it may be necessary to wait for the mount and then unmount
        # the fs again (since the volume was just attached).
        try:
            if self._wait_for_mount(mount_point, timeout=2):
                if CONF.volume_fstype == 'xfs':
                    utils.execute("xfs_growfs", self.device_path,
                                  run_as_root=True, root_helper="sudo")
                    LOG.debug("Unmounting '%s' before resizing." % mount_point)
                    self.unmount(mount_point)
                    return

                LOG.debug("Unmounting '%s' before resizing." % mount_point)
                self.unmount(mount_point)

            utils.execute("e2fsck", "-f", "-p", self.device_path,
                          run_as_root=True, root_helper="sudo")
            utils.execute("resize2fs", self.device_path,
                          run_as_root=True, root_helper="sudo")
        except exception.ProcessExecutionError:
            msg = _("Error resizing the filesystem with device '%s'.") % (
                self.device_path)
            log_and_raise(msg)

Changed in trove:
assignee: nobody → wangjun (wang.jun)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.