public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [TuxOnIce-devel] safe resuming: automatically invalidating an outdated hibernate snapshot
@ 2008-10-13 11:35 Martin Steigerwald
  2008-10-13 20:41 ` Nigel Cunningham
  2008-10-16 10:33 ` Pavel Machek
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Steigerwald @ 2008-10-13 11:35 UTC (permalink / raw)
  To: tuxonice-devel, linux-kernel; +Cc: Nigel Cunningham

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

Am Montag, 13. Oktober 2008 schrieben Sie:
> Hi Martin.

Hi Nigel,

> On Mon, 2008-10-13 at 12:13 +0200, Martin Steigerwald wrote:
> > Cc to linux-kernel: This is mainly for tuxonice, but it might also be
> > relevant for other hibernate implementations. Maybe some general
> > mechanism for checking whether an on disk snapshot of the system is
> > current would be good - as also the resume parameter could be missing or
> > wrong or whatnot.
> >
> >
> > Hi!
> >
> > Is there a way to automatically invalidate the tuxonice snapshot when a
> > non tuxonice kernel is booted accidentally? I.e. could tuxonice recognize
> > when the swap partition has been accessed *after* the snapshot has been
> > written?

[...]

> The simplest way is to mkswap the appropriate partitions from a script
> run when booting (after we check whether to resume, of course). I
> believe the hibernate script already has support for this. Maybe
> pm-utils or such like needs it too?

Simple idea. But I dislike automatically formatting a partition on each boot. 
What if the user changes the partition layout and forgets to adapt swap 
partition / resume parameter? AFAIR only mkfs.xfs really checks whether the 
partition contains an existing filesystem and even that check does cannot 
trigger in case an undetected filesystem is on the partition.

Thus I'd prefer a way to touch the swap partition without destroying its 
contents and then checking whether it has been touched after the snapshot has 
been written. I would then like to have it touched on every bootup on the 
Linux system. Would something along these lines be possible?

Ciao,
-- 
Martin Steigerwald - team(ix) GmbH - http://www.teamix.de
gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread
* safe resuming: automatically invalidating an outdated hibernate snapshot
@ 2008-10-13 10:13 Martin Steigerwald
  2008-10-13 11:13 ` [TuxOnIce-devel] " Nigel Cunningham
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Steigerwald @ 2008-10-13 10:13 UTC (permalink / raw)
  To: tuxonice-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

Cc to linux-kernel: This is mainly for tuxonice, but it might also be relevant 
for other hibernate implementations. Maybe some general mechanism for 
checking whether an on disk snapshot of the system is current would be good - 
as also the resume parameter could be missing or wrong or whatnot.


Hi!

Is there a way to automatically invalidate the tuxonice snapshot when a non 
tuxonice kernel is booted accidentally? I.e. could tuxonice recognize when 
the swap partition has been accessed *after* the snapshot has been written?

It happened here several times that someone booted the wrong kernel and then 
someone else booted the right one again. TuxOnIce would then resume from a 
snapshot that it not up-to-date anymore. This leads to filesystem breakage as 
the filesystem slab objects and other in memory structures would not 
represent the current state of the filesystem on disk. xfs_repair did a 
marvellous job on these occassions and I already changed menu.lst to hide the 
GRUB boot menu by default, but it would be better if this case of  
maloperation can be intercepted.

Ciao,
-- 
Martin Steigerwald - team(ix) GmbH - http://www.teamix.de
gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-16 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 11:35 [TuxOnIce-devel] safe resuming: automatically invalidating an outdated hibernate snapshot Martin Steigerwald
2008-10-13 20:41 ` Nigel Cunningham
2008-10-16 10:33 ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2008-10-13 10:13 Martin Steigerwald
2008-10-13 11:13 ` [TuxOnIce-devel] " Nigel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox