Description of problem: According to the xfs maintainers, pm-utils should be freezing all xfs filesystems before suspending/hibernating and unfreezing on resume/thaw, in order to guarantee that the filesystem is in a consistent state during the low-power state. Version-Release number of selected component (if applicable): 0.99.3 How reproducible: Every time Steps to Reproduce: 1.suspend 2.resume 3. Actual results: xfs filesystems not frozen in the suspended state Expected results: Should be frozen Additional info: script to fix bug attached
Created attachment 193671 [details] /usr/lib/pm-utils/sleep.d/99xfs - freeze filesystems while suspended
In my case, only /home is xfs, so this works fine. I guess there might be a problem if /var/log is an xfs filesystem.
What is the advantage of freezing the filesystem? Does this only help in case the resume/thaw fails or are there other reasons?
> What is the advantage of freezing the filesystem? Does this only help in case > the resume/thaw fails Yes. It's the only guaranteed way to make sure the on-disk data is correct ("sync" will only make sure the metadata is consistent on xfs, I think). If suspend/resume works then it's redundant, but it will prevent data loss if there's a resume failure. I had had a number of files with zero content or truncated to zero while resume was being problematic (it works reliably for me now).
Imho you should follow the same approach like 50modules provides, i.e. using a variable, e.g. SUSPEND_XFS_FILESSYSTEMS where a user can add filesystems to, that should be freezed, store these successfully freezed filesystems in RESUME_XFS_FILESYSTEMS and unfreeze them on thaw/resume. Imho there should also be printed a warning to the logfile/suspend should fail in case SUSPEND_XFS_FILESSYSTEMS is not empty and the hook is invoked, to make it obvious to the user that the parameter will not be used.
Explicitly listing the xfs filesystems seems pretty fragile, since it would need to bet set up for every system and updated as the set of xfs filesystems changes. Given that this is something which should happen by default on all systems, it needs to be fairly automatic. This is unlike modules, which only need case-by-case special handling. I can imagine having an exclusion list of filesystems which shouldn't be frozen, perhaps because they need to be written to later in the suspend process.
There's probably no harm in freezing any filesystems which can be frozen - it sounds like a decent safety measure, since the infrastructure is pretty much there; but currently the only way to get a freeze through to say ext3 is if it's on lvm. -Eric
FWIW, recent patches on the ext4 devel list propose elevating the xfs freeze ioctl to the vfs, and allowing ext3/4 to be frozen in this same way.
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists. Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs: http://docs.fedoraproject.org/release-notes/ The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.