Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Suspend to swap on a diskless host
Date: Thu, 31 May 2007 01:18:25
Message-Id: 20070530200956.7bc85943@pascal.spore.ath.cx
In Reply to: Re: [gentoo-user] Suspend to swap on a diskless host by Michal 'vorner' Vaner
1 On Sun, 27 May 2007 16:21:03 +0200
2 "Michal 'vorner' Vaner" <vorner@×××.cz> wrote:
3
4 > Hello
5 >
6 > AFAIK, I think you do not want to do that.
7 Not on important boxes, that's for sure!
8 > First: You need to load the kernel from the swap, in the time it
9 > loads, you have no running kernel (well, there is a little part, but
10 > that one has no clue about network).
11 My observations lead me to believe that, after going into hibernation
12 with swap suspend, the kernel boots up normally, and it's only at the
13 point of init running that it really comes 'out' of hibernation. As
14 far as running kernel before networking, it's a diskless host so the
15 kernel does do dhcp configuration at boot time.
16 > Second: You do not want swap on nfs, since it is terribly slow, buggy,
17 > nfs can allocate memory to transfer data and you get a circular
18 > problem
19 > - to get a memory, you need to get a memory. And, what if your cat
20 > steps on the ethernet cable?
21 Better risk that then constantly be running out of memory. I haven't
22 had a single problem with this. To be fair, it has 1/2 gig of RAM and
23 only 64M of swap, and although it only uses about a meg, it does use
24 that up pretty much right away.
25 > Third: the suspend does not use swap as a swap, but as a part of a
26 > disc.
27 As a block device you might say. A loop device is a block device like
28 any other, is it not?
29 > You might try suspend to ram, thought. It should work on diskless
30 > machine as well as on any other.
31 That is my preferred solution. Perhaps someday I will get it to work...
32
33 Anyhow, Hans-Werner-Hilse already provided a solution, which by the way
34 I haven't actually implemented, and probably never will, because it's
35 clearly a convoluted scheme in the first place. He suggested using an
36 initrd suspension, since you can get an initrd from a tftp server just
37 like a kernel image.
38
39 Thanks for the feedback,
40 Dan
41 --
42 gentoo-user@g.o mailing list