Bug 497080 - check amount of free disk space before attempting to suspend
Summary: check amount of free disk space before attempting to suspend
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Xen Maintainance List
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 589123 626339 (view as bug list)
Depends On:
Blocks: 615187 618569 690419 699611
TreeView+ depends on / blocked
 
Reported: 2009-04-22 09:59 UTC by Chris Lalancette
Modified: 2012-02-21 05:54 UTC (History)
9 users (show)

Fixed In Version: xen-3.0.3-133.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 05:54:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0160 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2012-02-20 14:53:33 UTC

Description Chris Lalancette 2009-04-22 09:59:25 UTC
Description of problem:
In an upstream xen-devel discussion, it was suggested that we really have the ability to have suspend cancellation in the RHEL kernels, which has been in upstream Xen for some time.  I'm still waiting on clarification of what particular scenarios would be helped by suspend cancellation, but we might want to think about backporting this feature into the RHEL-5 kernel.  The link to my email is here:

http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00850.html

And some of the relevant upstream c/s dealing with suspend cancellation are:

xen-unstable.hg: 13519
linux-2.6.18-xen.hg: 623

Comment 1 Paolo Bonzini 2009-11-11 13:57:01 UTC
Unassigning for now.

Comment 3 Paolo Bonzini 2010-11-09 09:47:20 UTC
*** Bug 626339 has been marked as a duplicate of this bug. ***

Comment 5 Laszlo Ersek 2011-03-02 16:01:36 UTC
Looking at the current state of the files modified by the commits listed in comment 0, additional linux-2.6.18-xen.hg commits to consider the backporting of, on top of 623:

1051:c72ead7ec595 -- Don't register shutdown watch and suspend event channel for Dom0 [if we have 591:cdadea74443c in place -- "Set up an event channel to accept suspend requests. This is much faster than going through xenstore."]

629:abcb2a10ff2f -- linux/x86-64: use xen_new_user_pt() rather than open-coding it [if we have xen_new_user_pt()]

I will have to check xen-unstable.hg as well.

Comment 7 Laszlo Ersek 2011-06-15 12:40:09 UTC
We discussed this, and decided against backporting suspend cancellation.

The most common reason of failure to suspend is insufficient disk space. Userspace could / should do a preventive (best effort) check to see if there's enough free space in the target filesystem. If there isn't, then refuse to suspend.

Changing component to "xen", and retitling.

Comment 8 Laszlo Ersek 2011-06-15 12:41:14 UTC
*** Bug 589123 has been marked as a duplicate of this bug. ***

Comment 15 Yuyu Zhou 2011-11-30 07:00:40 UTC
Reproduce the bug on xen-3.0.3-132.el5 and verify the bug on xen-3.0.3-135.el5.

Steps:
1. Start a guest.
2. Prepare a disk with insuffient space, for example
#dd if=/dev/zero of=/tmp/small.img bs=1M count=100
#mkfs /tmp/small.img
#mount /tmp/small /mnt/small -o loop
3. Save the guest to the inffient space disk
#xm save vm1 /mnt/small/savefile

Results:
on xen-3.0.3-132.el5, free disk space is not checked before attempting to suspend:
# xm save 14 /mnt/small/14.save
Error: /usr/lib64/xen/bin/xc_save 4 14 0 0 4 failed
Usage: xm save <Domain> <CheckpointFile>

Save a domain state to restore later.

on xen-3.0.3-135.el5, free disk space is checked before attempting to suspend the guest, and proper message is given.
# xm save 15 /mnt/small/15.save
Error: can't write guest state file /mnt/small/15.save: No space left on device
Usage: xm save <Domain> <CheckpointFile>

Save a domain state to restore later.

So, change this bug to VERIFIED.

Comment 16 errata-xmlrpc 2012-02-21 05:54:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html


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