Bug 288031 - pm-utils should freeze xfs filesystems
Summary: pm-utils should freeze xfs filesystems
Alias: None
Product: Fedora
Classification: Fedora
Component: pm-utils
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-09-12 17:10 UTC by Jeremy Fitzhardinge
Modified: 2015-04-13 10:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed:
Type: ---

Attachments (Terms of Use)
/usr/lib/pm-utils/sleep.d/99xfs - freeze filesystems while suspended (305 bytes, text/plain)
2007-09-12 17:10 UTC, Jeremy Fitzhardinge
no flags Details

Description Jeremy Fitzhardinge 2007-09-12 17:10:16 UTC
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):

How reproducible:
Every time

Steps to Reproduce:
Actual results:
xfs filesystems not frozen in the suspended state

Expected results:
Should be frozen

Additional info:
script to fix bug attached

Comment 1 Jeremy Fitzhardinge 2007-09-12 17:10:16 UTC
Created attachment 193671 [details]
/usr/lib/pm-utils/sleep.d/99xfs - freeze filesystems while suspended

Comment 2 Jeremy Fitzhardinge 2007-09-12 17:11:45 UTC
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.

Comment 3 Till Maas 2007-09-20 00:09:10 UTC
What is the advantage of freezing the filesystem? Does this only help in case
the resume/thaw fails or are there other reasons?

Comment 4 Jeremy Fitzhardinge 2007-09-20 00:54:55 UTC
> 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).

Comment 5 Till Maas 2007-09-24 19:39:15 UTC
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.

Comment 6 Jeremy Fitzhardinge 2007-10-03 17:09:33 UTC
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.

Comment 7 Eric Sandeen 2007-10-17 04:20:15 UTC
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.


Comment 8 Eric Sandeen 2008-02-13 03:19:05 UTC
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.

Comment 9 Bug Zapper 2008-05-14 14:20:17 UTC
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:

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Fedora Admin XMLRPC Client 2015-04-13 10:08:09 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Note You need to log in before you can comment on or make changes to this bug.