From: Stefan Seyfried <seife@suse.de>
To: Peter Jones <pjones@redhat.com>
Cc: suspend-devel@lists.sourceforge.net, linux-pm@osdl.org,
Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [linux-pm] Dangers of touching disk between suspend and resume
Date: Fri, 1 Dec 2006 08:39:56 +0100 [thread overview]
Message-ID: <20061201073956.GB18690@suse.de> (raw)
In-Reply-To: <1164925067.6031.29.camel@localhost.localdomain>
On Thu, Nov 30, 2006 at 05:17:47PM -0500, Peter Jones wrote:
> On Thu, Nov 30, 2006 at 03:00:43PM -0500, I wrote:
> > On Tue, 2006-11-28 at 17:37 +0100, Stefan Seyfried wrote:
> >
> > > So it is a good idea to tell the engineer to do "mkswap" on the swap
> > > partition before putting the disk into the replacement hardware.
> >
> > Ugh, no it's not. You really want the UUID on the swap area to remain
> > the same.
>
> In response, on Thu, 2006-11-30 at 21:13 +0100, Stefan Seyfried wrote:
> > Well, but the system won't care because it won't resume?
> > Or am i missing something?
>
> And On Thu, 2006-11-30 at 15:42 -0500, Daniel Drake wrote:
> > Why?
> >
> > [not questioning your reasoning, this is coming from someone who knows
> > very little about swap structure and what the UUID is used for]
>
> You want to get rid of the resume metadata from it, but you don't want
> to create a new swap structure. Normally it's not a problem, but in
> some environments, such as with shared-storage like in a SAN[1], we need
> to be able to identify that a swap device is really the one we mean to
> be activating; the UUID is one of the best pieces of data we've got. So
> you don't want to start over with a new swap partition, you want to
> clear the resume data only.
>
> Granted, I think most distros, if not all, and all the standard tools
> totally muck up swap on shared storage right now[0]. But that's no
> reason to advocate such a bad habit. For FC/RHEL making this work right
> is at least on my TODO list for the relatively near future.
Ok. I think a patch to mkswap to "--reset-the-swap-signature-after-suspend"
or just a "reset-swap-signature-after-failed-suspend" program is trivial to
implement in this case. Right now, you cannot suspend to those devices
anyway.
Alternatively, you could provide the UUID you want for the device to mkswap
(my mkswap does not have this option, but my swap partition does not seem to
have an UUID anyway):
info.category = 'volume' (string)
info.product = 'Volume (swap)' (string)
block.device = '/dev/sda3' (string)
volume.uuid = '' (string)
root@strolchi:/tmp# blkid /dev/sda2 /dev/sda3
/dev/sda2: LABEL="BOOT" UUID="0dae6602-2299-47e8-88c8-c0fca0fc8f9e" TYPE="ext2"
/dev/sda3: TYPE="swap"
So if somebody submits a patch that implements a "reset_signature" program,
i'll include that in the suspend package.
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next prev parent reply other threads:[~2006-12-01 7:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 15:21 Dangers of touching disk between suspend and resume Daniel Drake
2006-11-28 15:43 ` [linux-pm] " Alan Stern
2006-11-28 16:37 ` Stefan Seyfried
2006-11-28 19:43 ` Daniel Drake
2006-11-30 20:00 ` Peter Jones
2006-11-30 20:13 ` Stefan Seyfried
2006-11-30 22:17 ` Peter Jones
2006-12-01 7:39 ` Stefan Seyfried [this message]
2006-12-02 4:41 ` Nigel Cunningham
2006-12-04 8:10 ` Stefan Seyfried
2006-12-05 11:28 ` Nigel Cunningham
2006-12-05 11:44 ` Stefan Seyfried
2006-12-05 11:51 ` Matt Sealey
2006-12-06 0:10 ` Nigel Cunningham
2006-12-09 15:25 ` Matthew Garrett
2006-11-30 20:42 ` Daniel Drake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061201073956.GB18690@suse.de \
--to=seife@suse.de \
--cc=linux-pm@osdl.org \
--cc=pjones@redhat.com \
--cc=stern@rowland.harvard.edu \
--cc=suspend-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox