Re: RFC: Self-snapshotting in Linux

From: Alan Jenkins
Date: Wed Apr 16 2008 - 06:27:47 EST


Ben Nizette wrote:
> On Wed, 2008-04-16 at 16:44 +0800, Peter Teoh wrote:
> > Essentially, to reiterate the key idea: able to snapshot the current
> > kernel+userspace permanent.....restore from another snapshot....and
> > then switch back again if needed etc.....will the implementation be
> > difficult...if not impossible????
> >
>
> As I see it the main thing is that VMWare doesn't have to worry about
> trying to put hardware in to (and pull out of) low power modes. VMWare
> hardware is never left in an undefined state by poorly written drivers
> etc.
>
> I think hibernation is about what you want; snapshotting as you describe
> it should fall down for about the same reasons

I guess there is the hardware / drivers issue. I would like to claim
I've found hibernation to be reliable but unfortunately that's not
100% true. As you say, that's inherent to snapshotting on
unvirtualised hardware - calling it snapshotting instead of
hibernation wouldn't change anything.

I think VMware's real advantages are more about management and
convenience.
1) Disk virtualisation. It's much more convenient to create a VMware
image than a new linux partition. Linux will let you use disk images
on a filesystem using the loopback driver, but that tends not to be
well supported by installers. wubi[1] is the obvious counterexample
here.
2) Linux hibernation does the in-memory snapshot OK, but the
*filesystem* obviouslly isn't a part of that snapshot. In some
unfortunate circumstances, you can end up resuming a memory image
which is not consistent with the filesystem and corrupting it.
IMHO filesystems need to include a "last modified" timestamp and check
it on resume.

[1] http://wubi-installer.org/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/